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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Grouping / totalling on field change

Re: Grouping / totalling on field change

From: Carlos <miotromailcarlos_at_netscape.net>
Date: 9 Aug 2006 05:50:28 -0700
Message-ID: <1155127828.296979.307590@i42g2000cwa.googlegroups.com>

Ture Magnusson wrote:
> Hello all! I cannot figure out if/how I can do this with an SQL query.
>
> I would like a result which totals the weight for each quality whenever
> the quality changes (based on the order of the ID field).
>
> Original data:
> ID, QUALITY, WEIGHT
> 1, A, 10
> 2, A, 11
> 3, A, 12
> 4, B, 11
> 5, B, 19
> 6, A, 9
> 7, A, 14
> 8, C, 4
> 9, C, 7
>
> Desired result:
> ENDID, QUALITY, WEIGHT
> 3, A, 34
> 5, B, 30
> 7, A, 23
> 9, C, 11
>
> Best regards,
> Ture Magnusson
> Karlstad, Sweden

One more time:

The Wise Man (TK) says: "Analytics rock, analytics roll".

Cheers.

Carlos. Received on Wed Aug 09 2006 - 07:50:28 CDT

Original text of this message

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