Question: Write queries for the following: 8. Do some date arithmetic: For each entry in CHECKOUT, calculate the number of days ago (from today) that the

Write queries for the following:

Write queries for the following: 8. Do some date arithmetic: For eachentry in CHECKOUT, calculate the number of days ago (from today) that

8. Do some date arithmetic: For each entry in CHECKOUT, calculate the number of days ago (from today) that the book was checked out. MySQL has a builtin variable CURRENT_DATE and a function DATEDIFF that returns the difference of two dates, in days. 9. Repeat, but show results only for books where the checkout was between 1735 and 1738 days ago, inclusive. For these checkouts, list the "oldest" ones first. Chapter 7 Introduction to Structured Ouery Language FROURE P7.56 THE CH07 FACT ERD CHECKOUT Check Num PK PATRON PK Pat ID FK1 Book Num FKZ Pat ID Pat FName Pat LName Check Out Date Check Due Date Check_in_Date Pat_Type BOOK AUTHOR PK Book Num PK Au ID Book Title Book_Year Book_Cost Book_Subject FK1 Pat_ID Au FName Au LName Au Birth Year WRITES PK,FK1 Book Num + PK,FK2 AU ID Dok in the system. Sort the results by book title. rite a query that displays the book title, cost and year of publication for every of cycry patron, sorted by last name

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!