일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- PostgreSQL
- 전처리
- TRUNCATE
- pandas
- hackerrank
- SQLite
- 데이터분석
- seaborn
- 그로스해킹
- 머신러닝
- GROUPBY
- solvesql
- 프로그래머스
- 다중 JOIN
- 파이썬
- 결측값
- SQL
- matplotlib
- join
- 데이터리안 웨비나
- SUM
- not in
- airflow.cfg
- 데이터시각화
- having
- Limit
- MySQL
- Round
- Oracle
- airflow 설치
Archives
- Today
- Total
Milky's note
[HackerRank](E) Weather Observation Station 2 본문
https://www.hackerrank.com/challenges/weather-observation-station-2/problem?isFullScreen=true
[문제]
Query the following two values from the STATION table:
- The sum of all values in LAT_N rounded to a scale of decimal places.
- The sum of all values in LONG_W rounded to a scale of 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(sum(lat_n),2), round(sum(long_W),2)
from station
각각 위도와 경도 값을 모두 더해서 소수점 2째자리까지 반올림 해주면 된다.
'SQL > SQL 코딩 테스트-HackerRank' 카테고리의 다른 글
[HackerRank](E) Weather Observation Station 14 (0) | 2022.03.25 |
---|---|
[HackerRank](E) Weather Observation Station 13 (0) | 2022.03.25 |
[HackerRank](E) Top Earners (0) | 2022.03.25 |
[HackerRank](E) The Blunder (0) | 2022.03.25 |
[HackerRank](E) Population Density Difference (0) | 2022.03.25 |
Comments