Database
해커랭크 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