Created
September 29, 2020 18:07
-
-
Save Justus-coded/4e152b6b19b097a41f411a9347d5cf6d to your computer and use it in GitHub Desktop.
Hackerrank SQL Challenge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last characters. Your result cannot contain duplicates. | |
*/ | |
SELECT DISTINCT CITY | |
FROM STATION | |
WHERE (LEFT(UPPER(CITY),1) IN ('A','E','I','O','U')) AND (RIGHT(UPPER(CITY),1) IN ('A','E','I','O','U')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment