✅ ✅ Best Solution Using Group By , Group_concat
Please Upvote if you Like it\n##### The GROUP BY statement groups rows that have the same values into summary rows.\n#####  The GROUP BY statement is often used
#### **Please Upvote if you Like it**\n##### The GROUP BY statement groups rows that have the same values into summary rows.\n#####  The GROUP BY statement is often used with aggregate functions (COUNT(), MAX(), MIN(), SUM(), AVG()) to group the result-set by one or more columns.\n##### Another group method we use is **GROUP_CONCAT**, which concat items of grouped rows and joins them by using "," seperator. \n```\nSELECT sell_date,\n\t\tCOUNT(DISTINCT(product)) AS num_sold, \n\t\tGROUP_CONCAT(DISTINCT product ORDER BY product ASC) AS products\nFROM Activities\nGROUP BY sell_date\nORDER BY sell_date ASC\n```
[]