HackerRank/SQL

[hackerrank] Weather Observation Station 8

예쁜꽃이피었으면 2022. 8. 8. 16:58

[hackerrank] Prepare > SQL > Basic Select >  Weather Observation Station 8

 

[문제]

Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last characters. Your result cannot contain duplicates.

Input Format

The STATION table is described as follows:

where LAT_N is the northern latitude and LONG_W is the western longitude.

 

[MYSQL]

 

 

[ORCALE]

select distinct(city)
from station
where regexp_like(city,'^a|^e|^i|^o|^u','i')
and regexp_like(city,'a$|e$|i$|o$|u$','i');

 

 

 

반응형