HackerRank/SQL

[hackerrank] Weather Observation Station 3

예쁜꽃이피었으면 2022. 8. 8. 14:57

[hackerrank] Prepare > SQL > Basic Select >  Weather Observation Station 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:

 

[MYSQL]

 

 

[ORCALE]

select distinct(city)
from station
where  mod(id,2)  = 0
order by city;

 

 

 

반응형