CodingSpace

[HackerRank/SQL] Revising Aggregations - Averages 본문

HackerRank/SQL

[HackerRank/SQL] Revising Aggregations - Averages

개발자_조이킴 2022. 7. 16. 22:27

Problem. Revising Aggregations - Averages


Link.

https://www.hackerrank.com/challenges/japan-population/problem?utm_campaign=challenge-recommendation&utm_medium=email&utm_source=24-hour-campaign

 

Revising Aggregations - Averages | HackerRank

Query the average population of all cities in the District of California.

www.hackerrank.com


Description.

Query the sum of the populations for all Japanese cities in CITY

 

CITY 테이블


Key Point. 

SELECT,

 

SUM,

 

WHERE,


My Answer. 

SELECT SUM(POPULATION)
FROM CITY
WHERE COUNTRYCODE = 'JPN';

References. 

 

Comments