Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
NOT EXISTS. NOT EXISTS (subquery) is true when the subquery returns no rows. Link the subquery to the outer row, as in WHERE oi.product_id = p.product_id, and it asks 'is there no matching row for this one?'. Conditions inside the subquery narrow what counts as a match.
select p.product_name from products p where not exists (select 1 from order_items oi where oi.product_id = p.product_id and oi.quantity >= 25)
The account team wants every Enterprise and Mid-Market customer that didn't complete a single order in Q4 2025. Harbor & Pine Hotels is rumoured to be one of them.
Return customer_name and segment for Enterprise and Mid-Market customers with no completed order dated on or after 2025-10-01.
Loading the Brightline dataset…
Language
Full plan
SQL ✓ · Excel and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe