Loading problem...
A retail analytics pipeline records one row per observed sale event.
Table: activities
Task: For each sell_date, build a compact daily summary with:
Output requirements:
Supported submission environments:
activities:
| sell_date | product |
|------------|------------|
| 2024-05-30 | Headphone |
| 2024-06-01 | Pencil |
| 2024-06-02 | Mask |
| 2024-05-30 | Basketball |
| 2024-06-01 | Bible |
| 2024-06-02 | Mask |
| 2024-05-30 | TShirt |[
{"sell_date":"2024-05-30","num_sold":3,"products":"Basketball,Headphone,TShirt"},
{"sell_date":"2024-06-01","num_sold":2,"products":"Bible,Pencil"},
{"sell_date":"2024-06-02","num_sold":1,"products":"Mask"}
]Duplicate rows do not increase num_sold. Product names are deduplicated and listed in lexicographic order per day.
activities:
| sell_date | product |
|------------|---------|
| 2025-01-10 | alpha |
| 2025-01-10 | alpha |
| 2025-01-10 | alpha |
| 2025-01-11 | beta |
| 2025-01-11 | gamma |
| 2025-01-11 | beta |[
{"sell_date":"2025-01-10","num_sold":1,"products":"alpha"},
{"sell_date":"2025-01-11","num_sold":2,"products":"beta,gamma"}
]Each day is computed independently. Repeated appearances of the same product on one day are counted once.
activities:
| sell_date | product |
|------------|---------|
| 2023-09-04 | p2 |
| 2023-09-04 | p10 |
| 2023-09-04 | p1 |
| 2023-09-03 | x |[
{"sell_date":"2023-09-03","num_sold":1,"products":"x"},
{"sell_date":"2023-09-04","num_sold":3,"products":"p1,p10,p2"}
]Lexicographic sorting is string-based, so p10 appears between p1 and p2.
Constraints