Weather Observation Station 7

Sort by

recency

|

3178 Discussions

|

  • + 0 comments

    -- 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');

  • + 0 comments

    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

  • + 0 comments

    select distinct city from station where substring(city,length(city),1) in('a','e','i','o','u');

  • + 0 comments

    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

  • + 0 comments

    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;