(Bookstore) Download the sample database bookstore‐2000.mdb from the book website. Write SQL to perform the following queries: A Consider all pairs of books with the following properties: they have the same author name, the second book’s publication year is later than the first book’s, and the second book’s retail price is at least $5 more than the first book’s retail price. For each such pair, display the author name, first book title, second book title, first book publication year, second book publication year, first book retail price, and second book retail price. Sort the results alphabetically by author name, then by the first book title, and then by the second book title. B Show the first name and last name of each customer, and the total number of orders they have placed (labeled orders_placed). Customers who have placed no orders should still appear in the output, with zero in the orders_placed column. C Write a query that retrieves all rows of the Orders table that correspond to orders placed in the year 2000. Save it under the name Orders2000. Then use it as subquery in a query that shows the first and last name of every customer, and the number of orders they placed in the year 2000. Customers who did not place an order in 2000 should still appear in the output, but with a count of zero. D If you just append a WHERE condition on the order dates to your answer for (b), do you obtain exactly the same output as in part (c)? Briefly explain why or why not.
#Sales Offer!| Get upto 25% Off: