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.
You are almost right. Just use 'and' instead of 'or' you will get the ans like this:
select distinct city from station where ((city NOT like '%a' and city NOT like '%e' and city NOT like '%i' and city NOT like '%o' and city NOT like '%u') or (city NOT like 'a%' and city NOT like 'e%' and city NOT like 'i%' and city NOT like 'o%' and city NOT like '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 →
You are almost right. Just use 'and' instead of 'or' you will get the ans like this:
select distinct city from station where ((city NOT like '%a' and city NOT like '%e' and city NOT like '%i' and city NOT like '%o' and city NOT like '%u') or (city NOT like 'a%' and city NOT like 'e%' and city NOT like 'i%' and city NOT like 'o%' and city NOT like 'u%'));