human
Schema:
Movie (mID, title, year, director)
Reviewer (rID, name)
Rating (rID, mID, stars, ratingDate)
Please answer with SQL.
assistant
Sure, I understand.
human
What are the names of all movies?
assistant
SELECT title FROM Movie;
human
How many ratings did each of them have?
assistant
SELECT COUNT( * ) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY t1.mID ;