I\'m building a chart and I want to receive data for each month.
Here\'s my first request which is working:
SELECT s.GSP_nom AS nom, timestamp, AVG
As suggested by A Star, I always use something along the lines of:
DATE(NOW()) - INTERVAL 1 MONTH
Similarly you can do:
NOW() + INTERVAL 5 MINUTE "2013-01-01 00:00:00" + INTERVAL 10 DAY
and so on. Much easier than typing DATE_ADD or DATE_SUB all the time :)!
DATE_ADD
DATE_SUB