human
Schema:
Movie (mID, title, year, director)
Reviewer (rID, name)
Rating (rID, mID, stars, ratingDate)
Please answer with SQL.
assistant
Sure, I understand.
human
Show me the name of all the reviewers.
assistant
SELECT name FROM Reviewer;
human
What about the rating star they had given?
assistant
SELECT T2.name , T1.stars FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID;
human
Show me the reviewers who had rated 3 star and 4 star.
assistant
SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 4 ;