SQL SELECT QUERY COUNT
I'm new to this, so bear with me.
I am trying to create a select query from a database
. Among other tables, there is a table
that contains information such as
roleID, roleName, gender, actorID, movieID
. An actor can have many roles in different films.
I am trying to create a query to tell me how many members have three or more roles in the database.
I've tried several solutions and they are outputting data just not sure if they are correct.
SELECT COUNT (DISTINCT actorID) FROM Role WHERE actorID >= 3 SELECT COUNT (actorID) FROM Role GROUP BY movieID HAVING COUNT (actorID) >=3
source to share