-
[HackerRank] Average Population of Each ContinentmySQL 2023. 2. 28. 01:04
Average Population of Each Continent | HackerRank
Query the names of all continents and their respective city populations, rounded down to the nearest integer.
www.hackerrank.com
SELECT B.Continent, FLOOR(AVG(A.Population)) FROM CITY A JOIN COUNTRY B ON A.Countrycode = B.code GROUP BY B.Continent
소수점 자리를 버림(FLOOR) 하는 거 말고는 크게 어려울 것은 없는 문제다.
'mySQL' 카테고리의 다른 글
[HackerRank]-The Report (0) 2023.03.01 [HackerRank] Top Earners (0) 2023.02.27 [HackerRank] The Blunder (0) 2023.02.27 [HackerRank] Weather Observation Station 20 (0) 2023.02.26 [HackerRank] Weather Observation Station 19 (0) 2023.02.26