SQL_Zoo icon indicating copy to clipboard operation
SQL_Zoo copied to clipboard

A solution that can be easily understood for question 9

Open satishjasthi opened this issue 8 years ago • 1 comments

select y.name, y.continent, y.population from world as y Join (select continent,max(population) from world group by continent having max(population) <= 25000000) as x on y.continent = x.continent

satishjasthi avatar Aug 03 '17 10:08 satishjasthi

Try this one ;-)

SELECT name, continent, population
FROM world x
WHERE 25000000 > ALL(SELECT population FROM world y WHERE x.continent = y.continent)

AdjWang avatar Mar 01 '21 15:03 AdjWang