728x90
❓ Question
https://www.hackerrank.com/challenges/weather-observation-station-8
❗ Answer
SELECT DISTINCT(city)
FROM station
WHERE (LEFT(city,1) IN ('a','e','i','o','u'))
AND (RIGHT(city,1) IN ('a','e','i','o','u'));
📌 Discussion
- WHERE 절에서 LEFT와 RIGHT 조건을 AND로 동시 만족 시키는 레코드만 추출
'SQL 문제풀이' 카테고리의 다른 글
[해커랭크 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 7 (0) | 2023.08.18 |
[해커랭크 SQL] Basic Select - Weather Observation Station 6 (0) | 2023.08.16 |
[해커랭크 SQL] Basic Select - Weather Observation Station 4 (0) | 2023.08.16 |