Leetcode Mysql Group Sold Products by the Date

Group Sold Products By The Date - LeetCode
https://leetcode.com/problems/group-sold-products-by-the-date/

  • Go 言語で取り組んだメモ

回答

SIMPLE | Explanation | EASY - Group Sold Products By The Date - LeetCode
https://leetcode.com/problems/group-sold-products-by-the-date/solutions/2139850/simple-explanation-easy/

select sell_date, count( DISTINCT product ) as num_sold ,
    GROUP_CONCAT( DISTINCT product order by product ASC separator ',' ) as products
        FROM Activities GROUP BY sell_date order by sell_date ASC;