Ranking Months by Revenue

easy
Unit 7 · Window Functions II0/3 to milestone

Return each month with orders (YYYY-MM) with its revenue and revenue_rank (1 = highest revenue, using RANK). Sort by revenue_rank, then month.

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
Ranking Months by Revenue · TechGradify