SQL CODE – — intervals in days SET @history_interval = 7; SET @trends_interval = 90; DELETE FROM alerts WHERE (UNIX_TIMESTAMP(NOW()) – clock) > (@history_interval * 24 * 60 * 60); DELETE FROM acknowledges WHERE (UNIX_TIMESTAMP(NOW()) – clock) > (@history_interval * 24 * 60 * 60); DELETE FROM events WHERE (UNIX_TIMESTAMP(NOW()) – clock) > (@history_interval * […]