본문 바로가기

Language/SQL

[HackerRank][SQL] Weather Observation Station 7 - 컴도리돌이

728x90
 

Weather Observation Station 7 | HackerRank

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

www.hackerrank.com


Problem

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

-> station에서 모음(a, e, i, o, u)으로 끝나는 CITY 이름을 중복 없이 출력하시오.


Answer

select distinct(city)
from station
where city regexp "[aeiou]$"