I just came across a question that I am really stuck with. I have added the question below, I was wondering if someone can help me figure this out?
The following schema forms part of a database held in a relational DBMS.
------
Book ( BookID, Title, PubID ) BookLoans
( BookID, BranchID, CardNo, DateOut, DueDate ) The loan frequency of a book is the number of times a book has been lent.
Write a query to display book titles and their loan frequencies if the frequencies are higher than the average loan frequency of all books. The display should be in the order of book titles and loan frequencies. We do not consider the case there a book has never been lent (if we do, what will happen?).
------
So far I've only got this much done, I can't seem to think any further. Any assitance would be appreciated. Thanks in advanced.
SELECT b.title FROM books b JOIN bookloans f WHERE f.dateout

New Topic/Question
Reply



MultiQuote





|