반응형
츄르사려고 코딩하는집사입니다.
1. [HackerRank] Weather Observation Station 3 SQL
2. 문제 출처
https://www.hackerrank.com/challenges/weather-observation-station-3/problem
3. 문제
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.
4. 소스 코드
SELECT DISTINCT CITY
FROM STATION
WHERE MOD(ID,2) = 0;
- DISTINCT는 중복을 제거해 준다.
반응형
'알고리즘 > HackerRank' 카테고리의 다른 글
[HackerRank] Weather Observation Station 7 오라클(Oracle) (0) | 2021.09.07 |
---|---|
[HackerRank] Weather Observation Station 6 오라클(Oracle) (0) | 2021.09.07 |
[HackerRank] Weather Observation Station 5 SQL (0) | 2021.09.07 |
[HackerRank] Weather Observation Station 4 SQL (0) | 2021.09.06 |
[HackerRank] Weather Observation Station 1 SQL (0) | 2021.09.06 |
[HackerRank] Japanese Cities' Names SQL (0) | 2021.09.06 |
[HackerRank] Japanese Cities' Attributes SQL (0) | 2021.09.06 |
[HackerRank] Select By ID SQL (0) | 2021.09.06 |
최근댓글