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 movies directed by James Cameron.
assistant
SELECT title FROM Movie WHERE director = 'James Cameron';
human
What about their rating stars?
assistant
SELECT T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.director = 'James Cameron';
human
Show me the average of them.
assistant
SELECT AVG ( T1.stars ) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.director = "James Cameron" ;