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 -> ignore use group by for some column

ignore use group by for some column

From: <nova1427_at_gmail.com>
Date: Sat, 8 Dec 2007 07:57:50 -0800 (PST)
Message-ID: <a08d04e6-2db6-4f4f-9e82-c59b29fb06e9@e67g2000hsc.googlegroups.com>


this is first table

Col1	Col2	Col3
A	35	45
C	24	11
B	55	32
A	62	64
K	51	44
C	32	22
A	77	32



I want make this table like following:

Col1	Col2	Col3
A	174	45
A	174	64
A	174	32
C	56	11
C	56	22
B	55	32
K	51	44


you see Col2 is sum deppendent on Col1 and ignore Col3

I can make like this

Col1	Col2
A	174
C	56
B	55
K	51

by this query

Select Col1, sum(Col2) from table group by Col1

put I need Col3 as it is

Please help Received on Sat Dec 08 2007 - 09:57:50 CST

Original text of this message

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