Hi,
Any idea to optimize the next query:
SELECT
COUNT() - SUM(success) AS failed,
COUNT() AS total,
SUM(success) / COUNT(*) * 100 AS percent,
FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(TIME) / 300) * 300) AS START
FROM reports
GROUP BY FLOOR(UNIX_TIMESTAMP(TIME) / 300) LIMIT 100;
Thanks for the help.