일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- PostgreSQL
- MySQL
- seaborn
- 파이썬
- join
- 프로그래머스
- pandas
- 결측값
- SQLite
- 데이터분석
- Limit
- Oracle
- matplotlib
- SQL
- airflow 설치
- TRUNCATE
- SUM
- 그로스해킹
- 전처리
- 머신러닝
- GROUPBY
- 데이터시각화
- not in
- 다중 JOIN
- Round
- having
- hackerrank
- 데이터리안 웨비나
- mysql :=
- solvesql
Archives
- Today
- Total
Milky's note
[HackerRank](E) Weather Observation Station 14 본문
https://www.hackerrank.com/challenges/weather-observation-station-14/problem?isFullScreen=true
[문제]
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