반응형
문제 링크입니다!
Revising Aggregations - The Count Function | HackerRank
Query the number of cities having populations larger than 100000.
www.hackerrank.com
문제
=> CITY 테이블에서 인구가 100000명 이상인 POPULATION의 수를 조회해라
풀이
SELECT COUNT(POPULATION)
FROM CITY
WHERE POPULATION > 100000
- COUNT : 그룹에 있는 항목의 수를 반환
COUNT(Transact-SQL) - SQL Server
COUNT(Transact-SQL)
docs.microsoft.com
'HackerRank - MS SQL Server' 카테고리의 다른 글
[해커랭크/MS SQL] Revising Aggregations - Averages (0) | 2022.03.25 |
---|---|
[해커랭크/MS SQL] Revising Aggregations - The Sum Function (0) | 2022.03.25 |
[해커랭크/MS SQL] Ollivander's Inventory (0) | 2022.03.25 |
[해커랭크/MS SQL] Top Competitors (0) | 2022.03.25 |
[해커랭크/MS SQL] Average Population of Each Continent (0) | 2022.03.24 |
댓글