Hi guys,

I am doing statistics for a web site, and I found myself stuck in a query. The engine is MySQL 5.

I know how to solve it from code, that's not the issue, but I found it puzzling hard to do it entirely in SQL language and I want to learn the answer.

Basically, I have a table with date entries that I have to group the entries every 15 minutes, and have a count of how many entries were in those 15 minutes.

Example of the table:

2007-09-25 10:01
2007-09-25 10:03
2007-09-25 10:05
2007-09-25 10:09
2007-09-25 10:12
2007-09-25 10:14
2007-09-25 10:16
2007-09-25 10:19
2007-09-25 10:21
2007-09-25 10:29

The goal is to return two rows, the first row saying 6 and the second row saying 4.

Ideas on how can this be done by SQL language?

Thanks,
HoraShadow