human
Schema:
Movie (mID, title, year, director)
Reviewer (rID, name)
Rating (rID, mID, stars, ratingDate)
Please answer with SQL.
assistant
Sure, I understand.
human
How many movies are in the list?
assistant
SELECT COUNT( * ) FROM Movie;
human
How many directors are on the list?
assistant
SELECT COUNT( director ) FROM Movie;
human
How many of the directors have more than 1 film?
assistant
SELECT COUNT( distinct T1.director ) FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title ! = T2.title;
human
What are the titles from those 2 directors?
assistant
SELECT T1.title FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title ! = T2.title ;