Pavithra's Space
  • Home
  • Skills
    • SQL
    • HackerRank
      • Revising the Select Query I
      • Revising the Select Query II
      • Select All
      • Select By ID
      • Japanese Cities' Attributes
      • Japanese Cities' Names
      • Weather Observation Station 1
      • Weather Observation Station 3
      • Weather Observation Station 4
      • Weather Observation Station 5
      • Weather Observation Station 6
      • Weather Observation Station 7
      • Weather Observation Station 8
      • Weather Observation Station 9
      • Weather Observation Station 10
      • Weather Observation Station 11
      • Weather Observation Station 12
      • Higher Than 75 Marks
      • Employee Names
      • Employee Salaries
Powered by GitBook
On this page
  1. Skills
  2. HackerRank

Japanese Cities' Attributes

PreviousSelect By IDNextJapanese Cities' Names

Last updated 1 year ago

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

The CITY table is described as follows:

Solution:

SELECT * FROM CITY WHERE COUNTRYCODE = "JPN";

Explanation:

  • SELECT *: This part of the query indicates that we want to retrieve all columns from the CITY table.

  • FROM CITY : This specifies the table from which we want to retrieve the data, which is the CITY table.

  • WHERE COUNTRYCODE = "JPN": This is a condition added to the query using the WHERE clause. It filters the rows in the CITY table so that only rows where the value in the COUNTRYCODE column is "JPN" are included in the result.

Japanese Cities' Attributes | HackerRankHackerRank
Logo