-
[HackerRank/Basic Join] Average Population of Each Continent공부/PS ( SQL) 2022. 5. 18. 23:11
https://www.hackerrank.com/challenges/average-population-of-each-continent/problem
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 COUNTRY.CONTINENT, TRUNCATE(AVG(CITY.POPULATION),0) FROM COUNTRY JOIN CITY ON CITY.COUNTRYCODE = COUNTRY.CODE GROUP BY COUNTRY.CONTINENT
'공부 > PS ( SQL)' 카테고리의 다른 글
[programmers] 없어진 기록 찾기 (0) 2022.05.20 [HackerRank/Basic Join] The Report (0) 2022.05.19 [HackerRank/Basic Join] African Cities (0) 2022.05.18 [MYSQL] JOIN 참고 (0) 2022.05.18 [HackerRank/Basic Join] Population Census (0) 2022.05.18