Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Group by calculated column?

223563Oct 20 2004 — edited Oct 20 2004
How can one group by a colum that is derived? E.g.

select
a.col1,
a.col2,
(select count(*) from table_b b where b.ix=a.ix) as foo,
count(*)
from
table_a a
group by ??????


Unlike "order by" I cannot simply "group by 1,2,3", and calling out the volumn alias "foo" doesn't work either.




Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2004
Added on Oct 20 2004
2 comments
372 views