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
|
1236 Discussions
|
Please Login in order to post a comment
SELECT COUNT(CITY) - COUNT(DISTINCT CITY) FROM STATION
Here we are minusing each city i.e:- COUNT(DISTINCT CITY) from total no of cities i.e:- COUNT(CITY) to return the difference
select (count(city)- count(distinct(city))) as difference from station;
SELECT COUNT(CITY) - COUNT(DISTINCT CITY) FROM STATION;
I have tried this one but it gave me error, just wanted to know don't we use the Group By function if using any Aggregation function in select statement?
Select Count(CITY) - Count(DISTINCT CITY) as Difference from STATION Group By ID, STATE, LAT_N, LONG_W;
select count(CITY)-count(distinct(CITY)) as Diffrence from STATION;