728x90
Weather Observation Station 18
-
Weather Observation Station 18<HackerRank> 2023. 7. 17. 21:25
Weather Observation Station 18 -- MYSQL WITH POINTS 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(ABS((a-c)+(b-d)),4) FROM POINTS -- MS SQL SERVER SELECT CAST(ABS((max(LAT_N) - min(LAT_N)) + (max(LONG_W) - min(LONG_W))) AS decimal(10,4)) FROM station -- ORACLE select round(max(LAT_N)-min(LAT_N)+max(LONG_W)-min(LONG_W),4) from STATION..