Weather Observation Station 8

  • + 0 comments

    As HackerRank uses DB2 Instead of MySQL and Oracle so other all answers are invalid This is the right version , since DB2 doesn't support -1 we've used length function to get last character

    select distinct CITY from STATION where (substr(CITY,1,1) in ('A','E','I','O','U')) AND (substr(CITY,LENGTH(CITY),1) in ('a','e','i','o','u'));