Grouping with Rollup-style Totals

Hard
group-by Spotify Netflix DoorDash

Write a query that shows revenue by region and also includes a total row. Use UNION ALL to append a totals row. Return region and total_revenue, ordered by region (with 'TOTAL' last).

Expected Output: Revenue per region plus a grand total row.

Tables

Hints (3 available)

SQL Editor

Output

Click "Run" to see results...