Asian Population (HackerRank)

yonny·2022년 10월 9일
0
post-custom-banner

Basic Join

문제

https://www.hackerrank.com/challenges/asian-population/problem

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:

city

country

<내 코드>

SELECT SUM(t1.population)
FROM CITY t1
    INNER JOIN Country t2
    ON t1.CountryCode = t2.Code
WHERE t2.CONTINENT = 'Asia';
post-custom-banner

0개의 댓글