w3resource
SQL exercises

SQL exercises on movie Database: Find the names of all reviewers who have ratings with a NULL value

SQL movie Database: Subquery Exercise-8 with Solution

8. Write a query in SQL to find the names of all reviewers who have ratings with a NULL value.

Sample table: reviewer


Sample table: rating


Sample Solution:

SELECT DISTINCT rev_name 
FROM reviewer 
WHERE rev_id IN (
SELECT rev_id 
FROM rating 
WHERE rev_stars IS NULL);

Sample Output:

            rev_name
--------------------------------
 Neal Wruck
 Scott LeBrun
(2 rows)

Practice Online


Movie database model

Query Visualization:

Duration:

Query visualization of Find the names of all reviewers who have ratings with a NULL value - Duration

Rows:

Query visualization of Find the names of all reviewers who have ratings with a NULL value - Rows

Cost:

Query visualization of Find the names of all reviewers who have ratings with a NULL value - Cost

Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a query in SQL to find the titles of all movies that have no ratings.
Next: Write a query in SQL to return the reviewer name, movie title, and stars for those movies which reviewed by a reviewer and must be rated. Sort the result by reviewer name, movie title, and number of stars.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming