SQL

[해커랭크] Weather Observation Station 11&12

주스 JUICE 2023. 7. 11. 22:48
728x90

이전 문제 응용

 

Weather Observation Station 11

 

https://www.hackerrank.com/challenges/weather-observation-station-11/problem

 

Weather Observation Station 11 | HackerRank

Query a list of CITY names not starting or ending with vowels.

www.hackerrank.com

 

 

select distinct city
from station
where city not regexp '^[aeiou]'
    or city not regexp '[aeiou]$'

 

 

 

 

 

Weather Observation Station 12

 

https://www.hackerrank.com/challenges/weather-observation-station-12/problem

 

Weather Observation Station 12 | HackerRank

Query an alphabetically ordered list of CITY names not starting and ending with vowels.

www.hackerrank.com

 

select distinct city
from station
where city not regexp '^[aeiou]'   
    and city not regexp '[aeiou]$'

 

728x90