SQL query with detailed explanation ||SQL
GROUPCONCAT() is used to concatenat data from multiple rows into one field\nstep 1: First we will count distinct products and name the column as num_sold\nstep 
##### **GROUPCONCAT() is used to concatenat data from multiple rows into one field**\n***step 1*: First we will count distinct products and name the column as num_sold\n*step 2*: Next we use group concat to get the disctinct products and to display them in a column with a seperator(,) and order by products and name the column as products\n*step 3*: We will group them by sell_date**\n\n\n```\nselect sell_date,count(distinct(product)) as num_sold, GROUP_CONCAT(distinct product order by product asc) as products\nfrom Activities\ngroup by sell_date\n```\n\nUpvote this if you find it useful\nThanks
['MySQL']