Hvis du antager, at du har flere ordrer end datoer, kunne noget som dette fungere:
select date, count(id) as orders
from
(
SELECT DATE_ADD('2008-01-01', INTERVAL @rn:[email protected]+1 DAY) as date from (select @rn:=-1)t, `order` limit 365
) d left outer join `order` using (date)
group by date