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
|
2352 Discussions
|
Please Login in order to post a comment
SELECT ROUND( SQRT( POWER(MAX(LAT_N) - MIN(LAT_N), 2) + POWER(MAX(LONG_W) - MIN(LONG_W), 2) ), 4 ) AS euclidean_distance FROM STATION;
MS SQL Server:
Select Format(Round(Sqrt((Power((Min(s.LAT_N)-Max(s.LAT_N)),2) + Power((Min(s.LONG_W)-Max(s.LONG_W)),2))),4), '0.####') From STATION s;
** THIS QUESTION I AM DOING WITH CTE BUT SOME SYNTAX MISTAKE I DID FIX WITH THE HELP CHATGPT *
WITH VALUES_FIND AS ( SELECT MIN(LAT_N) AS A, MAX(LAT_N) AS B, MIN(LONG_W) AS C, MAX(LONG_W) AS D FROM STATION ) SELECT ROUND(SQRT(POW(B - A, 2) + POW(D - C, 2)), 4) FROM VALUES_FIND;