문제
https://www.hackerrank.com/challenges/weather-observation-station-4/problem?isFullScreen=true
Find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table.
○ 총 CITY의 개수와 고유한(겹치지 않는) CITY의 개수의 차를 구하라.
풀이
SELECT COUNT(CITY) - COUNT(DISTINCT(CITY))
FROM STATION;
'SQL > HackerRank' 카테고리의 다른 글
[MySQL] Weather Observation Station 8 (0) | 2023.01.27 |
---|---|
[MySQL] Weather Observation Station 7 (0) | 2023.01.27 |
[MySQL] Weather Observation Station 6 (0) | 2023.01.27 |
[MySQL] Weather Observation Station 5 (0) | 2023.01.26 |
[MySQL] Weather Observation Station 3 (0) | 2023.01.26 |
[MySQL] Weather Observation Station 1 (0) | 2023.01.26 |
[MySQL] Japanese Cities' Names (0) | 2023.01.26 |
[MySQL] Japanese Cities' Attributes (0) | 2023.01.26 |