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.
(첫 시작은 대문자, 끝은 소문자로 되어있다.)
-- 1
SELECT CITY
FROM STATION
WHERE REGEXP_LIKE(CITY, '^A|^E|^I|^O|^U')
AND REGEXP_LIKE(CITY, 'a$|e$|i$|o$|u$')
GROUP BY CITY;
-- 2
SELECT CITY
FROM STATION
WHERE REGEXP_LIKE(CITY, '^[A|E|I|O|U]')
AND REGEXP_LIKE(CITY, '[a|e|i|o|u]$')
GROUP BY CITY;
Query the list of CITY names from STATION that do not start with vowels. Your result cannot contain duplicates.
SELECT CITY
FROM STATION
WHERE NOT REGEXP_LIKE(CITY, '^[A|E|I|O|U]')
GROUP BY CITY;
Query the list of CITY names from STATION that do not end with vowels. Your result cannot contain duplicates.
SELECT CITY
FROM STATION
WHERE NOT REGEXP_LIKE(CITY, '[a|e|i|o|u]$')
GROUP BY CITY;
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.
SELECT CITY
FROM STATION
WHERE NOT REGEXP_LIKE(CITY, '^[A|E|I|O|U]')
OR NOT REGEXP_LIKE(CITY, '[a|e|i|o|u]$')
GROUP BY CITY;
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 CITY
FROM STATION
WHERE NOT REGEXP_LIKE(CITY, '^[A|E|I|O|U]')
AND NOT REGEXP_LIKE(CITY, '[a|e|i|o|u]$')
GROUP BY CITY;