HackerRank > Weather Observation Station 8

Jihyun Park·2020년 9월 8일
0
post-thumbnail

Practice > SQL > Basic Select > Weather Observation Station 8

두번째 정규표현식 문제입니다.

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.
문제링크

Answer

SELECT DISTINCT city
FROM station
WHERE city REGEXP '^[aeiou].*[aeiou]$' -- ^은 시작, $끝 []은 or을 의미함

0개의 댓글