Problem Statement : Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION. Your result cannot contain duplicates.
where LAT_N is the northern latitude and LONG_W is the western longitude.
Solution :
For this challenge, we must:
Use a Distinct() function to get unique cities.
Restrict the selected rows using the WHERE clause so that only records where CITY names start with vowels are returned.
Query :
SELECT Distinct CITY
FROM STATION
WHERE city like 'a%' or city like 'e%' or city like 'i%' or city like 'o%' or city like 'u%';
Output:
Hope you learn something !!!
If you have any questions let me know in the comment section.