[해커랭크/SQL]Weather Observation Station 4

canugo·2023년 3월 12일
0

해커랭크

목록 보기
9/12

문제

Find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table.
The STATION table is described as follows:

문제풀이 & 해석

표의 총 CITY 항목 수와 표의 고유한 CITY 항목 수 간의 차이를 찾습니다.

SELECT COUNT(CITY) - COUNT(DISTINCT(CITY))
FROM STATION

SELECT COUNT(CITY) - COUNT(DISTINCT(CITY))
➡ CITY 항목의 개수 - 중복되는 CITY의 항목

FROM STATION ➡ STATION으로부터

0개의 댓글