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 -> Re: GROUP BY

Re: GROUP BY

From: Krish <Krishna.Bussu_at_gmail.com>
Date: Fri, 07 Sep 2007 20:23:22 -0000
Message-ID: <1189196602.658949.319680@g4g2000hsf.googlegroups.com>


On Sep 7, 2:55 pm, brenda.belt..._at_gmail.com wrote:
> Hi everybody!
>
> Hope someone can help me with his views about the following issue, i
> will highly appreciate it!
>
> I am trying to query a column that is not in my GROUP BY clause,
>
> SELECT s.store_key,
> r.region_key,
> s.manag_key,
> SUM(sales),
> SUM(cost)
> FROM STORE
>
> WHERE
>
> So, it's obviously complaining. But I need this column, in the result
> set, is there any other way to have this very same column in my
> datagrid without including it in the

you can do that using inline views concept.

example:
create table test(t1 number, t2 number, t3 number)

select ta.t1, ta.t2, tt from test ta, (select t1, sum(t3) as tt from test group by t1) tb
where ta.t1 = tb.t1

Krish. Received on Fri Sep 07 2007 - 15:23:22 CDT

Original text of this message

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