I have this simple query that fetches all completed orders between 2 dates(about 6 months at a time):
select IFNULL(sum(o.amount), 0) as amount, o.completed_
This query is complicated due to a number of factors.
The easiest solution might be to add a 0 amount on the first of each month.