Orders Above the Customer's Own Average

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

Which orders were unusually large for that customer? Return id (order id), name, total and customer_avg (that customer's average order total, rounded to 2 decimal places) for every order whose total is greater than its customer's average. Sort by id.

Schema

customers(id, name, country, signup_date)
orders(id, customer_id, order_date, total)
#window-functions#comparison1 visible + 1 hidden tests
query.sql · SQLite
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Orders Above the Customer's Own Average · TechGradify