First and Last Order per Customer

easy
Unit 2 · Aggregation I0/3 to milestone

For every customer who has ordered, return name, first_order and last_order (dates) and orders (their number of orders). Sort by first_order, then name.

Schema

customers(id, name, country, signup_date)
orders(id, customer_id, order_date, total)
#aggregation#dates1 visible + 1 hidden tests
query.sql · SQLite
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
First and Last Order per Customer · TechGradify