Weather Observation Station 11 solved

In the given context, we have a table named 'station' with a column 'city'. The problem is to find out all the distinct city names that do not start or end with a vowel. The vowels considered here are 'a', 'e', 'i', 'o', 'u'.

Secure your next interview 🎯

CodeRankGPT is a tool powered by GPT-4 that quietly assists you during your coding interview, providing the solutions you need.
In real-time and absolutely undetectable 🥷

Here is the Weather Observation Station 11 solved HackerRank solution using CodeRankGPT:

The solution approach uses the SQL 'select distinct' statement to get unique city names. It then uses the 'where' clause to filter out cities that do not meet the criteria. The 'left' and 'right' functions are used to get the first and last character of the city name respectively. The 'not in' operator is used to check if these characters are not in the set of vowels.


select distinct city from station where left(city,1) not in('a','e','i','o','u') or right(city,1) not in('a','e','i','o','u');

If you have a HackerRank coding test coming up, you can use CodeRankGPT to your advantage. It will assist you during your interview and help ensure you get the job.

AI is here now, and other candidates might be using it to get ahead and win the job. 🧐

Built on Unicorn Platform