Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Group By
"roy fells" <molson_c_at_hotmail.com> wrote in message
news:9c6rk302f6d_at_enews2.newsguy.com...
> Hey All,
> I have an element in my select statement (2 to be exact) that I don't want
> to group by but when I try to execute the query it says the element is not
a
> group by expression. How do I make elements so that I can query without
> including them in a group by statement??
> Thanks for your help.
>
> Roy Fells
>
>
a somewhat ugly solution but it definitely will work
select a.group by column, b.non group by column, a.aggregate column
from
(select group by column, aggregate function
from table
group by group by column )
, table b
where b.group by_column = a.group by column
Hth,
Sybrand Bakker, Oracle DBA Received on Wed Apr 25 2001 - 15:27:13 CDT