Anusha Murali

Logo

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

View GitHub Profile

27. Weather Observation Station 12: Solution


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.

The STATION table is described as follows:

16

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

solution_image5

As before, we use Oracle’s REGEXP_LIKE()() function. The only difference between the previous query and the current one is that the CITY name should neither begin with a vowel nor end with a vowel.

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

Back to problems


anusha-murali.github.io