YUKIโs DEV BLOG ๐ป
/
Coding Test
/
SQL ์ฐ์ต ๋ฐ ์ฝ๋ฉํ ์คํธ
/
Weather Observation Station 18
Search
Share
Weather Observation Station 18
Weather Observation Station 18 | HackerRank
Query the Manhattan Distance between two points, round or truncate to 4 decimal digits.
In a plane with p1ย at (x1, y1) and p2ย at (x2, y2), it is |x1ย - x2| + |y1ย - y2|.
SELECT ROUND
(
(
ABS
(
MAX
(
LAT_N
)
-
MIN
(
LAT_N
)
)
+
ABS
(
MAX
(
LONG_W
)
-
MIN
(
LONG_W
)
)
)
,
4
)
FROM STATION
Python
๋ณต์ฌ