[Problem]
Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. 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.
[My Answer]
1
2
3
4
|
SELECT DISTINCT CITY
FROM STATION
WHERE CITY REGEXP '[aeiou]$';
|
cs |
Why code is different between starting and ending... I was trying to input '^' last of [], but it was '$' rather than '^'.
'Code Problems > SQL_ HackerRank' 카테고리의 다른 글
[HackerRank] Weather Observation Station 9 (0) | 2021.05.01 |
---|---|
[HackerRank] Weather Observation Station 8 (0) | 2021.04.30 |
[HackerRank] Weather Observation Station 6 (0) | 2021.04.17 |
[Hacker Rank] Weather Observation Station 5 (0) | 2021.04.17 |
[HackerRank] Weather Observation Station 4 (0) | 2021.04.11 |