HackerRank-My SQL
Prepare > SQL > Aggregation > Revising Aggregations - The Sum Function
stem_sw
2023. 5. 16. 20:57
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';
- 똑같음