Re: Select f1, min(f2) ????
From: Ron Moeller <rmoeller_at_ladc.lockheed.com>
Date: 1996/05/14
Message-ID: <4naen4$qk_at_butch.lmsc.lockheed.com>#1/1
Date: 1996/05/14
Message-ID: <4naen4$qk_at_butch.lmsc.lockheed.com>#1/1
Konstantin Kivi <kivi_at_glas.apc.org> wrote:
>...
>I don't like the following because I think
>that it may be done more efficiently, because
>f1 is found at the time of subquery.
>
>select f1, f2 from t1 where f2=min( select f2 from t1
> where (<<criteria>>));
>
>For simplicity lets assume that all f2 are different.
>...
Try using the "having" clause:
select f1, f2
from t1
where <<criteria>>
having f2=min(f2);
Ron can't jump Received on Tue May 14 1996 - 00:00:00 CEST