An e-commerce operations team monitors fulfillment health by checking how many orders sit in each status at any point in time. A spike in "pending" orders or a drop in "shipped" orders can signal a warehouse bottleneck. Using the orders table, return the number of orders in each status as order_count, sorted by order_count descending.
orders
| column | type |
|---|---|
| id | INTEGER |
| customer_id | INTEGER |
| status | TEXT |
| total | NUMERIC |
| id | customer_id | status | total |
|---|---|---|---|
| 1 | 1 | shipped | 120.00 |
| 2 | 2 | pending | 45.00 |
| 3 | 1 | pending | 89.50 |
| 4 | 3 | cancelled | 30.00 |
| 5 | 2 | shipped | 200.00 |
| 6 | 4 | pending | 15.00 |
| status | order_count |
|---|---|
| pending | 3 |
| shipped | 2 |
| cancelled | 1 |
Three orders are pending, two are shipped, and one is cancelled. Results are sorted by count descending so the most common status appears first.