해커랭크 SQL문제_0715

starlikedh
|2021. 7. 15. 18:33

Japanese Cities' Name

문제: 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:

풀이:  WHERE절에  COUNTRYCODE 조건을 주고 SELECT시 name만 출력되게.

 

Weather Observation Station 1

문제: Query a list of CITY and STATE from the STATION table. 
The STATION table is described as follows: 

풀이:  STATION 테이블에서 CITY랑 STATE 컬럼만 출력.

SELECT CITY, STATE
FROM STATION

 

'Database' 카테고리의 다른 글

해커랭크 SQL문제_0717  (0) 2021.07.17
해커랭크 SQL문제_0716  (0) 2021.07.16
해커랭크 SQL 문제_0714  (0) 2021.07.14
해커랭크 SQL문제_0713  (0) 2021.07.13
해커랭크 SQL문제_0712  (0) 2021.07.12