Hi Folks,
I have a query to sumarize data up, and I've been using the trunc() function to group by week.
My problem is, this only groups the weeks up until the end of the month. So my graph shows a 4x7day rows then one 2 or 3 day row for the end of that month.
How can I get a clean, consistant grouping of 7 day blocks ? When I graph the results in Excel, the looks all wonky because of the dips at the end of month.
My code currently looks like this:
I have a query to sumarize data up, and I've been using the trunc() function to group by week.
My problem is, this only groups the weeks up until the end of the month. So my graph shows a 4x7day rows then one 2 or 3 day row for the end of that month.
How can I get a clean, consistant grouping of 7 day blocks ? When I graph the results in Excel, the looks all wonky because of the dips at the end of month.
My code currently looks like this:
Code:
select trunc(creat_dt,'WW') as "week",
orgn,
count(load_tm)
from cs_page_load_tm
where trunc(creat_dt,'WW') > trunc(sysdate,'WW') - (26 * 7)
group by trunc(creat_dt,'WW') , orgn