728x90
❓ Question
https://www.hackerrank.com/challenges/weather-observation-station-11
❗ Answer
SELECT DISTINCT(city)
FROM station
WHERE (LEFT(city,1) NOT IN ('a','e','i','o','u'))
OR (RIGHT(city,1) NOT IN ('a','e','i','o','u'));
📌 Discussion
- WHERE에 OR로 합집합 조건을 걸어줌
'SQL 문제풀이' 카테고리의 다른 글
[해커랭크 SQL] Basic Select - Higher Than 75 Marks (0) | 2023.08.18 |
---|---|
[해커랭크 SQL] Basic Select - Weather Observation Station 12 (0) | 2023.08.18 |
[해커랭크 SQL] Basic Select - Weather Observation Station 10 (1) | 2023.08.18 |
[해커랭크 SQL] Basic Select - Weather Observation Station 9 (0) | 2023.08.18 |
[해커랭크 SQL] Basic Select - Weather Observation Station 8 (0) | 2023.08.18 |