June 6, 2024, 2:18 p.m. | Christian Paez

DEV Community dev.to

Problem Statement:

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


Link: HackerRank - Japanese Cities Attributes


Solution:



SELECT * FROM CITY WHERE COUNTRYCODE = 'JPN';


Explanation:




  • SELECT *: The asterisk (*) is a wildcard character in SQL that means "all columns." This part of the query specifies that you want to retrieve all columns from the table.


  • FROM CITY: Indicates that you are selecting data from the CITY table.


  • WHERE COUNTRYCODE …

attributes cities city every hackerrank japan japanese mysql part problem query solution sql table writeups

Senior Data Engineer

@ Displate | Warsaw

Automation and AI Strategist (Remote - US)

@ MSD | USA - New Jersey - Rahway

Assistant Manager - Prognostics Development

@ Bosch Group | Bengaluru, India

Analytics Engineer - Data Solutions

@ MSD | IND - Maharashtra - Pune (Wework)

Jr. Data Engineer (temporary)

@ MSD | COL - Cundinamarca - Bogotá (Colpatria)

Senior Data Engineer

@ KION Group | Atlanta, GA, United States