MYSQL 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); every N hoursGroup dataGroup data in MySQLGroup data in MySQL every N hoursMYSQL Share