I am using the below query to return the names of artists which appear in a table multiple times AND the first character is starting with A
SELECT DISTINCT artist FROM releases WHERE artist LIKE 'a%' ORDER BY artist
I now want to take this a bit further and want to only return artists which appear more than 10 times
How would I do this?
Cheers!
The best way to do this would be to use a
GROUP BYto get the counts of the times the artists appear, then usingHAVINGto indicate they need to appear at least a certain number of times.I believe this query will give you what you want: