Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
select DATE(feed_date) as date, IFNULL(COUNT(id),0) as count from table where id = 8671 group by DATE(feed_date);
id当在特定日期没有条目时,我希望“0”作为我的结果中的条目。
id
select DATE(feed_date) as fdate, SUM(id = 8671) as count from table group by fdate