Simple question.
I have a query that sums rows grouped by date. Basically, it counts how many membership applications in a day and prints out the results day by day. Naturally, if there are no applications in a day, it doesnt show that row (example below 15th and 17th had no applications.....
Date | Applications
-----------------------------------
12/01/2010 | 44
13/01/2010 | 73
14/01/2010 | 66
16/01/2010 | 102
18/01/2010 | 12
19/01/2010 | 22
I need it to print out the date and 0 for days when there are no applications, so as no days are skipped. Any idea how to do that. I thought of joining to a table with every day of the year, but that seems overkill
The query is below
SELECT
application_date AS Date,
COUNT(*) AS Applications
FROM members
GROUP BY ap_date