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
Przykładowy oczekiwany wynik
Tak wygląda poprawna odpowiedź — liczba jej wierszy jest swoista i nie musi odpowiadać tabelom ze schematu.
| id |
|---|
| 10 |
| 11 |
| 12 |
Zaloguj się, aby zobaczyć historię rozwiązań
Zaloguj sięZaloguj się, aby korzystać z Mentora AI
Zaloguj się