Im between cherry

Hackerrank | MySQL | Weather Observation Station 4 본문

데이터분석/practice_query

Hackerrank | MySQL | Weather Observation Station 4

meal 2020. 8. 27. 18:15

Weather Observation Station 4

Problem

 

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.
The STATION table is described as follows:

 

Solution

SELECT COUNT(city) - COUNT(DISTINCT(city))
FROM station
Comments