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 2
Weather Observation Station 2
Sort by
recency
|
1467 Discussions
|
Please Login in order to post a comment
MYSQL: select round(sum(Lat_N),2), round(sum(Long_w),2) from station;
SELECT ROUND(SUM(LATN), 2), ROUND(SUM(LONGW), 2) FROM STATION;
**(IF THIS QUERY DOESN'T WORK SMH) Try this:
SELECT CAST(ROUND(SUM(LAT_N), 2) AS DECIMAL(10,2)), CAST(ROUND(SUM(LONG_W), 2) AS DECIMAL(10,2)) FROM STATION;
CAST FORCES THE OUTPUT TO SHOW ONLY 2 DECIMALS
MySQL :
SELECT ROUND(SUM(LAT_N),2) AS lat, ROUND(SUM(LONG_W),2) AS lon FROM STATION;
For MYSQL
SELECT CAST(ROUND(SUM(LAT_N),2) AS DECIMAL(20,2)), CAST(ROUND(SUM(LONG_W),2) AS DECIMAL(20,2)) FROM STATION