select date_format(store_date, "%Y-%m-%d") as date, count(id) as sum from test group by date
查询时,结果
date sum
2013-07-02 3
2013-07-05 6
2013-07-06 12
请问有没有方法让sum为0的日期显示出来?
...全文
883打赏收藏
sql分组求和
select date_format(store_date, "%Y-%m-%d") as date, count(id) as sum from test group by date 查询时,结果 date sum 2013-07-02 3 2013-07-05 6 2013-07-06 12 请问有没有方法让sum为0的日期显示出来?