Please see github.com/anusha-murali for all of my repositories.
Query the list of CITY names starting with vowels (i.e., a, e, i, o, or 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.
SELECT DISTINCT CITY
FROM STATION
WHERE SUBSTR(CITY, 1, 1) IN ('A', 'E', 'I', 'O', 'U');
We could also use Oracle’s REGEXP_LIKE()
function as follows:
SELECT DISTINCT CITY
FROM STATION
WHERE REGEXP_LIKE (CITY, '^[AEIOU]');