SQL supports the EXISTS (∃) logical quantifier for testing the result of subquery search conditions. See Specifying Subqueries in Search Conditions.
If the subquery would return response rows, the WHERE condition is satisfied. Specifying NOT EXISTS predicate inverts the test.
A subquery in a search condition returns a boolean value that indicates whether responses would be returned, but does not return rows.
The subquery can be correlated with an outer query.