17.08.2015 Views

CIS 336 Week 6 iLab 6 Devry University/uophelp

  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

list the customer number, first and last name concatenated together, and city for all customerswho have placed an order for the most expensive book (based on retail price). Give the combinedcustomer names column and alias of "Customer Name". STEP 7: Back to top Using theORDER_ITEMS table, create a query using the correct functions to return the item#, the totalquantity 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 minimumquantity ordered with an alias of "Minimum", and the maximum quantity ordered with an alias of"Maximum". Your output results set should have five columns and four rows of data. STEP 8:Back to top Using the BOOKS table, create a query using the DECODE function that willdisplay the book title, the published date, and the publisher name (this is where the decodefunction comes in). Give the publisher name column an alias of "Publisher Name", and order thepublisher names in descending order. The publisher names used should be the same as those inthe PUBLISHER table. DO NOT join to the Publisher table for this query. STEP 9: Back to topUsing the PUBLISHER table, create a query that will return a line of output like the one belowfor each record in the table. Be sure to use the correct functions in the SELECT statement, so thatyour output looks like the example below. The contact person for Printing Is Us Publishing isTommie Seymour. Be sure to use the correct function to display the publisher name andpublisher contact with only the first letter of each word capitalized. STEP 10: Back to top Usingthe correct tables, create a query using the JOIN ON method to display a listing of all customerswho have purchased more than two books. List the customer’s last name, the customer’s city andstate, and the number of books they have purchased. Give the number purchased column andalias of "Number Purchased". STEP 11: Back to top Using only the BOOK table for the uppermost statement, create a sub query that will update the retail price of all books published byPRINTING IS US by five percent (retail * 1.05). Remember, all you have is the publisher"name". Use the sub query to find the publisher ID. To verify your update, provide a selectstatement on the BOOKS table before your update statement, and then a second select on theBOOKS table after the update. Once you have verified the results, you can issue a ROLLBACKstatement to return the data to the original state. STEP 12: Back to top using theBOOK_CUSTOMER table, write a sub query that will return the names of those customers whowere referred by the same individual who referred Jorge Perez. Do not display Jorge Perez’sname in the returned results (Hint: you should only have two customers displayed and theexclusion for Jorge Perez must be associated with the upper query). STEP 13: Back to top usingthe BOOKS table, create a query using the correct functions to return the category name, totalnumber books per category with a column alias of "Category Total", and the total cost of all thebooks per category with an alias of "Cost". Format the cost column using the correct function toshow dollars and cents with a dollar sign. This is the end of Lab #6 Back to top] HTML

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!