Im between cherry

Hackerrank | MySQL | Asian Population 본문

데이터분석/practice_query

Hackerrank | MySQL | Asian Population

meal 2020. 8. 29. 11:20

Asian Population

Problem

 

Asian Population | HackerRank

Query the sum of the populations of all cities on the continent 'Asia'.

www.hackerrank.com

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.

 

 

SELECT Sum(City.population)
FROM City
LEFT JOIN Country ON City.CountryCode = Country.Code
WHERE Country.Continent = 'Asia'
Comments