IT/[SQL] Basic

Weather Observation Station 11

carpe08 2021. 8. 9. 23:53
320x100

Query the list of CITY names from STATION that either do not start with vowels or do not end with vowels. Your result cannot contain duplicates.

Input Format

The STATION table is described as follows:

 

 

 

 

 

 

# 나의 해답

 

SELECT DISTINCT CITY
FROM STATION
WHERE SUBSTR(CITY,1,1) NOT IN ('A','E','I','O','U')
OR SUBSTR(CITY,-1,1) NOT IN ('a','e','i','o','u') ;

320x100
320x100