0
select DATE(feed_date) as date, 
       IFNULL(COUNT(id),0) as count 
from table 
where id = 8671 
group by DATE(feed_date);

id当在特定日期没有条目时,我希望“0”作为我的结果中的条目。

4

1 回答 1

0
select DATE(feed_date) as fdate, 
       SUM(id = 8671) as count 
from table 
group by fdate
于 2013-09-13T07:05:33.827 回答