Revising Aggregations - The Count Function

Sort by

recency

|

515 Discussions

|

  • + 0 comments

    For MySQL Platform

    SELECT COUNT(name) FROM city
    WHERE population > 100000;
    
  • + 0 comments
    SELECT COUNT(*) FROM CITY 
      WHERE POPULATION >100000
    
  • + 0 comments

    select count(distinct city.name) from city where city.population > 100000;

  • + 0 comments

    SELECT COUNT(*) AS city_count FROM CITY WHERE Population > 100000;

  • + 1 comment

    select sum(population) from (select count(population) as population from CITY where population > 100000 group by population) as citypopulation