I have a query which returns total number of users registered on a particular days in 7 days interval time. I also want to get the zero count data so i can plot it on my graph. How to fetch zero count values?
The query :
select date(update_timestamp) as date, count(*) users
from registered
where date(update_timestamp) between date_sub(sysdate(), interval 7 day) and sysdate()
group by date(update_timestamp)
I had few problems with my query earlier which was solved on this post http://bit.ly/12irdyf .The problem is solved, however i need modification in my query, now i need to show null values as well.
Thanks
best way to keep a calender_table which has got entries for each date for the year.