NULL in a NOT IN list makes every non-match NULL, so the filter drops all rows
@alandev03▲ 0 net votes
5 NOT IN (SELECT NULL) and 5 NOT IN (1, NULL) both evaluate to NULL rather than true, and NULL = NULL is also NULL. A WHERE x NOT IN (subquery) with a NULL in the subquery returns no rows. Use NOT EXISTS or filter the NULLs out of the subquery.