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.
[My Answer]
1
2
3
|
SELECT DISTINCT CITY
FROM STATION
WHERE NOT CITY REGEXP '^[AEIOU]'
|
cs |
After seeing other blogs to review and study, it helps me when I use similar queries from the work and previous problems.
'Code Problems > SQL_ HackerRank' 카테고리의 다른 글
[HackerRank] Weather Observation Station 11 (0) | 2021.07.06 |
---|---|
[HackerRank] Weather Observation Station 10 (0) | 2021.07.01 |
[HackerRank] Weather Observation Station 8 (0) | 2021.04.30 |
[HackerRank] Weather Observation Station 7 (0) | 2021.04.18 |
[HackerRank] Weather Observation Station 6 (0) | 2021.04.17 |