Is there an easy way to do a GROUP BY DATE(timestamp) that includes all days in a period of time, regardless of whether there are any records associated with that date?
Basically, I need to generate a report like this:
24 Dec - 0 orders 23 Dec - 10 orders 22 Dec - 8 orders 21 Dec - 2 orders 20 Dec - 0 orders
Instead of using GROUP BY, make a table (perhaps a temporary table) which contains the specific dates you want, for example:
Then, join that table to the Orders table.