GROUP_CONCAT() 函数学到了!
SELECT sell_date,
COUNT(DISTINCT product) num_sold,
GROUP_CONCAT(DISTINCT product) products
FROM Activities
GROUP BY sell_date
作者:austism-s
链接:https://leetcode.cn/problems/group-sold-products-by-the-date/solution/by-austism-s-06u1/
来源:力扣(LeetCode)
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。