~고군분투 인생살이~

[EASY] Weather Observation Station 6 본문

SQL/HACKER_RANK

[EASY] Weather Observation Station 6

소금깨 2022. 10. 26. 03:08
 

Weather Observation Station 6 | HackerRank

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

www.hackerrank.com

문제 조건

a,e,i,o,u로 시작되는 city의 이름을 출력하시오

 

문제 풀이 

# solution 1 
select city
from station
where left(city,1) in ('a','e','i','o','u')

# solution 2 
select city
from station
where substr(city,1,1) in ('a','e','i','o','u')
Comments