Skip to main content

Command Palette

Search for a command to run...

HackerRank: Japanese Cities' Attributes

Published
1 min read

Question and Answer:

Key Points:

What the Query Does

  • Retrieves all columns for every city located in Japan

Key Conditions Used

  • COUNTRYCODE = 'JPN' filters only Japanese cities

Why It Works

  • SELECT * returns the complete details of each matching city

  • COUNTRYCODE correctly represents each country's unique ISO code

Output

  • Multiple rows (one per city in Japan)

  • Each row includes ID, NAME, COUNTRYCODE, DISTRICT, POPULATION