Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: select rows matching a condition in each group
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 DBAReceived on Fri Dec 26 2003 - 09:40:35 CST
![]() |
![]() |