728x90
❓ Question
https://www.hackerrank.com/challenges/japan-population
❗ Answer
SELECT SUM(population)
FROM city
WHERE countrycode = 'JPN';
📌 Discussion
- where 절에서 조건에 맞는 레코드만 추출 후 sum 집계
'SQL 문제풀이' 카테고리의 다른 글
[해커랭크 SQL] Aggregation - The Blunder (0) | 2023.08.23 |
---|---|
[해커랭크 SQL] Aggregation - Population Density Difference (0) | 2023.08.23 |
[해커랭크 SQL] Aggregation - Average Population (0) | 2023.08.23 |
[해커랭크 SQL] Aggregation - Revising Aggregations - Averages (0) | 2023.08.23 |
[해커랭크 SQL] Aggregation - Revising Aggregations - The Sum Function (0) | 2023.08.23 |