The order_items table records quantities ordered.
Return order_id, product_id, quantity for order lines with a quantity of at least 4. Sort by order_id, then product_id ascending.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
order_items7 rows| order_id (int) | product_id (string) | quantity (int) |
|---|---|---|
| 1 | P1 | 4 |
| 1 | P2 | 2 |
| 2 | P3 | 5 |
| 3 | P1 | 3 |
| 4 | P4 | 7 |
| 5 | P5 | 4 |
| 6 | P6 | 1 |
Column names and order must match. Sort order is specified in the question.