Problem
Operations dashboards for e-commerce and logistics platforms show a live breakdown of order fulfillment stages — how many orders are pending, in transit, delivered, or cancelled. This snapshot helps teams spot bottlenecks: if "pending" has thousands of orders while "shipped" has very few, something is likely wrong in the picking or dispatch process. Using the orders table, return status and order_count (number of orders in that status), ordered by order_count descending.
Schema
orders
| column | type |
|---|
| id | INTEGER |
| customer_id | INTEGER |
| amount | NUMERIC |
| status | TEXT |
| created_at | DATE |
Sample Data
| id | customer_id | amount | status |
|---|
| 1 | 1 | 50.00 | shipped |
| 2 | 2 | 30.00 | pending |
| 3 | 3 | 20.00 | shipped |
| 4 | 4 | 10.00 | cancelled |
Expected Output
| status | order_count |
|---|
| shipped | 2 |
| pending | 1 |
| cancelled | 1 |