The choice between INNER and OUTER JOIN comes down to one question: do you want unmatched rows or not? Getting this wrong silently drops data from reports — a mistake analysts cannot afford.
Key Points
- INNER JOIN returns only matching rows from both tables
- OUTER JOINs (LEFT/RIGHT) keep unmatched rows, filling gaps with NULL
- Use LEFT JOIN to answer 'customers with zero orders' type questions
- INNER JOIN result is always ≤ LEFT JOIN result in row count
- Filtering the right table in WHERE can accidentally turn LEFT into INNER — filter in ON instead
- Check for missing matches: WHERE right_table.id IS NULL
.png)