MySQL🐬89.2% FASTER🏎💨
Approach\n Describe your approach to solving the problem. \nThe challange of this problem is how to aggregate the product names in one cell. So we use GROUP_CON
# Approach\n<!-- Describe your approach to solving the problem. -->\nThe challange of this problem is how to aggregate the product names in one cell. So we use `GROUP_CONCAT()` to aggregate distinct product names with a separator \',\' and also sort the product names. The rest is simple, we group by sell_date and COUNT DISTINCT product.\n\n# Code\n```\nSELECT \n    sell_date, \n    COUNT(DISTINCT product) as num_sold,\n    GROUP_CONCAT(DISTINCT product ORDER BY product ASC SEPARATOR \',\') as products\nFROM Activities\nGROUP BY sell_date\nORDER BY sell_date;\n```\n## Give it a **Upvote** If You Like My Explanation.\n### Have a Great Day/Night.
['MySQL']