From 66454c41890d8fe9ac5be1590d4639462f086447 Mon Sep 17 00:00:00 2001 From: Aravind D <123975441+Aravind-2024@users.noreply.github.com> Date: Sat, 1 Jun 2024 20:45:38 +0530 Subject: [PATCH] Update basic-select.md I hope this is smallest query and easy to understand --- basic-select.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/basic-select.md b/basic-select.md index bfdfa6e..0e8ff69 100644 --- a/basic-select.md +++ b/basic-select.md @@ -353,8 +353,10 @@ The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. **Solution** -```sql -SELECT DISTINCT CITY FROM STATION WHERE UPPER(SUBSTR(CITY, LENGTH(CITY), 1)) NOT IN ('A','E','I','O','U') AND LOWER(SUBSTR(CITY, LENGTH(CITY),1)) NOT IN ('a','e','i','o','u'); + +SELECT DISTINCT city +FROM station +WHERE city NOT LIKE '%a' AND city NOT LIKE '%e' AND city NOT LIKE '%i' AND city NOT LIKE '%o' AND city NOT LIKE '%u'; ``` ###**[Weather Observation Station 11](https://www.hackerrank.com/challenges/weather-observation-station-11/problem)**