Query using the Sys_Calendar to return quarterly results

Database

Query using the Sys_Calendar to return quarterly results

Good Afternoon,

Could someone help me create a query that will return quarterly results?  I have one for EOM and Previous Week, now I'm looking for a quarterly view.. Is that possible?

1 REPLY
N/A

Re: Query using the Sys_Calendar to return quarterly results

What exactly are you looking for?

There are already quarter_of_year and quarter_of_calendar columns in sys_calendar.

And a calculation of start and edn of quarter as date would be somehing like

start: ADD_MONTHS(d - (EXTRACT(DAY FROM d)-1), -((EXTRACT(MONTH FROM d) + 2) MOD 3))

end: ADD_MONTHS(d - (EXTRACT(DAY FROM d)-1), -((EXTRACT(MONTH FROM d) + 2) MOD 3)+3) - 1

Dieter