The orders table contains subtotals and shipping fees.
Return order_id, shipping_pct, where shipping_pct is shipping as a percentage of the total order value (subtotal + shipping_fee), rounded to 2 decimal places. Sort by order_id ascending.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
orders6 rows| order_id (int) | subtotal (double) | shipping_fee (double) |
|---|---|---|
| 1 | 40 | 5 |
| 2 | 12.5 | 3.5 |
| 3 | 99.99 | 0 |
| 4 | 7.25 | 2.75 |
| 5 | 150 | 12.5 |
| 6 | 23.4 | 4.6 |
Column names and order must match. Sort order is specified in the question.