MySQl Solution | Group Sold Products By The Date
In this question , we need to group our data based on the selling date  and we need to provide date and number of product sell at that day in the output :\n    
In this question , we need to group our data based on the selling date  and we need to provide date and number of product sell at that day in the output :\n              \n\t\t\t  SELECT \n                         sell_date , \n                         COUNT(DISTINCT product) AS num_sold , \n              FROM activities\n              GROUP BY sell_date \n\t\n\nNow as we need to order the output table based on selling_date so , \n              \n\t\t\t  SELECT \n                        sell_date , \n                        COUNT(DISTINCT product) AS num_sold , \n               FROM activities\n               GROUP BY sell_date \n               ORDER BY sell_date\n     \nAt last we are left with one column where we need to display the name of products which were sold at that day , products need to be display by adding " , " between them for that we had used a fuction :\n\n**Group_concat( column name)** : Function is used to contcat the values and inclued \',\' between them . \n\t\n\t  SELECT \n                 sell_date , \n                 COUNT(DISTINCT product) AS num_sold , \n                 GROUP_CONCAT(DISTINCT product) AS products\n      FROM activities\n      GROUP BY sell_date \n      ORDER BY sell_date
['MySQL']