Im between cherry

Hackerrank | MySQL | Weather Observation Station 12 본문

데이터분석/practice_query

Hackerrank | MySQL | Weather Observation Station 12

meal 2020. 8. 28. 09:18

Weather Observation Station 12

Query the list of CITY names from STATION that do not start with vowels and do not end with vowels. Your result cannot contain duplicates.

 

 

- Solution

SELECT DISTINCT city
FROM station
WHERE city NOT REGEXP '^[aeiou]'
  AND city NOT REGEXP '[aeiou]$'
SELECT Distinct City
FROM Station
WHERE City NOT rLike '^[aeiou]'
AND City NOT rLike '[aeiou]$'
Comments