SQLZOO(SELECT from WORLD Tutorial)Writeup

1.

SELECT name, continent, population FROM world

2.

SELECT name FROM world
WHERE population>200000000

3.

select name,gdp/population from world 
where population >=200000000

4.

SELECT name, population/1000000 FROM world WHERE continent = 'South America'

5.

select name,population from world where name in ('France','Germany','Italy')

6.

SELECT name FROM world WHERE name LIKE '%United%'

7.

select name ,population ,area from world 
where area>3000000 or population > 250000000

8.

select name ,population ,area from world 
where (area>3000000 or population > 250000000)
AND name Not in ('United States','India','China')

9.

select name,round(population/1000000,2),round(gdp/1000000000,2) from world where continent='South America'

10

select name,round((gdp/population)/1000)*1000 from world where gdp >=1000000000000

11.

SELECT name,
       CASE WHEN continent='Oceania' THEN 'Australasia'
            ELSE continent END
  FROM world
 WHERE name LIKE 'N%'

12.

暂时没思路

13.

暂时没有思路
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值