with temps as(select to_char(add_months(sysdate,-level),'yyyyMM') mon from dual connect by level<13) select * from temps