SQL Server CLEAN & EASY
\nWITH CTE AS (\n  SELECT DISTINCT * FROM Activities\n)\n\nSELECT \nsell_date,\nCOUNT(product) AS num_sold,\nSTRING_AGG(product, \',\') WITHIN GROUP (ORDER BY p
```\nWITH CTE AS (\n  SELECT DISTINCT * FROM Activities\n)\n\nSELECT \nsell_date,\nCOUNT(product) AS num_sold,\nSTRING_AGG(product, \',\') WITHIN GROUP (ORDER BY product ASC) AS products\nFROM CTE\nGROUP BY sell_date\nORDER BY 1 ASC\n```
[]