Orders With Multiple Conditions
Easy
Filtering & Sorting
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.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.