HackerRank-My SQL
Prepare > SQL > Basic Select > Weather Observation Station 4
stem_sw
2023. 7. 8. 22:11
Weather Observation Station 4 | HackerRank
Find the number of duplicate CITY names in STATION.
www.hackerrank.com
문제
Find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table.
코드
SELECT COUNT(CITY) - COUNT(DISTINCT(CITY)) FROM STATION;