Ive got the follow sql which counts how many actors have more than 1 role based on actorID
SELECT COUNT (actorID)
from ROLE
GROUP BY actorID
HAVING COUNT (actorID) > 3;
It gives me the followin result which is correct
COUNT(ACTORID)
4
5
4
4
However I WANT it to give me the total of 4 (4 actors have more than 3 film roles)
You have to do this in two steps.
First, identify the actors with more than 3 films, as you have done. Then count those records in a separate query…