Revising the Select Query II – Hacker Rank Solution

Hello Coders, Welcome to our Hacker Rank SQL Solutions Series. Today we are going to solve second problem of this SQL Series which is Revising the Select Query II Hacker Rank Solution.

Revising the Select Query II

Task

Query the NAME field for all American cities in the CITY table with populations larger than 120000. The CountryCode for America is USA.

The CITY table is described as follows:

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

Solution – Revising the Select Query II

select name from city 
where countrycode = 'USA'
and population > 120000

Disclaimer: The above Problem (Revising the Select Query II) 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 *