I have the following query:
SELECT count,date FROM clicks WHERE page_id = ? AND date >= DATE(NOW()) - INTERVAL 7 DAY
This works, but it only fetches the days where I have clicks (counted).
For example (records in database):
Date Count
01/01/2018 1
03/01/2018 3
04/01/2018 2
05/01/2018 3
07/01/2018 3
In this example, 02/01/2018 and 06/01/2018 are not fetched because they don't exist in the database.
My question is now: can I 'add' these dates with SQL and add a count '0' to them?