Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION. Your result cannot contain duplicates.
Solution
SELECT DISTINCT CITY FROM STATION WHERE CITY REGEXP '^[AEIOU]'
SELECT DISTINCT CITY FROM STATION WHERE CITY RLIKE '^[AEIOU].*'
Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. Your result cannot contain duplicates.
Solution
SELECT DISTINCT CITY FROM STATION WHERE CITY RLIKE '[aeiou]$'
SELECT DISTINCT CITY FROM STATION WHERE CITY REGEXP '.*[aeiou]$'
Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last characters. Your result cannot contain duplicates.
Solution
SELECT DISTINCT CITY FROM STATION WHERE CITY REGEXP '^[AEIOU]' AND CITY RLIKE '[AEIOU]$'
SELECT DISTINCT CITY FROM STATION WHERE CITY REGEXP '^[AEIOU].*[aeiou]$'
Query the list of CITY names from STATION that do not start with vowels. Your result cannot contain duplicates.
Solution
SELECT DISTINCT CITY FROM STATION WHERE NOT CITY REGEXP '^[AEIOU]'
SELECT DISTINCT CITY FROM STATION WHERE CITY NOT REGEXP '^[AEIOU].*'
Query the list of CITY names from STATION that do not end with vowels. Your result cannot contain duplicates.
Solution
SELECT DISTINCT CITY FROM STATION WHERE CITY NOT REGEXP '[aeiou]$'
Query the list of CITY names from STATION that either do not start with vowels or do not end with vowels. Your result cannot contain duplicates.
Solution
SELECT DISTINCT CITY FROM STATION WHERE CITY NOT RLIKE '^[aeiou]' OR CITY NOT REGEXP '[aeiou]$'
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]$'