Algorithm/SQL
[SQL][HackerRank] Weather Observation Station 18
융무
2020. 6. 10. 12:38
Weather Observation Station 18 | HackerRank
Query the Manhattan Distance between two points, round or truncate to 4 decimal digits.
www.hackerrank.com
The Manhattan Distance 는 |x1 - x2| + |y1 - y2| = |a - c| + |b - d|.
SELECT ROUND(ABS(MIN(LAT_N)-MAX(LAT_N)) + ABS(MIN(LONG_W)-MAX(LONG_W)),4)
FROM STATION