Weather Observation Station 19

  • + 0 comments

    select a,b,c,d from inner table. The eucilidean distance formula from link- important thing is to note square root and cast function.

    SELECT CAST(sqrt(((b-a)(b-a))+ ((d-c)(d-c)))AS DECIMAL(38,4)) FROM (SELECT min(LAT_N) as a, max(LAT_N) as b, min(LONG_W) as c, max(LONG_W) as d FROM Station) AS euclidean_distance;