Hello coders, today we are going to solve Revising Aggregations – The Count Function HackerRank Solution in SQL.
Problem
Query a count of the number of cities in CITY having a Population larger than 100,000.
Input Format
The CITY table is described as follows:
Field | Type |
---|---|
ID | NUMBER |
NAME | VARCHAR2(17) |
COUNTRYCODE | VARCHAR2(3) |
DISTRICT | VARCHAR2(20) |
POPULATION | NUMBER |
Solution – Revising Aggregations – The Count Function in SQL
MySQL
SELECT COUNT(*) FROM CITY WHERE POPULATION > 100000
Disclaimer: The above Problem (Revising Aggregations – The Count Function) is generated by Hacker Rank but the Solution is Provided by CodingBroz. This tutorial is only for Educational and Learning Purpose.