Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
CASE WHEN. CASE WHEN builds a new column from rules: CASE WHEN condition THEN value … ELSE value END. SQL checks the WHEN lines from top to bottom and uses the first one that is true. You can GROUP BY the new column.
select product_name, case when list_price >= 20 then 'Premium' else 'Standard' end as tier from products
Operations asked the AI to split completed revenue by line quantity: Small (1 to 5), Medium (6 to 14) and Bulk (15 or more). Its answer has no Bulk row at all.
AI assistant: “I grouped completed revenue into Small, Medium and Bulk by line quantity.”
Run the AI query, then fix it so it returns order_size and completed revenue (2 decimals) for all three sizes.
Loading the Brightline dataset…
Language
Full plan
SQL ✓ · Excel and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe