Weather Observation Station 19

  • + 0 comments
    /* P1(a,c) & P2(b,d)
    (a,b) are the respective minimum and maximum values of Northern Latitude (LAT_N)
    (c,d) are the respective minimum and maximum values of Western Longitude (LONG_W)
    
    Euclidean Distance (2D Plane): square_root( (q1-p1)^2 + (q2-p2)^2 )
    */
    
    select
        round(
            sqrt(
                power(max(LAT_N) - min(LAT_N), 2) + power(max(LONG_W) - min(LONG_W), 2)
                )
            ,4)
    from station;