Numbering Each Customer's Orders

easy
Unit 6 · Window Functions I0/3 to milestone

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