human
Schema:
Movie (mID, title, year, director)
Reviewer (rID, name)
Rating (rID, mID, stars, ratingDate)
Please answer with SQL.
assistant
Sure, I understand.
human
Please show me the names and years of the movies that has the top 3 highest rating stars
assistant
SELECT T2.title , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC LIMIT 3;
human
Can you show me the director names together with the name and years? | Did you mean the directors of the movies that have the top 3 highest rating stars? | Yes, director names, movie names and years please.
assistant
SELECT T2.title , T2.year , T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC LIMIT 3;
human
Please give me the same information for the movies that have the 3 lowest rating stars.
assistant
SELECT T2.title , T2.year , T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars LIMIT 3 ;