본문 바로가기
DB/SQL

HackerRank_14. Weather Observation Station 8

by _S0_H2_ 2020. 6. 11.
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
반응형