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 18
Weather Observation Station 18
Sort by
recency
|
2515 Discussions
|
Please Login in order to post a comment
Oracle sample with cte for readability
SELECT round(MAX(LAT_N) - MIN(LAT_N) + MAX(LONG_W) - MIN(LONG_W) ,4) FROM STATION
select round( max(LONG_W)- min(LONG_W) + max(lat_n)- min(lat_n),4) from STATION;
SELECT CAST( ROUND(ABS(MAX(LAT_N)- MIN(LAT_N)) + ABS(MAX(lONG_W) - MIN(LONG_W)),4) AS DECIMAL(18,4) )AS manhattan FROM STATION;
REASON:
CAST(... AS DECIMAL(18,4)) → forces SQL to store and return the number as a fixed-point decimal with exactly 4 digits after the decimal point.
DECIMAL(18,4) means: up to 18 total digits, 4 after the decimal.
So the output is guaranteed to look like 259.6859 (not 259.685900000).
Now the judge sees exactly the expected format → ✅ accepted.