Prepare > SQL > Basic Select > Weather Observation Station 10
2023. 7. 13. 19:17ㆍHackerRank-My SQL
Weather Observation Station 10 | HackerRank
Query a list of CITY names not ending in vowels.
www.hackerrank.com
문제
Query the list of CITY names from STATION that do not end with vowels. Your result cannot contain duplicates.
코드
SELECT DISTINCT(CITY) FROM STATION
WHERE RIGHT(CITY, 1) REGEXP "[^AEIOU]";
SELECT DISTINCT(CITY) FROM STATION
WHERE CITY REGEXP "[^AEIOU]$";
'HackerRank-My SQL' 카테고리의 다른 글
Prepare > SQL > Basic Select > Weather Observation Station 12 (0) | 2023.07.13 |
---|---|
Prepare > SQL > Basic Select > Weather Observation Station 11 (0) | 2023.07.13 |
Prepare > SQL > Basic Select > Weather Observation Station 9 (0) | 2023.07.12 |
Prepare > SQL > Basic Select > Weather Observation Station 8 (0) | 2023.07.12 |
Prepare > SQL > Basic Select > Weather Observation Station 7 (0) | 2023.07.10 |