728x90
❓ Question
https://www.hackerrank.com/challenges/asian-population
❗ Answer
SELECT SUM(city.population)
FROM city
INNER JOIN country
ON city.countrycode = country.code
WHERE country.continent = 'ASIA';
📌 Discussion
- INNER JOIN 후 조건을 걸어서 모든 인구를 합해주었다.
'SQL 문제풀이' 카테고리의 다른 글
[해커랭크 SQL] Basic Join - Average Population of Each Continent (0) | 2023.08.23 |
---|---|
[해커랭크 SQL] Basic Join - African Cities (0) | 2023.08.22 |
[해커랭크 SQL] Advanced Select - The PADS (0) | 2023.08.22 |
[해커랭크 SQL] Advanced Select - Type of Triangle (0) | 2023.08.18 |
[해커랭크 SQL] Basic Select - Employee Salaries (0) | 2023.08.18 |