Cellwise · SQL track

Subqueries and UNION

Use one query’s result inside another.

A subquery is a query in brackets, used inside another query. It’s handy when a filter depends on a calculated value, such as the average.

UNION stacks the results of two queries, one above the other, and removes duplicates.

What you’ll do

Start the lesson, free