Question: 3. Single table queries( 6-15) and 3. Multiple table queries(16-25) 3. Single Table Queries Those queries shoula be run in the criginal database. To restore
3. Single table queries( 6-15) and 3. Multiple table queries(16-25)


3. Single Table Queries Those queries shoula be run in the criginal database. To restore the database back to its criginal state after the database changes are done, you shauld run tne SoL table removal script to drop all tables, follorved by running the table creation 5QL script and data population sript. It is verv important to fomulate the correct solution to each given query. You should first understand what a query asks to determine tabla(s) and fields to beused to answer the query You can then anslate the sclutiom into a 5QL query statement and run it in the database Finally. you shoruld ercamine the result retumed by the query executicn to see if the result provides the right anserhe query. Queries in this group include 5) List book ID, book title, number opages, language. I55N 10 number, unit price and discount rate of all books. Sort the result by book title in ascending orde:r. 7) List those books in whose title contains the word Tipping Theesult should include bock ID, book titie, I5BN 10 number, unit price and discount rate Sort the result by book title in ascending order (You may replace the words in the query with the characters matchingycur test data.) 5) List those books whose book title begins with or contains ine word Tipping or ends with the ord "World. The result shouldinclude book ID, book title, ISEN 10 number unit price and discount rate. Sort the result by book title in ascending order (You may the words in the query with the words matchin gyour test data.) CIS3720 Databasa Managamant ) List card ID, card number, card typs. expiration month and expiration year of all payment methods Sort the result by card nurnber in ascending orde. 10) List card ID. accout ID, card number card type, expiration month and expirationyear of all payment methods whose expiration dates is between March 2017 and December 2017. Scrt the result by expiration montn and expiration year in ascending order. You may replace the expiration dates in the q query to matchyour test data.) 11) Compute the subtotal o each book sales, i.c., thequantity multipliea by the unit sales price othe book sales. The result shoul include book sales ID, order number, book ID quantity. unit sales price, and subtotal Sort the result by crdier number and subtotal in ascending order. You should give a descriptive name for the computed field in the results. 12) Calculate the total amount ofeach order. The resalt shouldinclude orde number and order total. Sort the result by orde totlin descending order. You should give a escriptive name for the computed field in the results. Note that an order may inchude multiple book sales. The total amount of an order is the sum of all subtotals of those book sales 13) Compute the total sales o each book. The result should incude book ID and total sales. Sort the result by total sales in ascending order 14) For each book whose total sales is greater than $200.00, list book ID and total sales. Sort the result by total sales in descending order. (ou may replace the amount $200.00 in the query based on your test data so that the result is both non-empty and a subset of books sold.) 15) Compute the max quantity, average quantity and minimal uantity of each book sola. The result should include book ID. max quantity. average quantity. and minimal quantity. Sort the result by bock ID in ascending order
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
