일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 전처리
- 그로스해킹
- airflow.cfg
- 다중 JOIN
- 프로그래머스
- 머신러닝
- 데이터분석
- airflow 설치
- Oracle
- pandas
- matplotlib
- 결측값
- not in
- having
- SUM
- hackerrank
- join
- Limit
- SQL
- Round
- SQLite
- PostgreSQL
- 파이썬
- MySQL
- solvesql
- GROUPBY
- 데이터시각화
- 데이터리안 웨비나
- seaborn
- TRUNCATE
Archives
- Today
- Total
Milky's note
[HackerRank](E) Weather Observation Station 15 본문
https://www.hackerrank.com/challenges/weather-observation-station-15/problem?isFullScreen=true
Weather Observation Station 15 | HackerRank
Query the Western Longitude for the largest Northern Latitude under 137.2345, rounded to 4 decimal places.
www.hackerrank.com
[문제]
Query the Western Longitude (LONG_W) for the largest Northern Latitude (LAT_N) in STATION that is less than 137.2345. Round your answer to 4 decimal places.
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 round(long_w,4) from station
where lat_N < 137.2345
order by lat_n desc
limit 1
주어진 조건보다 큰 값 중 가장 큰 lat_n에 대하여 long_w를 구해주는 문제이다.
가장 큰 값을 구하기 위해 order by를 desc로 정렬한 뒤 limit를 1 해주었다.
'SQL > SQL 코딩 테스트-HackerRank' 카테고리의 다른 글
[HackerRank](E) Weather Observation Station 17 (0) | 2022.03.25 |
---|---|
[HackerRank](E) Weather Observation Station 16 (0) | 2022.03.25 |
[HackerRank](E) Weather Observation Station 14 (0) | 2022.03.25 |
[HackerRank](E) Weather Observation Station 13 (0) | 2022.03.25 |
[HackerRank](E) Weather Observation Station 2 (0) | 2022.03.25 |
Comments