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.
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:
Field | Type |
ID | NUMBER |
NAME | VARCHAR2(17) |
COUNTRYCODE | VARCHAR2(3) |
DISTRICT | VARCHAR2(20) |
POPULATION | NUMBER |
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.