Why nested loop is giving incorrect result?


#1

SELECT reviewer_name
FROM reviewers
WHERE reviewer_id = (
SELECT DISTINCT reviewer_id
FROM ratings
WHERE reviewer_stars = NULL
);


#2

Your first = need to be replaced by in and second “=” by is


#3

@gaurav.pandey1234546 After doing this, the query which becomes has no joins.
But is it internally using a join? If yes, which type?
I don’t think it is using any join since the bracket is evaluated first; then its output serves as input to first SELECT.