Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
IN (subquery). column IN (SELECT …) keeps a row when its value appears anywhere in the list the subquery returns. The subquery must return one column. Repeats in that list don't matter, so each outer row shows up once. A JOIN, by contrast, would repeat a customer once for every matching order.
select product_name, category from products where product_id in ( select product_id from order_items where quantity >= 25 )
Daniel Ortiz, the West manager, is reviewing the partner programme and wants to know which of his customers have bought through a partner.
Return customer_name for every West customer (region_id 4) with at least one completed order in the 'Partner' channel. One row per 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