i have a tabel whit 5 min counting
Id CntDateTime Cnt1
1 2001-08-01 00:05:00 12
2 2001-08-01 00:10:00 11
3 2001-08-01 00:15:00 10
4 2001-08-01 00:20:00 0
5 2001-08-01 00:25:00 6
6 2001-08-01 00:30:00 14
7 2001-08-01 00:35:00 11
.
.
What i want is to make a Select/group by, so tha i do have 15. min.
countings
The Resultatet of my SELECT shall be:
CntDateTime Cnt1
2001-08-01 00:05:00 33
2001-08-01 00:20:00 20
2001-08-01 00:35:00 xx
It can be made in acces whit this sql-string
SELECT Sum([CountTabel].[cnt1]) AS hmm, Year([CntDateTime]) &
Month([CntDateTime]) & Day([CntDateTime]) & Hour([CntDateTime]) &
Minute([CntDateTime])-(Minute([CntDateTime]) Mod 15)
FROM CountTabel
GROUP BY (Year([CntDateTime]) & Month([CntDateTime]) & Day([CntDateTime]) &
Hour([CntDateTime]) & Minute([CntDateTime])-(Minute([CntDateTime]) Mod 15));
Can anybody translate it to a working SQL-statement
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php