Small and Large Orders per Customer

easy
Unit 9 · Case0/4 to milestone

For each customer with orders, return customer_id, large_orders (total over 100), small_orders (100 or less) and large_share (large as a percentage of their orders, rounded to 1 decimal). Sort by customer_id.

Schema

customers(id, name, country, signup_date)
orders(id, customer_id, order_date, total)
#conditional-aggregation1 visible + 1 hidden tests
query.sql · SQLite
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Small and Large Orders per Customer · TechGradify