select author_id
(Select count(book_id) from mytable group by author_id) as booksPerAuthor
from mytable
where booksPerAuthor > 1;
2
solved How to count a number of duplicate entries in a group using a subquery?
select author_id
(Select count(book_id) from mytable group by author_id) as booksPerAuthor
from mytable
where booksPerAuthor > 1;
2
solved How to count a number of duplicate entries in a group using a subquery?