Ok, I have this logical scheme about movies, actors, directors, etc. in an SQL database, and I want to create a query that returns me all movies with more than 2 copies.
I've been trying, but I cant get it right, can anybody help me?
SELECT m.title, COUNT(c.mid) FROM movies m, copies c WHERE m.mid = c.mid AND COUNT(c.mid) > 2 GROUP BY m.title;
This would be achieved using the count function in MySQL and a having clause.