Lim Seunghyun Space

[HackerRank] Weather Observation Station 4 본문

SQL/SQL 문제

[HackerRank] Weather Observation Station 4

Lim Seung Hyun 2021. 11. 19. 14:23

문제 : https://www.hackerrank.com/challenges/weather-observation-station-4/problem?isFullScreen=true 

 

Weather Observation Station 4 | HackerRank

Find the number of duplicate CITY names in STATION.

www.hackerrank.com

 

 

문제 해설

  • 전체 CITY의 수에서 중복을 제거한 CITY의 수의 차이를 조회

 

풀이 (MySQL)

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