Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
INTERSECT. INTERSECT keeps only the rows that appear in the results of both queries. As with UNION, both sides need matching columns, and duplicates are removed, so each value appears once. It answers 'which are on both lists?' questions.
select region_id from customers where segment = 'Enterprise' intersect select region_id from customers where segment = 'Mid-Market'
Customer success wants the accounts that bought at both ends of the year: a completed order in January 2025 and another in December 2025.
Return customer_name for every customer with at least one completed order in January 2025 and at least one completed order in December 2025, each customer once.
Loading the Brightline dataset…
Language
Full plan
SQL ✓ · Excel and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe