I have a database that has this
Date - Temp
2013-12-01 - 12
2013-12-31 - 18
Holds 1 month. Im graphing this by JSON in my PHP page. But I want something different, to graph it weekly. Like It will take each 7 days temp average and if I find a suitable sql statement for it, it would be great.
I found this in my pdf.
SELECT Date,Temp COUNT(Date) AS weekly, AVG(Temp) AS Temperature
FROM temp2 GROUP BY Date ORDER BY Date;
But it will take all the 31 days which is not weekly but monthly.
Anyways, is there something you can do?
Thanks.