We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Weather Observation Station 12
Weather Observation Station 12
Sort by
recency
|
2339 Discussions
|
Please Login in order to post a comment
Solve using Regular Expression
SELECT DISTINCT CITY FROM STATION
WHERE CITY NOT REGEXP '^[aeiouAEIOU]' -- Does not start with a vowel
AND CITY NOT REGEXP '[aeiouAEIOU]$'; -- Does not end with a vowel
MS SQL Sever:
SELECT DISTINCT( city ) FROM station WHERE LEFT(city, 1) NOT IN ( 'a', 'e', 'i', 'o', 'u' ) AND RIGHT(city, 1) NOT IN ( 'a', 'e', 'i', 'o', 'u' )
MY SQL: SELECT DISTINCT CITY FROM STATION WHERE 1=1 AND RIGHT(CITY,1) NOT IN ('a','e','i','o','u') AND LEFT(CITY,1) NOT IN ('a','e','i','o','u')
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.
SELECT DISTINCT CITY FROM STATION WHERE CITY NOT RLIKE '^[aeiou]' AND CITY NOT RLIKE'[aeiou]$'