MYSQL No Comments 03 Tue Group data in MySQL every N hours Group data in MySQL every N hours Using the hour to aggregate.. in this example every 3 hours. select * from tbl_sometable group by floor(hour(time) / 3);