mysql> select date_format(when,'h') as hour,       
      count(*) from access_log group by hour;

+-------+---------------+
| hour 	|  count(*)     |
+-------+---------------+
| 00    |    43         |
| 01    |    6          |
| 02    |    29         |
| 03    |    37         |
| 04    |    20         |
| 05    |    16         |
| 06    |    59         |
| 07    |    12         |
| 08    |    26         |
| 09    |    199        |
| 10    |    209        |
| 11    |    187        |
| 12   	|    261        |
| 13   	|    586        |
| 14   	|    239        |
| 15   	|    261        |
| 16   	|    283        |
| 17   	|    248        |
| 18   	|    74         |
| 19   	|    44         |
| 20   	|    29         |
| 21   	|    195        |
| 22   	|    126        |
| 23   	|    62         |
+-------+---------------+
24 rows in set (0.27 sec)