본문 바로가기

Language/SQL

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

728x90
728x90
 

Weather Observation Station 10 | HackerRank

Query a list of CITY names not ending in vowels.

www.hackerrank.com


Problem

 

Query the list of CITY names from STATION that do not end with vowels. Your result cannot contain duplicates.

-> 모음으로 끝나지 않는 도시 이름을 중복 없이 출력하시오.


Answer

 

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