🪆
Intermediate About 25 min

Subqueries & EXISTS

Nest queries inside queries, use EXISTS for existence checks, and write correlated subqueries.

What you'll learn

  • Write scalar subqueries that return a single value
  • Use IN and NOT IN with subqueries for set membership
  • Check row existence with EXISTS and NOT EXISTS
  • Understand correlated subqueries that reference the outer query
  • Choose between subqueries and JOINs for readability and performance