SQLZOO答案1:SELECT_from_WORLD_Tutorial/zh答案

这篇博客提供了SQLZOO中关于从WORLD表进行SELECT查询的教程解答,帮助学习者掌握基础的SQL查询技巧。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

SELECT name, continent, population FROM world
SELECT name FROM world
WHERE population>200000000
SELECT name,gdp/population FROM world
WHERE population>200000000
SELECT name,population/1000000 FROM world
WHERE continent='South America'
SELECT name,population FROM world
WHERE name in ('France','Germany','Italy')
SELECT name FROM world
WHERE name like '%United%'
SELECT name,population,area FROM world
WHERE area>3000000 or population>250000000
SELECT name,population,area FROM world
WHERE area>3000000 xor population>250000000
SELECT 
name,round(population/1000000,2),round(gdp/1000000000,2) 
FROM world
WHERE continent='South America'
SELECT 
name,round(gdp/population,-3) FROM world
where gdp>1000000000000

SELECT name,
       CASE WHEN continent='Oceania' THEN 'Australasia'
            ELSE continent END
  FROM world
 WHERE name LIKE 'N%'
select name,
	case when continent in('Europe','Asia') then 'Eurasia'
		 when continent in ('North America' , 'South America' ,'Caribbean') then 'America'
		else continent end
from world
where name like 'A%' or  name like 'B%'
select name,contient,
case when continent='Oceania' then 'Australasia'
when continent in('Eurasia','Turkey') then ' Europe/Asia' 
when continent='Caribbean' and name begin like 'B%' then 'North America'
when continent='Caribbean' and name begin not like 'B%' then 'South America'
else continent end 
from world
order by name
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值