Reputation: 1
I'm working on a homework assignment, and I'm just plain stuck on this one.
The structure I'm given is this:
member(memb_no, name, age)
book(isbn, title, authors, publisher)
borrowed(memb_no, isbn, date)
The question is basically to return the table of names that have borrowed ALL books of a given publisher (McGraw-Hill).
I just did the previous question, which was the same except ANY book from that publisher, but I just can't think of how I would check to see if I member has borrowed ALL the books from a given publisher, using just MySQL.
Could anyone suggest how to go about solving this? Thank you!
Upvotes: 0
Views: 2349
Reputation: 13781
I won't give you an answer, but I will suggest some topics to check out.
Look into these SQL clauses:
Also explore the concept of subqueries within the select clause.
Happy hunting!
(A quick general SQL resource which describes a few of those terms) (The relevant MySQL documentation page)
Upvotes: 2