SQL

HackerRank_SQL_Weather Observation Station 6

응엉잉 2023. 1. 5. 14:06

 

 

Weather Observation Station 6 | HackerRank

Query a list of CITY names beginning with vowels (a, e, i, o, u).

www.hackerrank.com

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%'

WHERE  : 조건문

LIKE : 데이터에서 패턴 찾기

OR : 여러개의 조건 연결