CodingSpace

[HackerRank/SQL] Revising Aggregations - The Sum Function 본문

HackerRank/SQL

[HackerRank/SQL] Revising Aggregations - The Sum Function

개발자_조이킴 2022. 7. 10. 23:21

Problem. Revising Aggregations - The Sum Function


Link.

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

 

Revising Aggregations - The Sum Function | HackerRank

Query the total population of all cities for in the District of California.

www.hackerrank.com


Description.

Query the total population of all cities in CITY where District is California.

 

CITY 테이블


Key Point. 

SELECT,

 

SUM,

 

WHERE,


My Answer. 

SELECT SUM(POPULATION)
FROM CITY
WHERE DISTRICT = 'California';

References. 

 

Comments