Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
CROSS JOIN. CROSS JOIN pairs every row of one table with every row of another, with no ON. Use it to build a full grid of labels, such as every month × every region, then LEFT JOIN the facts onto that grid. Pairs with no facts survive the LEFT JOIN, so they show up as zeros instead of missing rows.
select r.region, p.category from regions r cross join (select distinct category from products) p
The returns dashboard needs a full grid of refunded orders: every month for every region, showing 0 where a region had no refunds that month, so the chart doesn't skip months.
Return month (1 to 12), region and refunded_orders: the number of orders with status 'refunded' placed in that month by customers of that region. Include every month and region pair (48 rows), with 0 where there were none.
Loading the Brightline dataset…
Language
Full plan
SQL ✓ · Excel and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe