Algorithm/MySQL

[해커랭크(Hacker Rank)]Population Density Difference (MySQL)

yujin.me 2021. 6. 30. 15:06

문제

Query the difference between the maximum and minimum populations in CITY.
Input Format
The CITY table is described as follows:

 

코드

SELECT MAX(population) - MIN(population)
FROM city

 

풀이

1. population의 최댓값과 최소값 빼기

 

출처

반응형