我該如何分組concat?這裏是我的查詢mysql組合concat
select t.date, group_concat(count(*)) from table1 t
group by t.date
,但如果我用這樣的查詢
select t.date, count(*) from table1 t
group by t.date
返回錯誤「無效使用組功能的」
然後返回下面的輸出,但我想GROUP_CONCAT這輸出
2011-01-01 100
2011-01-02 97
2011-01-03 105
那麼,你想要做什麼?沒有理由在結果集上使用GROUP_CONCAT,這就是應用程序語言的作用。 – 2011-04-03 16:19:51
那麼你的最終結果應該是什麼樣子? – 2011-04-03 16:19:55
@馬丁我想這樣的100,97,105 – qwera 2011-04-03 16:30:19