diff --git a/sqlzoo/BiggerThanEurope.sql b/sqlzoo/BiggerThanEurope.sql index bb32f52..cc6cda5 100644 --- a/sqlzoo/BiggerThanEurope.sql +++ b/sqlzoo/BiggerThanEurope.sql @@ -1,7 +1,8 @@ -SELECT name -FROM world -WHERE gdp > - (SELECT - MAX(gdp) - FROM world - WHERE continent LIKE 'Europe') \ No newline at end of file +SELECT w.name +FROM world w +JOIN ( + SELECT MAX(w2.gdp) AS max_gdp + FROM world w2 + WHERE w2.continent = 'Europe' +) europe_max +ON w.gdp > europe_max.max_gdp;