MySQL Order by Product name AND Sell date
In June 2024, I realized the first upvoted solution (by @babasaheb256), is an EXACT COPY word by word of my solution. That guy just copies from other people\'s 
___In June 2024, I realized the first upvoted solution (by @babasaheb256), is an EXACT COPY word by word of my solution. That guy just copies from other people\'s solutions and adds a MEME to them! Check his profile for his other solutions. Dude WTF! Lol___\n\nPlease consider __Upvoting__ my solution to beat his ass and __downvote__ his solution to spread awareness.\n\n_Now, going back to June 2020 when I posted my solution:_\n\nAlmost immediately detected, the only serious challange of this problem is how to aggregate the product names in one cell. In MySql, this can be done using GROUP_CONCAT, in which you can also specify the sorting mechanism for the group concatenation (aggregation). The rest is simple.\n```\nSELECT sell_date,\n\t\tCOUNT(DISTINCT(product)) AS num_sold, \n\t\tGROUP_CONCAT(DISTINCT product ORDER BY product ASC SEPARATOR \',\') AS products\nFROM Activities\nGROUP BY sell_date\nORDER BY sell_date ASC
['MySQL']