본문 바로가기
SQL

leetcode 1484. Group Sold Products By The Date

by 무적김두칠 2022. 3. 30.

1
2
3
4
5
6
7
# Write your MySQL query statement below
select 
    sell_date, COUNT(DISTINCT product) num_sold, 
    group_concat(DISTINCT product) products 
from Activities
group by sell_date
order by sell_date
cs
반응형

댓글