I have a query that I want to get data from the past 5 quarters, but it doesn't work the way it should:
select to_char(eventdate,'YYYY') || ' Q-' || to_char(eventdate, ' Q'), ...
from ...
where eventdate between (sysdate - 458) and sysdate
It doesn't do what I want. How do I make sure I get all rows for the current quarter and the last 4, no matter what day of the quarter it is?
Asked by mike628
(171 rep)
Dec 30, 2011, 01:17 PM
Last activity: May 10, 2024, 05:50 PM
Last activity: May 10, 2024, 05:50 PM