Here is the query I have
select sender, count(*) as Total, date_format(senttime, '%m - %Y - %d') as Sent_Date
from sendmail sm
left join subuser su
on (sm.sender = su.sub_user)
where senttime <= NOW()
AND senttime >= DATE_SUB(senttime, INTERVAL 7 DAY)
group by date_format(senttime, '%d'), sender
Here is the actual output
It is showing only two dates 21
and 22
but I need 7 dates with total count 0.
How can I do this.