728x90
반응형
문제 : Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last characters. Your result cannot contain duplicates.
SELECT distinct CITY
FROM STATION
WHERE SUBSTR(CITY, 1, 1) IN ('a', 'e', 'i', 'o', 'u')
AND SUBSTR(CITY, -1, 1) IN ('a', 'e', 'i', 'o', 'u');
Upperco Aguanga East China East Irvine Amo Eleele Oconee Amazonia Aliso Viejo Andersonville Arkadelphia Eriline Eastlake Arispe Ermine Eufaula Osborne Elm Grove Atlantic Mine Oshtemo Archie Alpine Ojai Urbana Alba Eskridge Ozona Acme
728x90
반응형
'DB > SQL' 카테고리의 다른 글
HackerRank_16. Weather Observation Station 10 (0) | 2020.06.12 |
---|---|
HackerRank_15. Weather Observation Station 9 (0) | 2020.06.11 |
HackerRank_13. Weather Observation Station 7 (0) | 2020.06.11 |
HackerRank_12. Weather Observation Station 6 (0) | 2020.06.11 |
HackerRank_11. Weather Observation Station 5 (0) | 2020.06.11 |