SELECT name FROM world WHERE population > (SELECT population FROM world WHERE name='Russia') 2.显示人均GDP高于“英国”的欧洲国家 select name from world where continent='Europe' and (gdp/population> ( select gdp/population from world where name='United Kingdom' ) ) 3.列出包含阿根廷或澳大利亚...
SELECT continent, name, area FROM world x WHERE x.area >= ALL(SELECT y.area FROM world y WHERE y.continent=x.continent AND area>0)8、List each continent and the name of the country that comes first alphabetically. select continent,name from world x where x.name=(select y.name from wo...
select name, concat(round(population/(select population from world where name ='Germany')*100,0),'%') as percentofGermany from world where continent='Europe' 6. Which countries have a GDP greater than every country in Europe? SELECT name FROM world WHERE GDP > ALL(SELECT GDP FROM world ...
select continent,name from world x where name = (select name from world y WHERE x.continent = y.continent order by name limit 1) 9.找出洲份,當中全部國家都有少於或等於 25000000 人口. 在這些洲份中,列出國家名字name,continent洲份和population人口。 SELECT name,continent,population FROM world x...
select GDP from world where continent = 'Europe' and GDP > 0) 7. Find the largest country (by area) in each continent, show the continent, the name and the area. SELECT continent, name, area FROM world x WHERE area >= ALL (SELECT area FROM world y WHERE x.continent = y.continen...
sqlzoo练习答案--SELECTwithinSELECTTutorial This tutorial looks at how we can use SELECT statements within SELECT statements to perform more complex queries.name continent area population gdp Afghanistan Asia6522302550010020343000000 Albania Europe28748283174112960000000 Algeria Africa238174137100000188681000000 Andorra ...
I am currently doing this tutorial (http://sqlzoo.net/wiki/SELECT_within_SELECT_Tutorial) and I can't answer question 8 : Some countries have populations more than three times that of any of their neighbours (in the same continent). Give the countries and continents. ...
sqlzoo-SELECT within SELECT参考答案 1、列出每個國家的名字 name,當中人口 population 是高於俄羅斯’Russia’的人口。 2、列出歐州每國家的人均GDP,當中人均GDP要高於英國’United Kingdom’的數值。 3、在阿根廷Argentina 及 澳大利亞 Australia所在的洲份中,列出當中的國家名字 name 及洲分 continent 。按國字...
SELECT name,continent,population from world as x where 25000000 >= all(select population from world as y where x.continent = y.continent)解法2:SELECT name,continent,population from world as x where 25000000 >= (select max(population) from world as y where x.continent = y.continent)...
第4关SELECT within SELECT Tutorial - SQLZOO 练习select嵌套select,也就是子查询。 -- List each country name where the population is larger than that of 'Russia'.-- 练习where子查询, 从子查询里筛选数值。selectnamefromworldwherepopulation>(selectpopulationfromworldwherename='Russia')-- Show the coun...