Language:EN
Pages: 5
Words: 2163
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
create query that will return the current day the

Create query that will return the current day the week

Lab 5 of 7: Oracle Single Row and Group Functions 

L A B S T E P S http://www.devryu.net/ec/Courses/13775/CRS-DVUO-2148869/ConnectLab/tabblue_03_right.gif

Using the BOOK_CUSTOMER table and the NVL2 function, create a query that will return a list containing the customer number, first name, last name, and the characters ‘NOT REFERRED’ if the customer was not referred by another customer.  Give the derived column an alias of STATUS.  Do not list any customers that were referred by another customer.

#2
#4

NOTE: Be sure that all of the numbers in the fourth column are positive numbers.

#6

Using the PUBLISHER table, create a query that will return the entire publisher name with the first letter of each word in upper case.

#8
#10 

Using the BOOKS table, create a query using the correct functions to return the category name, total number books per category with a column alias of “Category Total”, and the total cost of all the books per category with an alias of “Cost”.  Format the cost column using the correct function to show dollars and cents with a dollar sign.

Using the ORDERITEMS table, create a query using the correct functions to return the item#, the total quantity of items ordered with an alias of “Total”, the average quantity per order with an alias of “Average” (since averages are often in decimals, only show two decimal places), the minimum quantity ordered with an alias of “Minimum”, and the maximum quantity ordered with an alias of “Maximum”.  Your output results set should have 5 columns and 4 rows of data.

#12
L A B S T E P S
#2 

Using the BOOK_CUSTOMER and BOOK_ORDER tables, create a query using the NATURAL JOIN method that will return a list containing the customer first name and last name (concatenated together with a space between the names) and the order number for all orders that have been shipped.  Give the customer name column an alias of “Customer Name” and order the output by the customer number in the BOOK_ORDER table in ascending order.

Using the BOOK_CUSTOMER, BOOK_ORDER, ORDERITEMS, and BOOKS tables, create a query using traditional join conditions based on comparisons between primary and foreign keys that will list the customer number, first and last name, and book title.  Limit your listing to only those books in the ‘FITNESS’ category.

#4
#6 
#8 

Using the correct tables, create a query using the traditional join operation that will list the customer first and last name concatenated together, book title, and order date (formatted as MM/DD/YYYY with an alias of “Order Date”) for all the customers who have purchased books published by 'PRINTING IS US'.

Using the BOOK_ORDER, ORDERITEMS, and BOOKS tables, create a query using an OUTER JOIN operation that will list the book title, order date and order number for all books in the BOOKS table.  Order you output in descending order by book ISBN.  There are three books that have never been ordered which should show up at the top of your listing.

#10
#12 
This is the end of lab #6

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Nicholas Jones

PageId: DOCC7EDD20