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.
Revising Aggregations - The Count Function
Revising Aggregations - The Count Function
Sort by
recency
|
489 Discussions
|
Please Login in order to post a comment
for sql server
with cte_city(col1) as (select count(id) from city where population > 100000) select * from cte_city
For MySQL
SELECT COUNT(NAME) FROM CITY WHERE POPULATION>100000;
SELECT COUNT(DISTINCT C.NAME) FROM CITY C WHERE C.POPULATION > 100000;
mysql: