Studying data
[HackerRank] Basic Select > Weather Observation Station 11 본문
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.
Input Format
The STATION table is described as follows:
where LAT_N is the northern latitude and LONG_W is the western longitude.
[MySQL Solution]
SELECT DISTINCT CITY
FROM STATION
WHERE CITY REGEXP '^[^aeiou]|[^aeiou]$'; -- REGEXP 대신 RLIKE도 가능
문제 링크:
https://www.hackerrank.com/challenges/weather-observation-station-11/problem?isFullScreen=true
'SQL' 카테고리의 다른 글
[HackerRank] Advanced Select > Binary Tree Nodes (0) | 2022.12.28 |
---|---|
[HackerRank] Advanced Select > Occupations (0) | 2022.12.28 |
[HackerRank] Basic Select > Weather Observation Station 6, 7 (0) | 2022.12.26 |
[SQL][DDL] CREATE (0) | 2022.03.14 |
[SQL] 데이터의 종류 (0) | 2022.03.14 |
Comments