Numbering Each Customer's Orders

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

Return every order's customer_id, order_date, total and order_number (1 for the customer's first order, 2 for the second, ...), in date order with ties by order id. Sort by customer_id, then order_number.

Schema

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