Problem Description –
Write an SQL query to find for each date the number of different products sold and their names.
The sold products names for each date should be sorted lexicographically.
Return the result table ordered by
The query result format is in the following example.
Difficulty Level – Easy
Problem Link – Group Sold Products By The Date
SELECT sell_date, COUNT(DISTINCT product) as num_sold, GROUP_CONCAT(DISTINCT product ORDER BY product) as products FROM Activities GROUP BY 1