This doesn't look like Oracle SQL to me.
But this is how I would take a similar approach to find the start and end of a previous month:
select trunc(add_months(datefield, -1), 'MONTH') first_day,
last_day(trunc(add_months(datefield, -1), 'MONTH')) last_day
from mytable;