Snoopy [해커랭크/SQL] 17. Weather Observation Station 12 (REGEXP)
코딩테스트/해커랭크 SQL

[해커랭크/SQL] 17. Weather Observation Station 12 (REGEXP)

Sooyoon Jeong 2023. 2. 21.
 

 

🤔 문제 분석

1) Query the list of CITY names from STATION that do not start with vowels and do not end with vowels.

2) Your result cannot contain duplicates.

 

💡 풀이

SELECT DISTINCT CITY
FROM STATION
WHERE CITY REGEXP "^[^A|E|I|O|U]"
AND CITY REGEXP "[^A|E|I|O|U]$"

 

댓글