-
HackerRank - Population CensusDataBase/Hackers Rank 2024. 10. 7. 23:01반응형
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:
Answer
SELECT SUM(city.population) FROM city INNER JOIN country ON city.countrycode = country.code WHERE country.continent = 'Asia'
Result
27028484
반응형'DataBase > Hackers Rank' 카테고리의 다른 글
HackerRank - Average Population of Each Continent (0) 2024.10.07 African Cities - INNER JOIN (0) 2024.10.07 HackerRank - Type of Triangle (0) 2024.09.30 HackersRank - Population Density Difference 문제 (0) 2024.08.02 HackersRank - Average Population 문제 (0) 2024.08.01