给定一个表
问题:Some countries have populations more than three times that of any of their neighbours (in the same continent). Give the countries and continents.
答案:select name,continent from world as y
where population > ALL
(select population*3 from world as x where
x.continent = y.continent
AND x.name <>y.name )
疑问:
为什么最后要给一个限定条件 AND x.name <>y.name 否则输出的结果就是为空的呢?
原题的链接在