Skip to main content
Admissions guidance, study banks, and career tools โ€” get started on Shalyam

Customers With Increasing Orders

Return the customer_ids whose order amounts strictly increase every time they order (ordered by order_date). Customers with a single order qualify.

Table schema

Orders(id INT PRIMARY KEY, customer_id INT, order_date DATE, amount INT)

Sample data

id | customer_id | order_date | amount
1 | 1 | 2026-01-01 | 10
2 | 1 | 2026-02-01 | 20
3 | 2 | 2026-01-01 | 30
4 | 2 | 2026-02-01 | 25
5 | 3 | 2026-01-01 | 5

Discussion

No discussions yet.

Rewards ยท v2.1

Join Shalyam Newsletter

Get exclusive insights with every issue: education, research and innovation news.

One email a week. Unsubscribe any time.