Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is it possible to have an outer join with a Group By in the same query ?
Yes it is:
select s.symbol, q.transDate
from symbols s, (select symbol,Max(transDate) transDate
from account group by symbol) q
Gerd Kock
>Is it possible to have an outer join select together with a group by
>in the same query statement ?
>
>Right now, I have to create a temporary table to hold the values from
>one statement and run the 2nd statement like this :
>
>// Load data into the temporary table quick, using a group by
>insert into quick select symbol,Max(transDate) from account group by
>symbol;
>
>// run an outer join select
>select s.symbol, q.transDate from symbols s, quick q where
>s.symbol=q.symbol (+);
>
>I'd be very thankful if someone could show me how to combine these 2
>queries together. Thanks in advance.
Gerd Kock
Baltic IT Service GmbH
Gerd.Kock_at_BITS-on-the.net
Received on Wed Mar 07 2001 - 04:40:56 CST
![]() |
![]() |