Revising Aggregations - The Count Function

Sort by

recency

|

489 Discussions

|

  • + 0 comments

    for sql server

    with cte_city(col1) as (select count(id) from city where population > 100000) select * from cte_city

  • + 0 comments

    For MySQL

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

    SELECT COUNT(NAME) FROM CITY WHERE POPULATION>100000;

  • + 0 comments

    SELECT COUNT(DISTINCT C.NAME) FROM CITY C WHERE C.POPULATION > 100000;

  • + 0 comments

    mysql:

    select count(*) from city where population > 100000;