Esto puede ayudarte:
http://stackoverflow.com/questions/15708027/mysql-select-hour-in-datetime-and-grouphttps://stackoverflow.com/questions/15708027/mysql-select-hour-in-datetime-and-group
SELECT HOUR(ShoppingDate), COUNT(*) FROM YourTable
GROUP BY HOUR(ShoppingDate)
Publicado originalmente por @JonSkeet