List the continents with total populations of at least 100 million.
World Table
name continent area population gdp
Afghanistan Asia 6522
I'll give you a good framework for thinking through this question.
Since there are multiple records with the same continent, we know we need GROUP BY. Once we do group by, we can use aggregate operations to get the sum, namely SUM. By using this aggregate operation, we can filter using the HAVING clause post group-by. If we wanted to filter pre-groupby, we would use the WHERE clause.
SELECT continent FROM world GROUP BY continent HAVING SUM(population) >
100000000;
SELECT continent, SUM(population)
FROM world
GROUP BY continent
HAVING SUM(population) >= 100000000