I want to count all clicks based on daily level from a date range.
Let's say I want to count all clicks between "2013-05-01" - "2013-05-30" and want the following result to be something like this:
date clicks
2013-05-01 50
2013-05-02 60
2013-05-03 65
2013-05-04 0
etc...
At the moment I've the following SQL call
SELECT count(date) as clicks, date FROM views WHERE uid = $id group by date ORDER BY date DESC
This is working fine, the only problem is, that I don't get all the days in the date range, but only the days where there is clicks. I should be able to get all days, also the days where there is 0 clicks.
Hope someone can help