Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following table schemas (primary keys are underlined): Book (BookId, Title, Publishername) Book_Authors (BookId, AuthorName) Publisher (Name, Address, Phone) Book_Copies (BookId, BranchId, No_Of_Copies) Book_Loans

Consider the following table schemas (primary keys are underlined): Book (BookId, Title, Publishername) Book_Authors (BookId, AuthorName) Publisher (Name, Address, Phone) Book_Copies (BookId, BranchId, No_Of_Copies) Book_Loans (BookId, BranchId, CardNo, DateOut, DueDate) Library_Branch (BranchId, BranchName, Address) Borrower (CardNo, Name, Address, Phone) Write SQL statements for the following queries: List the number of copies of the book titled The Lost Tribe owned by each library branch and the corresponding library branch name. List the names and addresses of all borrowers who have borrowed more than 5 books that are published by ABC. List the name and the phone number of the borrower who borrowed the book authored by Stephen King on date 2017-03-05. List the library branch name where the number of copies of the book titled The Spring is greater than the number of copies of the book titled The Pleasure of Coding

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

More Books

Students also viewed these Databases questions