Many questions only ask whether a related row exists, like departments that have at least one project. EXISTS is true as soon as the subquery returns any row, and NOT EXISTS is true when it returns none. Use NOT EXISTS for "rows with no match", because unlike NOT IN it is safe when NULLs are involved. A LEFT JOIN with an IS NULL check is the other common way to write it.