SQL 문제풀이
[해커랭크 SQL] Aggregation - Average Population
냄비짱
2023. 8. 23. 00:19
728x90
❓ Question
https://www.hackerrank.com/challenges/average-population
Average Population | HackerRank
Query the average population of all cities, rounded down to the nearest integer.
www.hackerrank.com
❗ Answer
SELECT FLOOR(AVG(population))
FROM city;
📌 Discussion
- avg로 집계 후 floor로 버림