Ranking Countries Two Ways

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

For each country with customers, return country, customers, revenue (0 if no orders), customer_rank and revenue_rank (both RANK, highest first). Sort by revenue_rank, then country.

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 Countries Two Ways · TechGradify