I have a sql query that takes a date parameter (if I were to throw it into a function) and I need to run it on every day of the last year.
Does anyone know of an easy way to generate a list of the last 365 days so I can use straight-up sql to do this?
Obviously generating a list 0..364 would work too since I could always
select SYSDATE - val from (...);