Anusha Murali

Logo

Please see github.com/anusha-murali for all of my repositories.

View GitHub Profile

33. Weather Observation Station 18: Solution


Consider $P_1(a, b)$ and $P_2(c, d)$ to be two points on a 2D plane.

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:

16

where LAT_N is the northern latitude and LONG_W is the western longitude.

solution_image5

SELECT ROUND(ABS(MAX(LAT_N) - MIN(LAT_N)) + ABS(MAX(LONG_W) - MIN(LONG_W)), 4) AS Distance
FROM STATION;

Back to problems


anusha-murali.github.io