Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: select rows matching a condition in each group

Re: select rows matching a condition in each group

From: VC <boston103_at_hotmail.com>
Date: Fri, 26 Dec 2003 16:31:05 GMT
Message-ID: <cnZGb.656199$HS4.4674364@attbi_s01>


If you want to avoid using analytics, then a more performant version would be:

select *
from t
where
 (cb,cc) in (select cb, min(cc) from t group by cb)

... because it avoid the correlated subquery in your version.

Rgds.

VC Received on Fri Dec 26 2003 - 10:31:05 CST

Original text of this message

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