We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Weather Observation Station 4
Weather Observation Station 4
Sort by
recency
|
1422 Discussions
|
Please Login in order to post a comment
In this, we will count the number of CITY and number of DISTINCT CITY and then substract it.
SELECT count(city) - count(DISTINCT city) FROM station;
select count(*) - count(distinct city) from station;
count(*) -> count the total no. of city count(distinct city) -> count of distinct city.
SELECT COUNT(CITY) - COUNT(DISTINCT CITY) FROM STATION;
SELECT COUNT(CITY)-COUNT(DISTINCT CITY) FROM STATION;
SELECT COUNT(*)-COUNT(DISTINCT CITY) FROM STATION;
MY SQL