Revising the Select Query I – Hacker Rank Solution

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

Revising the Select Query I

Contents

Task

Query all columns for all American cities in the CITY table with populations larger than 100000. The CountryCode for America is USA.

The CITY table is described as follows:

CITY

Field Type
IDNUMBER
NAMEVARCHAR2(17)
COUNTRYCODEVARCHAR2(3)
DISTRICTVARCHAR2(20)
POPULATIONNUMBER

Solution – Revising the Select Query I

MYSQL

SELECT * FROM CITY WHERE COUNTRYCODE = 'USA' AND POPULATION > 100000;

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