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 titles of all movies?
assistant
SELECT title FROM movie;
human
Show me their reviewer's name, stars, and rating date.
assistant
SELECT T3.name , T2.title , T1.stars , T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID;
human
Sort them first by reviewer name, then by movie title, and lastly by number of stars.
assistant
SELECT T3.name , T2.title , T1.stars , T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name , T2.title , T1.stars ;