Please see github.com/anusha-murali for all of my repositories.
Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. Your result cannot contain duplicates.
The STATION table is described as follows:
where LAT_N
is the northern latitude and LONG_W
is the western longitude.
We can use the SUBSTR()
function to check if the last letter of the city is a vowel as follows:
SELECT DISTINCT CITY
FROM STATION
WHERE SUBSTR(CITY, LENGTH(CITY), 1) IN ('a', 'e', 'i', 'o', 'u');
We can also use the REGEXP_LIKE
() function to check if the last letter of the city is a vowel as follows:
SELECT DISTINCT CITY
FROM STATION
WHERE REGEXP_LIKE(CITY, '*[aeiou]$');