Anusha Murali

Logo

Please see github.com/anusha-murali for all of my repositories.

View GitHub Profile

26. Weather Observation Station 11: Solution


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.

The STATION table is described as follows:

16

where LAT_N is the northern latitude and LONG_W is the western longitude.

solution_image5

We can use Oracle’s REGEXP_LIKE() function to construct this query as follows:

SELECT DISTINCT CITY
FROM STATION
WHERE REGEXP_LIKE(CITY, '^[^AEIOU]') OR REGEXP_LIKE(CITY, '[^aeiou]$');

Back to problems


anusha-murali.github.io