I have a report which we only want the last three months of data from the date it's ran. So if I run it today June 9 it will have all data back to March 9. Thanks for your help.
extract(day,current_date-[somenamespace].[somedate])
between
(CASE
WHEN
extract(month,current_date) in (1,7,8,10,12)
THEN 92
WHEN
extract(month,current_date) in (2,4,6,9,11)
THEN 91
WHEN
extract(month,current_date) in (3,5)
THEN 90
ELSE 89
END)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.