Re: Select f1, min(f2) ????

From: Al Blais <blais_at_nando.net>
Date: 1996/05/13
Message-ID: <4n6hd2$eev_at_castle.nando.net>#1/1


In article <APC&63'0'150a5a49'c02_at_glas.apc.org>, kivi_at_glas.apc.org says...
>
>Hello All
>
>Could someone point out if there a way
>of selecting two fields from the table when one
>field reaches for example its minimum.
>
>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.
>
>
>Konstanti

I'm not really sure about the problem you are having (sub-query ????)

Select f1, MIN(f2) from t1
Where a=b
group by f1
having min(f2) > 8 <--- this is really optional or maybe a parameter

Al
blais_at_nando.net Received on Mon May 13 1996 - 00:00:00 CEST

Original text of this message