728x90
728x90
Problem
Find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table.
-> station에 있는 모든 city의 수와 중복을 제외한 city의 수의 차이를 구하시오.
Answer
select count(city) - count(distinct(city))
from station
728x90
728x90
'Language > SQL' 카테고리의 다른 글
[HackerRank][SQL] Weather Observation Station 6 - 컴도리돌이 (0) | 2022.05.18 |
---|---|
[HackerRank][SQL] Weather Observation Station 5 - 컴도리돌이 (0) | 2022.05.18 |
[HackerRank][SQL] Weather Observation Station 3 - 컴도리돌이 (0) | 2022.05.18 |
[HackerRank][SQL] Weather Observation Station 2 - 컴도리돌이 (0) | 2022.05.18 |
[HackerRank][SQL] Weather Observation Station 1 - 컴도리돌이 (0) | 2022.05.18 |