Prepare > SQL > Aggregation > Revising Aggregations - The Sum Function
2023. 5. 16. 20:57ㆍHackerRank-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';
- 똑같음
'HackerRank-My SQL' 카테고리의 다른 글
Prepare > SQL > Aggregation > Top Earners (0) | 2023.05.17 |
---|---|
Prepare > SQL > Aggregation > Revising Aggregations - Averages (0) | 2023.05.16 |
Prepare> SQL > Aggregation > Revising Aggregations - The Count Function (0) | 2023.05.16 |
Prepare > SQL > Aggregation > The Blunder (0) | 2023.05.16 |
Prepare > SQL > Aggregation > Population Density Difference (0) | 2023.05.16 |