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: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Fri, 26 Dec 2003 16:40:35 +0100
Message-ID: <lilouvgij3pbqe9o8kcft6idfrav37phe7@4ax.com>


On Fri, 26 Dec 2003 12:53:57 GMT, "VC" <boston103_at_hotmail.com> wrote:

>> You actually don't need a GROUP BY to accomplish this
>>
>> select *
>> from t x
>> where
>> t.cb = (select min(cb)
>> from t y
>> where y.ca = x.ca
>> )
>
>Actually, the SQL above won't work.

Are you sure? Did you try it? I doubt it. Worked for me numerous times.

--
Sybrand Bakker, Senior Oracle DBA
Received on Fri Dec 26 2003 - 09:40:35 CST

Original text of this message

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