The orders table contains quantity, unit price, and a percentage discount.
Return order_id, total_amount, where total_amount is quantity * unit_price * (1 - discount_pct / 100), 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) | quantity (int) | unit_price (double) | discount_pct (int) |
|---|---|---|---|
| 1 | 2 | 50 | 10 |
| 2 | 1 | 120 | 0 |
| 3 | 4 | 25 | 20 |
| 4 | 3 | 40 | 25 |
| 5 | 5 | 10 | 50 |
| 6 | 2 | 75 | 15 |
Column names and order must match. Sort order is specified in the question.