SQLZOO练习笔记-SUM AND COUNT

SELECT SUM(population) FROM world

select distinct continent from world

select sum(gdp) from world
where continent = ‘Africa’

select count(distinct name) from world
where area >= 1000000

select sum(population) from world
where name in (‘Estonia’, ‘Latvia’, ‘Lithuania’)

select continent, count(distinct name) from world
group by continent

select continent, count(distinct name) from world
where population >= 10000000
group by continent

select continent from
(select continent, sum(population) as a from world
group by continent) c
where a >= 100000000

猜你喜欢

转载自blog.csdn.net/yizhu007_/article/details/82945522
今日推荐