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.
for MSSQL: select
cast(
round(
power(
power(abs(max(LAT_N)-min(LAT_N)),2)+ power(abs(max(LONG_W)-min(LONG_W)),2)/* Square of (b-a) +Square of (d-c)*/
,0.5) /Square root of above expression/
,4)
as decimal(10,4) ) AS Euclidean_Distance
from station
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Weather Observation Station 19
You are viewing a single comment's thread. Return to all comments →
for MSSQL: select cast( round( power( power(abs(max(LAT_N)-min(LAT_N)),2)+ power(abs(max(LONG_W)-min(LONG_W)),2)/* Square of (b-a) +Square of (d-c)*/ ,0.5) /Square root of above expression/ ,4) as decimal(10,4) ) AS Euclidean_Distance from station