Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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:
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 nameStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started