Each Order's Share of Its Month

easy
Checkpoint challenge
Solve this to show you know the material and jump straight to Unit 8. Everything before it counts as cleared.

Return each order's id, month (YYYY-MM), total and month_share: the order's share of that month's revenue as a percentage, rounded to 1 decimal. Sort by month, then month_share descending, then id.

Schema

customers(id, name, country, signup_date)
orders(id, customer_id, order_date, total)
#window-functions#aggregation1 visible + 1 hidden tests
query.sql · SQLite
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Each Order's Share of Its Month · TechGradify