Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
Joining 3 or more tables. Joins chain: each JOIN … ON adds one more table, linked by a key to a table already in the query. Follow the keys like a path, from the table that holds the numbers to the tables that hold the labels. Short aliases and prefixed columns keep a long join readable.
select c.customer_name, r.region, t.revenue_target from customers c join regions r on r.region_id = c.region_id join targets t on t.region_id = r.region_id where t.month = '2025-01-01' limit 5
Each region manager, from Elena Petrova in North to Daniel Ortiz in West, wants to see which product categories earn the most in their area.
Return region, category and revenue (quantity × unit_price × (1 − discount_pct), completed orders only, rounded to 2 decimals), one row per region and category.
Loading the Brightline dataset…
Language
Full plan
SQL ✓ · Excel and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe