The orders table contains order amounts.
Return order_id, amount for orders whose amount is the second-highest distinct amount. If multiple orders share that amount, return all of them. Sort by order_id ascending.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
orders5 rows| order_id (int) | amount (double) |
|---|---|
| 1 | 50 |
| 2 | 80 |
| 3 | 20 |
| 4 | 80 |
| 5 | 60 |
Column names and order must match. Sort order is specified in the question.