Find Rows Violating a Business Rule
Return the ids of orders whose ship_date is earlier than their order_date. Order by id.
Table schema
Orders(id INT PRIMARY KEY, order_date DATE, ship_date DATE)Sample data
id | order_date | ship_date
1 | 2026-01-01 | 2026-01-03
2 | 2026-01-05 | 2026-01-04
3 | 2026-01-10 | 2026-01-10
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.