Tuesday, September 13, 2022

HackerRank: SQL Basic Select "apanese Cities' Attributes"

Question:
Query all attributes of every Japanese city in the CITY table. The COUNTRYCODE for Japan is JPN.

The CITY table is described as follows:




Answer:
SELECT ID, NAME, COUNTRYCODE, DISTRICT, POPULATION FROM CITY WHERE COUNTRYCODE='JPN';

No comments:

Post a Comment