SQL SELECT QUERY COUNT
I'm new to this, so bear with me.
I am trying to create a select query from a database Movie
. Among other tables, there is a table Role
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
+3
source to share