Prepare > SQL > Aggregation > Revising Aggregations - The Sum Function

2023. 5. 16. 20:57HackerRank-My SQL

 

Revising Aggregations - The Sum Function | HackerRank

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

www.hackerrank.com

 

문제


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

 

 

 

 

코드


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

 

 

 

두 번째 시도

SELECT SUM(POPULATION) FROM CITY
WHERE DISTRICT = 'California';
  • 똑같음