Weather Observation Station 8

  • + 13 comments

    simplified by taking out the nested SELECT and just replacing it with another REGEXP.

    So we have for mySQL:

    SELECT DISTINCT city FROM station WHERE city RLIKE '^[aeiou]' AND city RLIKE '[aeiou]$'

    RLIKE is just a synonym for REGEXP for those who don't know.

    Also, simplified even more by (credit: rshaghoulian):

    SELECT DISTINCT city FROM station WHERE city RLIKE '^[aeiou.*aeiou]$'