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.
Oracle solution ...
1)
select DISTINCT city from (SELECT T1.city FROM station T1 WHERE lower(SUBSTR(T1.city, -1)) not IN ('a', 'e', 'i', 'o', 'u') union all SELECT T1.city FROM station T1 WHERE lower(SUBSTR(T1.city, 0, 1)) not IN ('a', 'e', 'i', 'o', 'u'));
2)
SELECT DISTINCT CITY FROM STATION WHERE LOWER(SUBSTR(CITY,Length(CITY),1)) NOT IN ('a','e','i','o','u')and LOWER(SUBSTR(CITY,0,1)) NOT 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 11
You are viewing a single comment's thread. Return to all comments →
Oracle solution ... 1) select DISTINCT city from (SELECT T1.city FROM station T1 WHERE lower(SUBSTR(T1.city, -1)) not IN ('a', 'e', 'i', 'o', 'u') union all SELECT T1.city FROM station T1 WHERE lower(SUBSTR(T1.city, 0, 1)) not IN ('a', 'e', 'i', 'o', 'u'));
2) SELECT DISTINCT CITY FROM STATION WHERE LOWER(SUBSTR(CITY,Length(CITY),1)) NOT IN ('a','e','i','o','u')and LOWER(SUBSTR(CITY,0,1)) NOT IN ('a','e','i','o','u');