Write a SQL query that counts the number of orders per status, ordered
alphabetically by status.
Table: `orders`
| id | customer | amount | status |
|---|---|---|---|
| 1 | Alice | 120 | completed |
| 2 | Bob | 80 | completed |
| 3 | Alice | 200 | completed |
| 4 | Carol | 150 | pending |
| 5 | Bob | 90 | pending |
Expected output (columns: status, count)
completed|3
pending|2SQLite output format — rows are pipe-separated (
|) with no column headers.Example:
SELECT id, name FROM users WHERE id = 1→1|Alice
Sample tests