SQLZOO翻译及其代码答案(2021/1/17更)
SQL入门小白的练习作业整理(●’◡’●) 目录 0 SELECT basics 1 SELECT names 2 SELECT from World 3 SELECT from Nobel 4 SELECT within SELECT 5 SUM and COUNT 6 JOIN 7 More Join operations 0 SELECT basics 表: world(name,continent.area,population,gdp,capital) #1(考察where) 列出德国的人口 SELECT population FROM world WHERE name = 'Germany' ; #2(考察in) 列出’Sweden’, ‘Norway’ 和 'Denmark’地区的名字和人口 SELECT name , population FROM world WHERE name IN ( 'Sweden' , 'Norway' , 'Denmark' ) ; #3(考察between) 列出面积为200000-250000之间的国家名和面积 SELECT name , area FROM world WHERE area BETWEEN 200000 AND 250000 ; 1 SELECT names 表: world(name,continent.area