본문 바로가기
데이터 분석/SQL 연습문제

Weather Observation Station 11 (HackerRank)

2022. 11. 6.
 

Weather Observation Station 11 | HackerRank

Query a list of CITY names not starting or ending with vowels.

www.hackerrank.com

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

풀이

제출한 답

select distinct city
from station
where city not regexp '^[aeiou].*[aeiou]$'

-> .은 어떤 문자든 일치, *은 문자를 여러 번 반복

2022.11.06

댓글