Answer the question
In order to leave comments, you need to log in
Compare 1 row (namely a field) with n other fields, how?
Hello, I have this request:
SELECT name FROM world
WHERE gdp > (SELECT gdp FROM world WHERE continent = 'Europe')
Answer the question
In order to leave comments, you need to log in
Depends on what you want to select and what your query returns.
If you need to select records whose gdp is greater than the maximum for records with continent = 'Europe', then this is done
SELECT name FROM world
WHERE gdp > (SELECT MAX(gdp) FROM world WHERE continent = 'Europe')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question