일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 전처리
- SQL
- Round
- SQLite
- 데이터시각화
- having
- TRUNCATE
- Limit
- MySQL
- 프로그래머스
- not in
- 그로스해킹
- pandas
- SUM
- 파이썬
- airflow 설치
- 결측값
- 머신러닝
- Oracle
- GROUPBY
- hackerrank
- 데이터리안 웨비나
- solvesql
- matplotlib
- join
- airflow.cfg
- 다중 JOIN
- seaborn
- PostgreSQL
- 데이터분석
Archives
- Today
- Total
Milky's note
[HackerRank](E) Weather Observation Station 3 본문
https://www.hackerrank.com/challenges/weather-observation-station-3/problem?isFullScreen=true
[문제]
Query a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicates from the answer.
The STATION table is described as follows:
where LAT_N is the northern latitude and LONG_W is the western longitude.
[답]
-oracle
select distinct(city) from station
where mod(id,2)=0;
mod는 나누고 난 뒤 나머지값을 의미하는 함수
# 2로 나눈 값의 나머지가 1이므로 홀수
mod(컬럼,2) = 1
# 2로 나눈 값의 나머지가 0이므로 짝수
mod(컬럼,2) = 0
'SQL > SQL 코딩 테스트-HackerRank' 카테고리의 다른 글
[HackerRank](E) Weather Observation Station 5 (0) | 2022.03.16 |
---|---|
[HackerRank](E) Weather Observation Station 4 (0) | 2022.03.16 |
[HackerRank](E) Weather Observation Station 1 (0) | 2022.03.16 |
[HackerRank](E) Japanese Cities' Names (0) | 2022.03.16 |
[HackerRank](E) Japanese Cities' Attributes (0) | 2022.03.16 |
Comments