본문 바로가기
서버/MYSQL

[MYSQL] HACKERRANK - Weather Observation Station 9

by HDobby 2022. 6. 11.

https://www.hackerrank.com/challenges/weather-observation-station-9/problem

 

Weather Observation Station 9 | HackerRank

Query an alphabetically ordered list of CITY names not starting with vowels.

www.hackerrank.com

 문제

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

Input Format

The STATION table is described as follows:

where LAT_N is the northern latitude and LONG_W is the western longitude.

 

생각해보기

Weather Observation Station 6의 반대 경우

 

코드

더보기
SELECT distinct CITY
FROM STATION
WHERE CITY not REGEXP ('^A|^E|^I|^O|^U');
728x90

댓글