Using GROUP_CONCAT | Easy Understanding | SQL
The main problem here is to concatenate the distinct products that were sold on a particular date. \n\nWe can do that by using GROUP_CONCAT keyword.\nWe provide
The main problem here is to concatenate the distinct products that were sold on a particular date. \n\nWe can do that by using ```GROUP_CONCAT``` keyword.\nWe provide the `DISTINCT` keyword in both count and group_concat functions because we don\'t want any duplicate records to mess with our counts. (Question does mention that duplicate entries might be present).\n\n## Query:\n\n```sql\n\nselect sell_date, count(distinct product) as num_sold, group_concat(distinct product order by product) as products from Activities group by sell_date order by sell_date\n\n```
['MySQL']