Skip to content

Instantly share code, notes, and snippets.

@malkahakuk
Created January 27, 2022 19:06
Show Gist options
  • Save malkahakuk/02a7605570b6e5772736ac8a4fdcf12a to your computer and use it in GitHub Desktop.
Save malkahakuk/02a7605570b6e5772736ac8a4fdcf12a to your computer and use it in GitHub Desktop.
BASIC SQL
//* Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION. Your result cannot contain duplicates.
Input Format
The STATION table is described as follows:
Station.jpg
where LAT_N is the northern latitude and LONG_W is the western longitude. *//
Result:
SELECT DISTINCT city
FROM station
WHERE LEFT(CITY, 1) IN ('A', 'E', 'I', 'O', 'U')
ORDER BY city ASC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment