Algorithm/SQL

[SQL][HackerRank] Weather Observation Station 10

융무 2020. 6. 9. 09:51

https://www.hackerrank.com/challenges/weather-observation-station-10/problem?h_r=next-challenge&h_v=zen

 

Weather Observation Station 10 | HackerRank

Query a list of CITY names not ending in vowels.

www.hackerrank.com

  • 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]$';