Hello coders, today we are going to solve Japanese Cities’ Names HackerRank Solution in SQL.
Problem
Query the names of all the Japanese cities in the CITY table. The COUNTRYCODE for Japan is JPN
.
The CITY table is described as follows:
CITY
Field | Type |
ID | NUMBER |
NAME | VARCHAR2(17) |
COUNTRYCODE | VARCHAR2(3) |
DISTRICT | VARCHAR2(20) |
POPULATION | NUMBER |
Solution – Japanese Cities’ Names in SQL
SELECT NAME FROM CITY WHERE COUNTRYCODE = "JPN";
Description: The above Problem (Japanese Cities’ Names) is generated by Hacker Rank but the Solution is Provided by CodingBroz. This tutorial is only for Educational and Learning Purpose.
select name from city where COUNTRYCODE=’jpn’;