Find the difference between the total number ofCITYentries in the table and the number of distinctCITYentries in the table. TheSTATIONtable is described as follows:
whereLAT_Nis the northern latitude andLONG_Wis the western longitude.
For example, if there are three records in the table withCITYvalues 'New York', 'New York', 'Bengalaru', there are 2 different city names: 'New York' and 'Bengalaru'. The query returns, because.
total number of records - number of unique city names = 3 - 2 = 1.
My Answer
SELECT COUNT(CITY) - COUNT(DISTINCT CITY)
FROM STATION;