Weather Observation Station 19

  • + 0 comments

    After a lot of searching, I finally found the answer, because I had no idea that the Euclidean distance was the standard way to measure distance. Later, I got it and understood everything.

    SET @min_lat_n = (SELECT MIN(lat_n) FROM station); set @min_long_w = (select min(long_w) from station); set @Max_lat_n = (select max(lat_n) from station); set @max_long_w = (select max(long_w) from station);

    select round(sqrt(pow(@Max_lat_n - @min_lat_n, 2) + pow(@max_long_w - @min_long_w, 2)), 4) from station limit 1;