select a where min(b)
From: steph <stephan0h_at_yahoo.de>
Date: Tue, 30 Mar 2010 03:40:49 -0700 (PDT)
Message-ID: <a5eebf5c-0520-4479-9aff-ed9aa790b718_at_15g2000yqi.googlegroups.com>
I've got a table STEP defined as (a number, b number). It contains these data:
Date: Tue, 30 Mar 2010 03:40:49 -0700 (PDT)
Message-ID: <a5eebf5c-0520-4479-9aff-ed9aa790b718_at_15g2000yqi.googlegroups.com>
I've got a table STEP defined as (a number, b number). It contains these data:
A,B 1,1 1,2 1,3 4,3 2,3 2,1 5,0
Now I want to find this value of A where B is at it's minimum.
I made up the following SQL:
select a
from step
where b=
(
select min(b)
from step
)
But I suspect there must be a much more elegant way to achieve this. Is there?
thanks,
Stephan
Received on Tue Mar 30 2010 - 05:40:49 CDT