Question: Consider the library database of Figure 3.20.Write the following queries in SQL. a. Find the member number and name of each member who has borrowed

Consider the library database of Figure 3.20.Write the following queries in SQL.

a. Find the member number and name of each member who has borrowed at least one book published by “McGraw-Hill”.

b. Find the member number and name of each member who has borrowed every book published by “McGraw-Hill”.

c. For each publisher, find the member number and name of each member who has borrowed more than five books of that publisher.

d. Find the average number of books borrowed per member. Take into account that if a member does not borrow any books, then that member does not appear in the borrowed relation at all, but that member still counts in the average.


 Figure 3.20member(memb_no, name) book(isbn, title, authors, publisher) borrowed (memb_no, isbn, date)

member(memb_no, name) book(isbn, title, authors, publisher) borrowed (memb_no, isbn, date)

Step by Step Solution

3.45 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Find the member number and names of each member who has borrowed at least one book published by Mc... View full answer

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 Database System Concepts Questions!