본문 바로가기

Language/SQL

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

728x90
728x90
 

Weather Observation Station 8 | HackerRank

Query CITY names that start AND end with vowels.

www.hackerrank.com


Problem

Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last characters. Your result cannot contain duplicates.

-> station에서 처음과 마지막 문자로 모두 모음이 있는 CITY 이름 목록을 중복 없이 출력하시오.


Answer

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