Revising Aggregations – The Count Function in SQL | HackerRank Solution

Hello coders, today we are going to solve Revising Aggregations – The Count Function HackerRank Solution in SQL.

Revising Aggregations

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:

FieldType
IDNUMBER
NAMEVARCHAR2(17)
COUNTRYCODEVARCHAR2(3)
DISTRICTVARCHAR2(20)
POPULATIONNUMBER
CITY

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.

Leave a Comment

Your email address will not be published. Required fields are marked *