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

Next Order Date

For each order show the customer's next order date (NULL if none). Order by id.

Table schema

Orders(id INT PRIMARY KEY, customer VARCHAR(10), order_date DATE, amount INT)

Sample data

id | customer | order_date | amount
1 | Ann | 2026-01-01 | 100
2 | Ann | 2026-01-11 | 150
3 | Ann | 2026-02-10 | 90
4 | Bob | 2026-01-05 | 200
5 | Bob | 2026-03-05 | 60

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.