Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> subtotaling by weekly

subtotaling by weekly

From: ram <ramanavg_at_gmail.com>
Date: 1 Mar 2006 10:16:08 -0800
Message-ID: <1141236968.251662.158810@e56g2000cwe.googlegroups.com>


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

  1. I'v need to get this of the by using above formula at the end of the weekday. I got it from the above query. logic : sum (colvol*coldur)/sum(colvol).

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US