본문 바로가기

Algorithm/MySQL

[해커랭크(Hacker Rank)] Revising Aggregations - The Sum Function (MySQL)

문제

Query the total population of all cities in CITY where District is California.
Input Format
The CITY table is described as follows: 

 

코드

SELECT SUM(population)
FROM city
WHERE district = 'California'

 

출처

 

 

 

반응형