We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Weather Observation Station 7
Weather Observation Station 7
Sort by
recency
|
3178 Discussions
|
Please Login in order to post a comment
-- Query the list of City names ending with vowels(a,i,u,e,o) FROM STATION -- the process is similar like before with starting vowels LEFT but use right and filter to one alphabec to produce the result wanted
SELECT DISTINCT(CITY)
FROM STATION
WHERE LOWER(RIGHT(CITY, 1)) IN ('a','i','u','e','o');
select distinct city from station where city like "%a" or city like "%e" or city like "%i" or city like "%o" or city like"%u" it worked for sql
select distinct city from station where substring(city,length(city),1) in('a','e','i','o','u');
WITH CTE AS( SELECT CASE WHEN SUBSTRING(LOWER(CITY), LEN(CITY),1) IN ( 'a', 'e', 'i', 'o','u') THEN CITY ELSE NULL END AS CITY FROM STATION ) SELECT DISTINCT(CITY) FROM CTE WHERE CITY IS NOT NULL
SELECT DISTINCT CITY FROM STATION WHERE CITY LIKE '%a' OR CITY LIKE '%e' OR CITY LIKE '%i' OR CITY LIKE '%o' OR CITY LIKE '%u' ORDER BY CITY ASC;