The orders table records individual purchases.
Return customer_id, order_count for customers who placed at least 2 orders. Sort by order_count descending, then customer_id ascending.
These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].
orders7 rows| order_id (int) | customer_id (int) | amount (double) |
|---|---|---|
| 1 | 101 | 20 |
| 2 | 102 | 30 |
| 3 | 101 | 15 |
| 4 | 103 | 50 |
| 5 | 102 | 10 |
| 6 | 101 | 25 |
| 7 | 104 | 5 |
Column names and order must match. Sort order is specified in the question.