Chapter 10
SQL Part 4: Subqueries, CTEs, UNION, INTERSECT, EXCEPT
Learning Objectives
- Understand what a subqueries are and how they are structured.
- Understand the difference between a correlated and non-correlated subqueries.
- Understand what a Common Table Expression is and the potential benefit compared to subqueries.
- Understand the differences between
UNION
,INTERSECT
, andEXCEPT
.
Key Terminology
Subqueries
- Subqueries
- Correlated subquery
Common Table Expression
- Common Table Expression (CTE)
UNION, INTERSECT, EXCEPT
UNION
INTERSECT
EXCEPT