Reputation:
(SELECT BOOKAUTHOR from (select DISTINCT bookauthor, genre from BOOK) group by bookauthor HAVING COUNT(*) > 1);
So confused about joins
please let me know if there is anyway to improve my question, i have tried to search and search and am still so confused to make this happen
Upvotes: 0
Views: 39
Reputation: 50017
You'd do something like
SELECT a.AUTHORFIRSTNAME,
a.AUTHORLASTNAME
FROM (SELECT BOOKAUTHOR, COUNT(*)
FROM BOOK
GROUP BY BOOKAUTHOR
HAVING COUNT(*) > 1) b
INNER JOIN AUTHOR a
ON a.AUTHORID = b.BOOKAUTHOR
Upvotes: 1