Weather Observation Station 18

  • + 2 comments

    Hope this MySQL solution helps someone!

    notes:

    |a - c| + |b - d|
    a = min lat_n
    b = min long_w
    c = max lat_n
    d = max long_w
    

    solution:

    SELECT ROUND(
    	ABS( MIN(lat_n) - MAX(lat_n) ) 
    	+ 
    	ABS( MIN(long_w) - MAX(long_w) ), 
    	4)
    FROM station;