Weather Observation Station 4

  • + 0 comments

    COUNT () is the aggregate Funtion that used to count the number of rows in a table.

    COUNT(city) will count the number of row If it has city column and has value. If the city name is repeated in any row that also be counted .

    COUNT (DISTINCT city) count the number of row in which has the city column but did not count that row in which the city value is repeated.

    SELECT count(city) - count(DISTINCT city) FROM STATION;