adi5402
03-05-2006, 02:37 AM
I have a table called country which has a field called life expectancy I need to ran a query to bring up the names of countrys with both max life expectancy and min life expectancy in one run. I have manged to do this seperately but need help with the single query.
JUST MAX
select continent "Continent",
MAX(LifeExpectancy) "Life Expectancy"
from country
Group by continent asc limit 0,1;
JUST MIN
select continent "Continent",
MIN(LifeExpectancy) "Life Expectancy"
from country
Group by continent desc limit 0,1;
any help will be great
JUST MAX
select continent "Continent",
MAX(LifeExpectancy) "Life Expectancy"
from country
Group by continent asc limit 0,1;
JUST MIN
select continent "Continent",
MIN(LifeExpectancy) "Life Expectancy"
from country
Group by continent desc limit 0,1;
any help will be great