DROP EVENT IF EXISTS `job_stat_issue_monthly`;
delimiter ;;
CREATE EVENT `job_stat_issue_monthly`
ON SCHEDULE
EVERY '1' MONTH STARTS '2023-02-01 01:00:00'
DO CALL pro_stat_issue('issue_monthly', DATE_ADD(LAST_DAY(DATE_SUB(NOW(), INTERVAL 2 MONTH)), INTERVAL 1 DAY), LAST_DAY(DATE_SUB(NOW(), INTERVAL 1 MONTH)))
;;
delimiter ;