Share of Customers by Country

easy
Unit 2 · Aggregation I0/3 to milestone

What percentage of all customers comes from each country? Return country and pct_customers, rounded to 1 decimal place. Sort by pct_customers descending, then country.

Count all customers, whether or not they have ordered.

Schema

customers(id, name, country, signup_date)
orders(id, customer_id, order_date, total)
#aggregation#window-functions#percentages1 visible + 1 hidden tests
query.sql · SQLite
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Share of Customers by Country · TechGradify