[HackerRank SQL] Average Population of Each Continent


質問リンク
https://www.hackerrank.com/challenges/average-population-of-each-continent/problem
Code link
https://github.com/JamesJung01/Hackerrank_sql/blob/main/01_Easy/Average_Population_of_Each_Continent.sql
Case 1
SELECT COUNTRY.CONTINENT, FLOOR(AVG(CITY.POPULATION))
FROM COUNTRY
JOIN CITY
ON COUNTRY.CODE = CITY.COUNTRYCODE
GROUP BY COUNTRY.CONTINENT;
Case 2
SELECT COUNTRY.CONTINENT, TRUNCATE(AVG(CITY.POPULATION),0)
FROM COUNTRY
JOIN CITY
ON COUNTRY.CODE = CITY.COUNTRYCODE
GROUP BY COUNTRY.CONTINENT;