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

[해커랭크/SQL] 16. Weather Observation Station 11 (REGEXP)

Sooyoon Jeong 2023. 2. 21.
 

 

🤔 문제 분석

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

2) Your result cannot contain duplicates.

 

💡 풀이

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

 

댓글