GOAL: For each publisher having more than 3 books, retrieve the
publisherID, and the # of authors writing more than 1 book:

This doesn't quite work yet:

SELECT COUNT(AuID),PubID
FROM BOOK_AUTHOR,AUTHORS,BOOKS
WHERE BOOK_AUTHOR.AuID = AUTHORS.AuID
AND BOOKS.ISBN = BOOK_AUTHOR.ISBN
(SELECT AuID FROM BOOK_AUTHOR GROUP BY AuID HAVING COUNT(ISBN) > 1 )
(SELECT PubID FROM PUBLISHERS,BOOKS
WHERE PUBLISHERS.PubID = BOOKS.PubID

AND BOOKS.ISBN = BOOK_AUTHOR.ISBN
GROUP BY PUBLISHERS.PubID
HAVING COUNT(BOOK_AUTHOR.ISBN) > 3 );


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PHP 
& MySQL" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/phpmysql?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to