나홀로공부/Oracle

HackerRank - Weather Observation Station 7

mikan- 2023. 5. 6. 22:50

Question - HackerRank - Weather Observation Station 7

 

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:

 

번역

 

STATION에서 모음(a, e, i, o, u)으로 끝나는 CITY 이름 목록을 쿼리합니다. 결과에 중복 항목을 포함할 수 없습니다.
입력 형식
STATION 테이블은 다음과 같이 설명됩니다:

 

정답

 

SELECT DISTINCT city
FROM STATION
WHERE city LIKE '%a' 
    OR city LIKE '%e'
    OR city LIKE '%i'
    OR city LIKE '%o'
    OR city LIKE '%u';