SV: Is it possible to group by an interval?

2001-08-22 Thread Johan Nilsson
Is it possible for me to do a SELECT COUNT(*) and GROUP BY the answers based on a INTERVAL e.g. HOUR? the e.g. table data: ++ | id | time | ++ | 1 | 08:30 | | 2 | 09:30 | | 3 | 09:31 | | 4 | 09:32 | ++ The answer I want from the e.g. data above

RE: SV: Is it possible to group by an interval?

2001-08-22 Thread Don Read
On 22-Aug-2001 Johan Nilsson wrote: Is it possible for me to do a SELECT COUNT(*) and GROUP BY the answers based on a INTERVAL e.g. HOUR? snip SELECT HOUR(time) as hour,count(*) as cnt FROM foo GROUP BY hour; Thanks, but I wrote a bad test data =( +---+ | id |