sqlzoo里面有道题如下: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 x
where population >=all(select 3*y.population from world y where y.continent=x.continent and y.population>0 and x.name!=y.name)
请问:为何需要有x.name!=y.name
表: