Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a SQL query that will select all of the books that are currently checked out and are past due to be returned, which have

Develop a SQL query that will select all of the books that are currently checked out and are past due to be returned, which have a value greater than $10.00.

To find out if a loaned book is past due, you must compare the return date with the current date.

Your query must return: the name, address, postal code, and phone number of the borrower, the name and phone number of the librarian responsible for the transaction, the date the book was due to be returned, and the name, cost, and ISBN number of the book.

You query should sort the list by the return date in descending order which is the oldest date should appear first in the list.

USE syntax for the OpenOffice Base (HyperSQL).

These are the columns that each table has:

Table Booklended : Library_card_ID, Copy_ID, Chechout_date, Return_date, Librarian_ID;

Table BookCopy: Copy_ID, Book_ID, Sequence, Publication_date;

Table Book; Book_ID, Title, ISBN_number, Cost;

Table Borrower: Library_card_ID, First_name, Last_name, Address, City, Postal_code, Country, Phone_number, Membership_date;

Table Librarian: Librarian_ID, First_name, Last_name, Phone_number, Supervisor

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

Students also viewed these Databases questions