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

Orders With Multiple Conditions

Return orders that are either (status = 'Pending' and amount > 100) or (status = 'Shipped' and order_date in 2026). Order by id.

Table schema

Orders(id INT PRIMARY KEY, status VARCHAR(20), amount INT, order_date DATE)

Sample data

id | status | amount | order_date
1 | Pending | 150 | 2026-01-01
2 | Pending | 50 | 2026-01-02
3 | Shipped | 20 | 2026-02-01
4 | Shipped | 90 | 2025-12-31

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.