DataDesk
All topics
UNION, INTERSECT & EXCEPT — practice · DataDesk
DataDesk
How it works
Scenarios
Practice
For trainers
Pricing
Log in
Start free
SQL
UNION, INTERSECT & EXCEPT
Combine and compare result sets.
0
/ 20 solved
All levels
Basic (5)
Intermediate (7)
Advanced (8)
All
To do
Solved
1
UNION
Basic
2
UNION ALL
Basic
3
INTERSECT
Basic
4
EXCEPT
Basic
5
Cities from two tables
Basic
6
Label the source
Intermediate
7
Cities with staff but no office
Intermediate
8
Combine different events
Intermediate
9
Total row with UNION
Intermediate
10
Customers who ordered and referred
Intermediate
11
Employees in Engineering but not on projects
Intermediate
12
Months with orders or signups
Intermediate
13
Symmetric difference
Interview
Advanced
14
Compare two table versions
Interview
Advanced
15
Multiset difference
Advanced
16
Revenue and cost in one report
Advanced
17
Customers active in both halves
Advanced
18
Unpivot with UNION ALL
Advanced
19
Top and bottom together
Advanced
20
Students missing a paper
Advanced