CodingSpace

[HackerRank/SQL] Revising Aggregations - Average Population 본문

HackerRank/SQL

[HackerRank/SQL] Revising Aggregations - Average Population

개발자_조이킴 2022. 7. 14. 13:33

Problem. Revising Aggregations - Averages Population


Link.

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

 

Revising Aggregations - Averages | HackerRank

Query the average population of all cities in the District of California.

www.hackerrank.com


Description.

Query the average population for all cities in CITY, rounded down to the nearest integer.

CITY 테이블


Key Point. 

SELECT,

 

AVG,

 

ROUND,


My Answer. 

SELECT ROUND(AVG(POPULATION))
FROM CITY;

References. 

 

Comments