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.
WITH distance AS (
SELECT MIN(lat_n) AS a
,MIN(long_w)AS b
,MAX(lat_n) AS c
,MAX(long_w) AS d
FROM STATION
)
SELECT round((c-a) + (d-b),4)
FROM distance
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 18
You are viewing a single comment's thread. Return to all comments →
Hi, this is my option in mysql:
WITH distance AS ( SELECT MIN(lat_n) AS a ,MIN(long_w)AS b ,MAX(lat_n) AS c ,MAX(long_w) AS d FROM STATION ) SELECT round((c-a) + (d-b),4) FROM distance