728x90
728x90
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
'Language > SQL' 카테고리의 다른 글
[HackerRank][SQL] Weather Observation Station 10 - 컴도리돌이 (0) | 2022.05.18 |
---|---|
[HackerRank][SQL] Weather Observation Station 9 - 컴도리돌이 (0) | 2022.05.18 |
[HackerRank][SQL] Weather Observation Station 7 - 컴도리돌이 (0) | 2022.05.18 |
[HackerRank][SQL] Weather Observation Station 6 - 컴도리돌이 (0) | 2022.05.18 |
[HackerRank][SQL] Weather Observation Station 5 - 컴도리돌이 (0) | 2022.05.18 |