- query CITY names ==> SELECT CITY
- from STATION table ==> FROM STATION
- do not end with vowels ==> WHERE CITY REGEXP ‘[^aeiou]$’
- do not contain duplicates ==> SELECT DISTINCT CITY
select distinct city
from station
where city regexp '[^aeiou]$';
'Algorithm > SQL' 카테고리의 다른 글
[SQL][HackerRank] Weather Observation Station 12 (0) | 2020.06.09 |
---|---|
[SQL][HackerRank] Weather Observation Station 11 (0) | 2020.06.09 |
[SQL][HackerRank] Weather Observation Station 9 (0) | 2020.06.09 |
[SQL][HackerRank] Weather Observation Station 8 (0) | 2020.06.08 |
[SQL][HackerRank] Weather Observation Station 6 (0) | 2020.06.08 |