[hackerrank] Prepare > SQL > Aggregation > Population Census
[문제]
Given the CITY and COUNTRY tables, query the sum of the populations of all cities where the CONTINENT is 'Asia'.
Note: CITY.CountryCode and COUNTRY.Code are matching key columns.
Input Format
The CITY and COUNTRY tables are described as follows:
[MYSQL]
[ORCALE]
select sum( a.population)
from city a inner join country b on (a.countrycode = b.code)
where continent = 'Asia';
반응형
'HackerRank > SQL' 카테고리의 다른 글
[hackerrank] African Cities (0) | 2022.09.06 |
---|---|
[hackerrank] Weather Observation Station 19 (0) | 2022.09.06 |
[hackerrank] Weather Observation Station 18 (0) | 2022.09.06 |
[hackerrank] Weather Observation Station 17 (0) | 2022.09.06 |
[hackerrank] Weather Observation Station 16 (0) | 2022.09.06 |