I have the following query :
select
ADDDATE(LAST_DAY(SUBDATE(CURDATE(), INTERVAL 1 MONTH)), 1) primeiro_dia,
last_day(sysdate()) ultimo_dia
That returns me the first and last day of the current month according to the system date. How could I return the first and last day of the previous month according to the system date too?