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 names of the movies that are either made after 2000 or reviewed by Brittany Harris?
assistant
SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Brittany Harris' OR T2.year > 2000
human
What is the names of movies whose created year is after all movies directed by Steven Spielberg?
assistant
SELECT title FROM Movie WHERE YEAR > (SELECT max(YEAR) FROM Movie WHERE director = 'Steven Spielberg')
human
What is the maximum stars and year for the most recent movie?
assistant
SELECT max(T1.stars) , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT max(YEAR) FROM Movie)
human
What is the name of the movie that is rated by most of times?
assistant
SELECT T2.title , T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY count(*) DESC LIMIT 1
human
What is the name of the movie produced after 2000 and directed by James Cameron?
assistant
SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000
human
What is the title of the newest movie?
assistant
SELECT title FROM Movie WHERE YEAR = ( SELECT MAX( YEAR ) FROM Movie ) ;