Prepare >SQL > Basic Select > Weather Observation Station 3
2023. 7. 6. 19:15ㆍHackerRank-My SQL
Weather Observation Station 3 | HackerRank
Query a list of unique CITY names with even ID numbers.
www.hackerrank.com
문제
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.
=> ID가 짝수인 CITY이름을 쿼리하라. 중복은 배제.
코드
SELECT DISTINCT(CITY) FROM STATION
WHERE ID%2 = 0;
'HackerRank-My SQL' 카테고리의 다른 글
Prepare > SQL > Basic Select > Weather Observation Station 5 (0) | 2023.07.08 |
---|---|
Prepare > SQL > Basic Select > Weather Observation Station 4 (0) | 2023.07.08 |
Prepare > SQL > Basic Select > Weather Observation Station 1 (0) | 2023.07.06 |
Prepare >SQL > Basic Select > Japanese Cities' Names (0) | 2023.07.06 |
Prepare > SQL > Basic Select > Japanese Cities' Attributes (0) | 2023.07.06 |