TLDR Tech / DataThe NULL in your NOT IN2026-06-18NOT IN in PostgreSQL is a classic gotcha: a single NULL in the subquery (or left side) causes the entire query to return zero rows due to three-valued logic.Read the full story