use monitor;
DROP TABLE IF EXISTS call_back;
DROP TABLE IF EXISTS error_back;
DROP TABLE IF EXISTS event_back;
DROP TABLE IF EXISTS metric_back;
DELETE FROM call_record WHERE create_time<UNIX_TIMESTAMP(DATE_ADD(CURDATE(), INTERVAL -3 MONTH));
DELETE FROM error_record WHERE create_time<UNIX_TIMESTAMP(DATE_ADD(CURDATE(), INTERVAL -3 MONTH));
DELETE FROM event_record WHERE create_time<UNIX_TIMESTAMP(DATE_ADD(CURDATE(), INTERVAL -3 MONTH));
DELETE FROM metric_record WHERE start_time<UNIX_TIMESTAMP(DATE_ADD(CURDATE(), INTERVAL -3 MONTH));