1
2
3
4
5
6
7
8
9
10
11
12
mysql> select EXTRACT(HOUR FROM createdate) as hour, count(*) as count from user where left(createdate,10)='2006-03-30' group by hour;
+------+-------+
| hour | count |
+------+-------+
| 0 | 779 |
| 1 | 909 |
| 2 | 488 |
| 3 | 189 |
| 4 | 170 |
| 5 | 285 |
...
...