The sales table records product sales by day.
Return product_id, first_sale_day for each product. Sort by product_id ascending.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
sales8 rows| sale_id (int) | product_id (string) | sale_day (int) |
|---|---|---|
| 1 | P1 | 5 |
| 2 | P1 | 2 |
| 3 | P2 | 1 |
| 4 | P3 | 7 |
| 5 | P3 | 3 |
| 6 | P4 | 4 |
| 7 | P5 | 6 |
| 8 | P5 | 2 |
Column names and order must match. Sort order is specified in the question.