본문 바로가기
문제풀이/HackerRank

Weather Observation Station 3

by 제밍 2022. 11. 2.

Query a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicates from the answer.
The STATION table is described as follows:

where LAT_N is the northern latitude and LONG_W is the western longitude.

 

*조건 : 짝수의 아이디 숫자를 가지고있는 도시들의 이름을 나오게 해야함

짝수는 2로 나누었을때 나머지가 0이니까

 

 

SELECT DISTINCT CITY
FROM STATION
WHERE MOD(ID,2)=0 ;

 

 

 

 

Weather Observation Station 3 | HackerRank

 

Weather Observation Station 3 | HackerRank

Query a list of unique CITY names with even ID numbers.

www.hackerrank.com

 

'문제풀이 > HackerRank' 카테고리의 다른 글

Weather Observation Station 5  (0) 2022.11.02
Weather Observation Station 4  (1) 2022.11.02
Weather Observation Station 1  (0) 2022.11.02
Japanese Cities' Names  (0) 2022.11.02
Japanese Cities' Attributes  (0) 2022.11.02