HackerRank/SQL

[hackerrank] Average Population

예쁜꽃이피었으면 2022. 8. 24. 09:58

[hackerrank] Prepare > SQL > Aggregation > Average Population

 

[문제]

Query the average population for all cities in CITY, rounded down to the nearest integer.

Input Format

The CITY table is described as follows: 

 

[MYSQL]

 

 

[ORCALE]

 

select round(avg(population),0)
from city;

 

 

반응형