Query the difference between all cities and all unique cities from the STATION table. This is the solution of HackerRank's Weather Observation Station 4 SQL problem.
Table name: STATION
Table Structure:
Fileds | Type |
ID | NUMBER |
CITY | VARCHAR |
STATE | VARCHAR |
LAT_N | NUMBER |
LONG_W | NUMBER |
SQL Query:
SELECT (COUNT(CITY) - COUNT(DISTINCT CITY))
FROM STATION;