We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Weather Observation Station 19
Weather Observation Station 19
Sort by
recency
|
2271 Discussions
|
Please Login in order to post a comment
For MySQL
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;
select round(sqrt(pow(max(lat_n)-min(lat_n),2)+pow(max(long_w)-min(long_w),2)),4) from station
SELECT ROUND(SQRT(POWER(MAX(LAT_N) - MIN(LAT_N),2) + POWER(MAX(LONG_W) - MIN(LONG_W),2)),4) FROM STATION;