Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a query to display the patron ID, book number, and days kept for each chec

ID: 3918563 • Letter: W

Question

Write a query to display the patron ID, book number, and days kept for each check-out. "Days kept" is the difference from the date on which the book is returned to the date it was checked out. -Need an answer in correct MySQL syntax. Question is from Database Systems 12e, CHP_08, question 45P. Thanks

Explanation / Answer

# Query => # in CHECKOUT table Column 'PAT_ID' represent Patron ID, # Column 'BOOK_NUM' represent Book Number select PAT_ID as "PATRON ID", BOOK_NUM as "Book Number", DATEDIFF(check_in_date, check_out_date) as "Days kept" from CHECKOUT;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote