select last_day(DATE_SUB(now(),INTERVAL 1 MONTH)) #The date of the last day of the last month%Y-%m-%d select last_day(curdate()) #The date of the last day of the month%Y-%m-%d
select last_day(DATE_SUB(now(),INTERVAL 1 MONTH)) #The date of the last day of the last month%Y-%m-%d select last_day(curdate()) #The date of the last day of the month%Y-%m-%d