Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> subtotaling by weekly
Hi all,
I've problem by getting the subtotals by weekly for a month.
here the data.
wkday colvol coldur
1 10 2
2 20 3
3 30 4
4 40 5
5 50 6
6 60 7
7 70 8
6
select wkday,colvol,coldur, null as colavg from gt_test
union
select null,null,null,(sum(colvol*coldur)/sum(colvol))colav
from gt_test
My question is can i do the above by using cube and rollup?
2.If I have the data for the month how to do it? currently I'm getting for the week.
Pls help me out.
Appreciated your help.
thanks & regards,
ramana.
Received on Wed Mar 01 2006 - 12:16:08 CST
![]() |
![]() |