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 -> sql help - group by with subselect

sql help - group by with subselect

From: ed zappulla <zappullae_at_rcn.com>
Date: Tue, 24 Apr 2001 09:19:01 -0400
Message-ID: <9c3u9j$sk$1@bob.news.rcn.net>

Does anyone know why I can't use the country or state in the group by?

SQL>
 select airport_cd,
(select country.name from country where country_id=airport.country_id) as
country,
(select state.name from state where state_id=airport.state_id) as state,
  city
  from airport,
 group by airport_cd, country, state
  order by airport_cd
 ;
group by vendor.name, airport_cd, country, state

                                                       *
ERROR at line 9:
ORA-00904: invalid column name Received on Tue Apr 24 2001 - 08:19:01 CDT

Original text of this message

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