https://www.hackerrank.com/challenges/population-density-difference/problem?isFullScreen=true
Population Density Difference | HackerRank
Query the difference between the maximum and minimum city populations in CITY.
www.hackerrank.com
Field | Type |
ID | NUMBER |
NAME | VARCHAR2(17) |
COUNTRYCODE | VARCHAR(3) |
DISTRICT | VARCHAR2(20) |
POPULATION | NUMBER |
CITY 테이블:
- ID : 테이블의 고유 키
- NAME : 도시의 이름
- COUNTRYCODE : 국가코드
- DISTRICT : 지역
- POPULATION : 인구
최대 인구와 최소 인구의 차이를 조회하는 쿼리를 작성하세요.
select max(POPULATION ) - min(POPULATION )
from CITY
'코딩일기' 카테고리의 다른 글
SQL 코드카타 156 - The Blunder (0) | 2024.07.19 |
---|---|
DFS와 DFS (1) | 2024.07.18 |
SQL 코드카타 154 - Revising Aggregations - The Count Function (0) | 2024.07.18 |
SQL 코드카타 153 - Average Population (0) | 2024.07.18 |
SQL 코드카타 152 - Revising Aggregations - The Count Function (0) | 2024.07.18 |