I'm trying to find which country has highest life expectancy in my database. This is what I have so far:
SELECT Name, MAX(LifeExpectancy)
FROM country
However, this outputs the Max life expectancy, and an irrelevant Country name (I think it's showing the first one alphabetically) rather than the Country that correlates with the max life expectancy.
How do you select the country name with the highest max life expectancy?