假设你有比日期更多的订单这样的东西可以工作:
select date, count(id) as orders from ( SELECT DATE_ADD('2008-01-01', INTERVAL @rn:=@rn+1 DAY) as date from (select @rn:=-1)t, `order` limit 365 ) d left outer join `order` using (date) group by date