The orders table contains one row per order.
Return status, order_count with the number of orders in each status. Sort by status ascending.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
orders7 rows| order_id (int) | status (string) |
|---|---|
| 1 | delivered |
| 2 | pending |
| 3 | delivered |
| 4 | cancelled |
| 5 | delivered |
| 6 | pending |
| 7 | returned |
Column names and order must match. Sort order is specified in the question.