Query the list of CITY names from STATION that either do not start with vowels or do not end with vowels. Your result cannot contain duplicates.
Question
Query the list of CITY names from STATION that either do not start with vowels or do not end with vowels. Your result cannot contain duplicates.
Solution
This question seems to be asking for a SQL query. Here's how you can do it:
SELECT DISTINCT CITY
FROM STATION
WHERE CITY NOT LIKE '[aeiou]%' OR CITY NOT LIKE '%[aeiou]'
This query works as follows:
-
SELECT DISTINCT CITY FROM STATION: This part of the query selects all unique city names from the tableSTATION. -
WHERE CITY NOT LIKE '[aeiou]%' OR CITY NOT LIKE '%[aeiou]': This is the condition for filtering the cities. It selects cities that do not start (NOT LIKE '[aeiou]%') or do not end (NOT LIKE '%[aeiou]') with a vowel.
Please note that SQL is case sensitive, so if there are city names that start or end with uppercase vowels, you might want to convert the city names to either lower or upper case before comparing.
Similar Questions
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.Input FormatThe STATION table is described as follows:
uery a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicates from the answer.
Query the two cities in STATION with the shortest and longest CITY names, as well as their respective lengths (i.e.: number of characters in the name). If there is more than one smallest or largest city, choose the one that comes first when ordered alphabetically
Query a list of CITY names from STATION for cities that have an even ID number.
Find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table.The STATION table is described as follows:where LAT_N is the northern latitude and LONG_W is the western longitude.For example, if there are three records in the table with CITY values 'New York', 'New York', 'Bengalaru', there are 2 different city names: 'New York' and 'Bengalaru'. The query returns , because .
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.