Please see github.com/anusha-murali for all of my repositories.
Consider $P_1(a, b)$ and $P_2(c, d)$ to be two points on a 2D plane.
LAT_N
in STATION
).LONG_W
in STATION
).LAT_N
in STATION
).LONG_W
in STATION
).Query the Manhattan Distance between points $P_1$ and $P_2$ and round it to a scale of 4 decimal places.
The STATION table is described as follows:
where LAT_N
is the northern latitude and LONG_W
is the western longitude.
SELECT ROUND(ABS(MAX(LAT_N) - MIN(LAT_N)) + ABS(MAX(LONG_W) - MIN(LONG_W)), 4) AS Distance
FROM STATION;