Prepare > SQL > Basic Select > Weather Observation Station 4

2023. 7. 8. 22:11HackerRank-My SQL

 

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;