Friday, September 9, 2022

HackerRank: SQL Basic Select 1

QUESTION:

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:


ANS: 
SELECT ID, NAME, COUNTRYCODE, DISTRICT, POPULATION FROM CITY WHERE POPULATION > 100000 AND COUNTRYCODE='USA'

No comments:

Post a Comment