I am trying to count the entries in my table and group them by date. My current query looks something like this:
SELECT
count(*),
MONTH(time) as month,
YEAR(time) as year
FROM
myTable
GROUP BY
month, year
ORDER BY
year, month
This works, except that I would also like to receive an invoice for several months where there are no entries.
Can anyone offer tips / suggestions on how to do this?
source
share