programming-examples/sql/SQLMovieDatabase/6. Write a query in SQL to find the name of all reviewers who have rated 7 or more stars to their rating.sql

6 lines
268 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*6. Write a query in SQL to find the name of all reviewers who have rated 7 or more stars to their rating. */
SELECT reviewer.rev_name
FROM reviewer, rating
WHERE rating.rev_id = reviewer.rev_id
AND rating.rev_stars>=7
AND reviewer.rev_name IS NOT NULL;