문제
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.
코드
select distinct city
from station
where id % 2 = 0 -- even Id Number 짝수 아이디만 출력
출력
반응형
'Algorithm > MySQL' 카테고리의 다른 글
[해커랭크(HackerRank)] Top Competitors (MySQL) (0) | 2021.07.12 |
---|---|
[해커랭크(HackerRank)] Placements (MySQL) (0) | 2021.07.12 |
[해커랭크(HackerRank)] Weather Observation Station 20 (MySQL) (0) | 2021.07.12 |
[해커랭크(HackerRank)] Weather Observation Station 19 (MySQL) (0) | 2021.07.10 |
[해커랭크(HackerRank)] New Companies (MySQL) (0) | 2021.07.09 |