Prepare > SQL > Aggregation > Population Density Difference

2023. 5. 16. 20:38HackerRank-My SQL

 

Population Density Difference | HackerRank

Query the difference between the maximum and minimum city populations in CITY.

www.hackerrank.com

 

문제


Query the difference between the maximum and minimum populations in CITY.

 

 

 

 

코드


SELECT MAX(POPULATION) - MIN(POPULATION) FROM CITY;

 

두 번째 시도

SELECT MAX(POPULATION) - MIN(POPULATION) FROM CITY;
  • 똑같음