I\'ve got a monitoring system that is collecting data every n seconds (n is approximately 10 but varies). I\'d like to aggregate the collected data by 15 minute intervals.
I was not satisfied by GROUP BY.
SELECT datetime FROM table WHERE MOD(MINUTE(TIME(datetime)),15) = 0 AND SECOND(TIME(datetime)) = 0;