https://www.hackerrank.com/challenges/average-population-of-each-continent/problem
Given the CITY and COUNTRY tables, query the names of all the continents (COUNTRY.Continent) and their respective average city populations (CITY.Population) rounded down to the nearest integer.
Note: CITY.CountryCode and COUNTRY.Code are matching key columns.
The CITY and COUNTRY tables are described as follows:
select continent, floor(avg(city.population))
from city inner join country
on city.countrycode=country.code
group by continent;
city
와 country
테이블을 조인해서, 각 continent
별 평균 population
을 구해서 내림
하라고 했다.
그러므로 floor()
함수를 사용했다.
저도 개발자인데 같이 교류 많이 해봐요 ㅎㅎ! 서로 화이팅합시다!