with m as( select t.*, row_number(partition by trunc(report_date, 'mm') order by report_date desc) rn from t ) select * from m where rn = 1
select * from temp where temp.date in (select last_day(add_months(trunc(sysdate),-rownum+1)) from all_objects where rownum<to_number(to_char(sysdate,'mm'))+1000);
select t.*, row_number(partition by trunc(report_date, 'mm') order by report_date desc) rn
from t
)
select * from m where rn = 1