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.
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'));
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Weather Observation Station 8
You are viewing a single comment's thread. Return to all 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'));