You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
378 B
SQL

/*31. Write a query in SQL to find the reviewer's name and the title of the movie for those reviewers who rated more than
one movies. */
SELECT rev_name, mov_title
FROM reviewer, movie, rating, rating r2
WHERE rating.mov_id=movie.mov_id
AND reviewer.rev_id=rating.rev_ID
AND rating.rev_id = r2.rev_id
GROUP BY rev_name, mov_title HAVING count(*) > 1;