일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 프로그래머스
- skip-gram
- select
- FullyConnectedLayer
- backward
- hash
- Stack
- 자연어처리
- que
- dl
- CBOW
- stak
- Python
- 신경망
- affine
- PPMI
- algorithm
- boj
- Heap
- sort
- Numpy
- Programmers
- SQL
- Sigmoid
- DeepLearning
- 파이썬
- MySQL
- Word2vec
- 딥러닝
- kakao
Archives
- Today
- Total
혜온의 이것저것
[HackerRank] Weather Observation Station 18 (MySQL) 본문
https://www.hackerrank.com/challenges/weather-observation-station-18/problem?isFullScreen=true
문제
Consider P1(a,b) and P2(c,d) to be two points on a 2D plane.
- a happens to equal the minimum value in Northern Latitude (LAT_N in STATION).
- b happens to equal the minimum value in Western Longitude (LONG_W in STATION).
- c happens to equal the maximum value in Northern Latitude (LAT_N in STATION).
- d happens to equal the maximum value in Western Longitude (LONG_W in STATION).
Query the Manhattan Distance between points P1 and P2 and round it to a scale of 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.
풀이
select round((max(lat_n)-min(lat_n))+(max(long_w)-min(long_w)),4)
from station
'Data Analysis > SQL' 카테고리의 다른 글
[HackerRank] Weather Observation Station 20 (MySQL) (0) | 2022.08.22 |
---|---|
[HackerRank] Weather Observation Station 19 (MySQL) (0) | 2022.08.22 |
[HackerRank] Weather Observation Station 17 (MySQL) (0) | 2022.08.16 |
[HackerRank] Weather Observation Station 16 (MySQL) (0) | 2022.08.16 |
[HackerRank] Weather Observation Station 15 (MySQL) (0) | 2022.08.16 |
Comments