
You are asked to explain the major SQL join types and when to use each in analytics work. Focus on INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN, CROSS JOIN, and SELF JOIN, and clarify how each affects row retention and NULL values.
Use examples grounded in datasets such as Card Members, transactions, merchants, or servicing records in American Express environments.
What rows each join returnsWhen each join is appropriateHow unmatched rows appearCommon mistakes, especially with outer joinsHow `UNION` differs from a `JOIN`| Concept | Meaning |
|---|---|
| JOIN | Combines tables horizontally using related keys |
| UNION | Stacks result sets vertically with the same column structure |