Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
UNION and UNION ALL. UNION stacks the rows of two queries into one result. Both queries need the same number of columns, in the same order, with matching types; the column names come from the first query. UNION removes duplicate rows, UNION ALL keeps every row. A fixed text column can label where each row came from.
select product_name as item, 'product' as kind from products where category = 'Cleaning' union all select region, 'region' from regions
Brightline is hosting a year-end partner dinner. The invite list is every region manager plus every Enterprise customer, in one list.
Return name and guest_type in one result: each manager from regions with guest_type 'Manager', and the customer_name of each Enterprise customer with guest_type 'Enterprise customer'.
Loading the Brightline dataset…
Language
Full plan
SQL ✓ · Excel and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe