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 13
Weather Observation Station 13
Sort by
recency
|
1737 Discussions
|
Please Login in order to post a comment
SELECT ROUND(SUM(LAT_N),4) FROM STATION WHERE LAT_N BETWEEN 38.7880 AND 137.2345;
FOR SQL SERVER
They asked to trunc the value for 4 decimal places so we have to use trunc method instead of round because round gives the nearest value whereas trunc cuts off the digits without rounding
The query is:
SELECT TRUNC(SUM(LAT_N),4) FROM STATION WHERE LAT_N > 38.7880 AND LAT_N < 137.2345;
SELECT ROUND(SUM(LAT_N),4) as lat FROM station WHERE LAT_N BETWEEN '38.7880' and '137.2345';