일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- airflow.cfg
- not in
- 데이터분석
- 파이썬
- MySQL
- Oracle
- 그로스해킹
- 데이터시각화
- 다중 JOIN
- SQL
- having
- seaborn
- matplotlib
- 데이터리안 웨비나
- SUM
- pandas
- 결측값
- GROUPBY
- join
- PostgreSQL
- 전처리
- Limit
- Round
- TRUNCATE
- 프로그래머스
- solvesql
- 머신러닝
- hackerrank
- SQLite
- airflow 설치
Archives
- Today
- Total
Milky's note
[HackerRank](E) Weather Observation Station 8 본문
https://www.hackerrank.com/challenges/weather-observation-station-8/problem?isFullScreen=true
Weather Observation Station 8 | HackerRank
Query CITY names that start AND end with vowels.
www.hackerrank.com
[문제]
Query the list of CITY names from STATION which have vowels (i.e., a, e, i, o, and u) as both their first and last characters. Your result cannot contain duplicates.
Input Format
The STATION table is described as follows:

where LAT_N is the northern latitude and LONG_W is the western longitude.
[답]
-mysql
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');
6, 7 번 문제를 동시에 만족하는 조건을 추가해주면 된다.
and를 사용해서 두 가지 만족하는 조건을 추가하였다.
'SQL > SQL 코딩 테스트-HackerRank' 카테고리의 다른 글
[HackerRank](E) Weather Observation Station 10 (0) | 2022.03.16 |
---|---|
[HackerRank](E) Weather Observation Station 9 (0) | 2022.03.16 |
[HackerRank](E) Weather Observation Station 7 (0) | 2022.03.16 |
[HackerRank](E) Weather Observation Station 6 (0) | 2022.03.16 |
[HackerRank](E) Weather Observation Station 5 (0) | 2022.03.16 |
Comments