cs

[Problem]

Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. Your result cannot contain duplicates.

Input Format

The STATION table is described as follows:

 

https://www.hackerrank.com/challenges/weather-observation-station-7/problem?h_r=next-challenge&h_v=zen

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

 

 

[My Answer]

1
2
3
4
SELECT DISTINCT CITY 
FROM STATION 
WHERE CITY REGEXP '[aeiou]$';
 
cs

Why code is different between starting and ending... I was trying to input '^' last of [], but it was '$' rather than '^'. 

+ Recent posts