leetcode數(shù)據(jù)庫類型:1484.按日期分組銷售產(chǎn)品,難度:簡單
解答:
? ? ? 本題要注意group_concat( [去重:DISTINCT] ‘字符串’ [排序:group by 字符串 asc/desc] 分隔符:seperator ',' ) 將group by產(chǎn)生的同一個分組中的值連接起來,返回一個字符串結(jié)果。 所以最后是對sell_date分組才能達(dá)到效果, group by sell_date。
leetcode數(shù)據(jù)庫類型:1484.按日期分組銷售產(chǎn)品,難度:簡單
解答:
? ? ? 本題要注意group_concat( [去重:DISTINCT] ‘字符串’ [排序:group by 字符串 asc/desc] 分隔符:seperator ',' ) 將group by產(chǎn)生的同一個分組中的值連接起來,返回一個字符串結(jié)果。 所以最后是對sell_date分組才能達(dá)到效果, group by sell_date。