Weather Observation Station 10

Sort by

recency

|

2219 Discussions

|

  • + 0 comments
    SELECT DISTINCT CITY
    FROM STATION
    WHERE RIGHT(CITY, 1) NOT IN ('a', 'i', 'u', 'e', 'o')
    
  • + 0 comments

    select distinct city from station where not(lower(right(city,1)) in ('a','e','i','o','u'));

  • + 0 comments
    SELECT DISTINCT
        CITY
    FROM 
        STATION
    WHERE
        UPPER(RIGHT(CITY, 1)) NOT IN ('A','E','I','O','U')
    

    or

    SELECT DISTINCT
        CITY
    FROM
        STATION
    WHERE
        UPPER(RIGHT(CITY, 1)) NOT REGEXP '^[AEIOU]'
    
  • + 0 comments

    For that we can use different queries based on performance & optimization

    • select distinct(city) from station where LOWER(RIGHT(city,1)) not in ('a','e','i','o','u');

    • SELECT DISTINCT city FROM station WHERE SUBSTRING(city, LENGTH(city), 1) NOT IN ('a','e','i','o','u','A','E','I','O','U');

  • + 0 comments

    SELECT DISTINCT CITY FROM STATION WHERE UPPER(SUBSTR(CITY, -1)) NOT IN ('A', 'E', 'I', 'O', 'U');