728x90

문제

https://www.hackerrank.com/challenges/revising-aggregations-the-count-function/problem?isFullScreen=true

 

Revising Aggregations - The Count Function | HackerRank

Query the number of cities having populations larger than 100000.

www.hackerrank.com

다음보다 인구가 많은 CITY  도시 수를 쿼리 합니다.

 

 

 

 

 

 

 

풀이(MSSQL)

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

 

이번 문제는 COUNT 함수를 통해 해당 컬럼의 갯수를 알 수 있게 되었다.

300x250