Subqueries compare visible outer and inner tables.
highlighted = computed this step
Start with base tables
A subquery compares one visible table with another visible table.
outer and inner tables
Show both tables
The outer table has 3 rows and the inner table has 2 rows.
outer rows=3
Subquery examples are tiny finite table evaluations; SQL dialects, optimizer rewrites, NULL truth tables beyond the explicit NOT IN caveat, performance, and product behavior are out of scope.
Read source rows
The sourceRow column keeps row order deterministic and visible.
source order
Summary
The later lessons keep the tables tiny and recompute every kept row.