Statuses as One List
The operations filter looks for orders with status = 'paid' or status = 'pending', but the condition has grown into repeated checks of the same field. Rewrite it as one allowed-status list and return order id values in ascending order.
Original query
SELECT id FROM orders WHERE status = 'paid' OR status = 'pending' ORDER BY id
Expected output sample
This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.
| id |
|---|
| 10 |
| 11 |
| 12 |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in