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