728x90

문제

https://www.hackerrank.com/challenges/weather-observation-station-7/problem?isFullScreen=true

 

Weather Observation Station 7 | HackerRank

Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION.

www.hackerrank.com

 

 

 

 

 

 

 

 

풀이(MSSQL)

SELECT DISTINCT CITY FROM STATION
 WHERE CITY LIKE '%a'
    OR CITY LIKE '%e'
    OR CITY LIKE '%i'
    OR CITY LIKE '%o'
    OR CITY LIKE '%u'

 

이번 문제는 모음으로 끝나는 도시들의 이름을 조회하는 것이어서 저번 문제에서 % 위치만 변경하면 해결할 수 있었다.

300x250