자유를 꿈꾸는 흔한직장인

SQL공부

[HackerRank 해커랭크] Weather Observation Station 11

평범한맨 2022. 11. 9. 22:36

Q : STATION 테이블에서 모음으로 시작하지 않거나 모음으로 끝나지 않는 city를 가져올것.
단, city 순으로.

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') 
order by city
;




문제출처 : HackerRank
문제풀이 : 나 (영어해석 및 SQL이 틀릴 수 있음)