Im between cherry

Hackerrank | MySQL | Weather Observation Station 3 본문

데이터분석/practice_query

Hackerrank | MySQL | Weather Observation Station 3

meal 2020. 8. 27. 18:13

Weather Observation Station 3

Problem

 

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.
The STATION table is described as follows:

 

 

Solution

SELECT distinct City
FROM Station
WHERE ID % 2 = 0
Comments