Weather Observation Station 18

Sort by

recency

|

2403 Discussions

|

  • + 0 comments

    My SQL Solution :

    -- ---> manhatten distance Formula = |x1-x2|+|y1-y2| -- as per question a = x1, b = y1, c = x2, d = y2 --abs() = return a non negative value

    select round(abs(min(lat_n)-max(lat_n)) + abs(min(long_w)-max(long_w)), 4) from station `

  • + 0 comments

    In case you are using DB2 and still got the wrong answer, don't forget to use cast as decimal since this is caused by the trailing zeros.

  • + 0 comments

    Select Round(ABS(Min(LAT_N) - Max(LAT_N)) + ABS(Min(LONG_W) - Max(LONG_W)), 4) From STATION;

  • + 0 comments

    select round(((max(lat_n))-(min(lat_n)))+((max(long_w))-(min(long_w))),4) from station

  • + 0 comments

    SELECT ROUND(( MAX(LONG_W))-( MIN(LONG_W)),4) + ROUND(( MAX(LAT_N))-( MIN(LAT_N)),4) FROM STATION