Neutral Reviewers - SQL PROGRAMMING - SOLUTION


#1
SELECT reviewers.reviewer_name
FROM reviewers
JOIN ratings
ON reviewers.reviewer_id = ratings.reviewer_id AND ratings.reviewer_stars is NULL;

#2

SELECT reviewers.reviewer_name
FROM reviewers
where reviewers.reviewer_id=(Select ratings.reviewer_id from ratings where ratings.reviewer_stars is NULL);
why is it wrong?


#3

It should be reviewers.reviewer_id IN (Select …)


#4

SELECT reviewer_name
FROM reviewers
INNER JOIN ratings USING(reviewer_id)
WHERE number_of_ratings IS NULL;


#5

This part expects one & only one value : reviewers.reviewer_id=(Select ratings.reviewer_id …
but a reviewer may have given multiple nulls & hence will fail in those cases.


#6

I would add distinct as well – SELECT distinct reviewers.reviewer_name