Hackerrank-Code icon indicating copy to clipboard operation
Hackerrank-Code copied to clipboard

*DRY* | More readable way of writing the query | Weather Observation Station 6

Open NuranTerlan opened this issue 3 years ago • 0 comments

Change to this ->

SELECT DISTINCT city FROM station
WHERE LEFT(city, 1) IN ('A', 'E', 'I', 'O', 'U')

LEFT(string, char_count) function lets you get the character(s) of a string from the left by specifying a count

NuranTerlan avatar Mar 17 '21 13:03 NuranTerlan