mysql question
Posted: Thu Jan 29, 2009 12:11 pm
Hi,
I want an sql statement for last week, month etc
When I run this i get all, but how do I limit it for last week last month?
I have this
Select sum(verbruik), YEAR(time) AS jaar, WEEK(time,5) AS week, DAY(time) AS day from rfxpower group by jaar, week, day
I want an sql statement for last week, month etc
When I run this i get all, but how do I limit it for last week last month?
I have this
Select sum(verbruik), YEAR(time) AS jaar, WEEK(time,5) AS week, DAY(time) AS day from rfxpower group by jaar, week, day