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

Customers Active in Both 2025 and 2026

Return the customer_ids that placed at least one order in 2025 and at least one order in 2026. Order by customer_id.

Table schema

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

Sample data

id | customer_id | order_date
1 | 1 | 2025-06-01
2 | 1 | 2026-01-10
3 | 2 | 2025-03-03
4 | 3 | 2026-02-02

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.