I'm trying to count registred user per day in one week, i have this sql code and it works fine but it doesn't count users per day.
SELECT DATE(date_inscrit) date, COUNT(DISTINCT id) totalCount
FROM Clients
WHERE DATE(date_inscrit) >= CURDATE() - INTERVAL 7 day
GROUP BY DATE(date_inscrit)
order by id desc
it returns only date where there is registred users.
- 2015-09-08 => 3
2015-09-08 => 3
i want to get somthing like this:
- 2015-09-09 => 0
- 2015-09-08 => 3
- 2015-09-07 => 0
...