Order Status Percentage
Medium
Aggregation & GROUP BY
For each order status return the number of orders and the percentage of all orders it represents, rounded to two decimals. Order by order_count descending.
Table schema
Orders(id INT PRIMARY KEY, status VARCHAR(20))Sample data
id | status
1 | Delivered
2 | Delivered
3 | Cancelled
4 | Delivered
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.