問題
https://leetcode.com/problems/group-sold-products-by-the-date/
解いた
GROUP_CONCAT
関数を初めて知った。
SELECT sell_date, COUNT(DISTINCT product) AS num_sold, GROUP_CONCAT(DISTINCT product) AS products FROM Activities GROUP BY sell_date
結果
https://leetcode.com/problems/group-sold-products-by-the-date/
GROUP_CONCAT
関数を初めて知った。
SELECT sell_date, COUNT(DISTINCT product) AS num_sold, GROUP_CONCAT(DISTINCT product) AS products FROM Activities GROUP BY sell_date