일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- matplotlib
- 머신러닝
- SQL
- hackerrank
- solvesql
- join
- 전처리
- 데이터리안 웨비나
- 프로그래머스
- MySQL
- PostgreSQL
- SQLite
- 데이터시각화
- Round
- pandas
- 데이터분석
- 그로스해킹
- GROUPBY
- TRUNCATE
- 결측값
- having
- not in
- Oracle
- Limit
- airflow.cfg
- 다중 JOIN
- airflow 설치
- 파이썬
- seaborn
- SUM
Archives
- Today
- Total
Milky's note
[HackerRank](E) Weather Observation Station 14 본문
https://www.hackerrank.com/challenges/weather-observation-station-14/problem?isFullScreen=true
Weather Observation Station 14 | HackerRank
Query the greatest value of the Northern Latitudes from STATION that are under 137.2345 and truncated to 4 decimal places.
www.hackerrank.com
[문제]
Query the greatest value of the Northern Latitudes (LAT_N) from STATION that is less than . Truncate your answer to 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 truncate(max(lat_N),4) from station
where lat_n < 137.2345
문제에서 137.2345 보다 큰 값들 중에 가장 큰 컬럼을 물어보았고, 4자리수 밑으로 버림을 하라고 하여서 truncate를 사용하였다.
'SQL > SQL 코딩 테스트-HackerRank' 카테고리의 다른 글
[HackerRank](E) Weather Observation Station 16 (0) | 2022.03.25 |
---|---|
[HackerRank](E) Weather Observation Station 15 (0) | 2022.03.25 |
[HackerRank](E) Weather Observation Station 13 (0) | 2022.03.25 |
[HackerRank](E) Weather Observation Station 2 (0) | 2022.03.25 |
[HackerRank](E) Top Earners (0) | 2022.03.25 |
Comments