A description of the problem can be found on Hackerrank.
As Weather Observation Station 7, only the condition is opposite.
I created solution in:
All solutions are also available on my GitHub.
select distinct city
substr(lower(city), length(city), 1) not in ('a', 'e', 'i', 'o', 'u')
order by city;