WITH T AS
(SELECT rownum-1 rn FROM DUAL CONNECT BY rownum<=(select TO_NUMBER(to_char(last_day(sysdate),'dd')) from dual))
SELECT
TO_CHAR(last_day(sysdate) - rn,'yyyy-MM-dd') da
FROM T
(SELECT rownum-1 rn FROM DUAL CONNECT BY rownum<=(select TO_NUMBER(to_char(last_day(sysdate),'dd')) from dual))
SELECT
TO_CHAR(last_day(sysdate) - rn,'yyyy-MM-dd') da
FROM T