Hi: I am on Oracle 12c and I have this query that I like to modify. Instead of going forward 12 months, I would like to modify it to go backward 12 months from a given date.
Thank you.
SELECT LEVEL AS num, TO_CHAR ( ADD_MONTHS (to_date('9/5/2020','mm/dd/yyyy'), LEVEL - 1) ,'MON_YY') AS str, sysdate
FROM dual CONNECT BY LEVEL <= 12