Weather Observation Station 13

Sort by

recency

|

1737 Discussions

|

  • + 0 comments

    SELECT ROUND(SUM(LAT_N),4) FROM STATION WHERE LAT_N BETWEEN 38.7880 AND 137.2345;

  • + 0 comments

    FOR SQL SERVER

    SELECT cast(sum(LAT_N) as decimal(10,4))
    FROM station
    where LAT_N BETWEEN 38.7880 and 137.2345;
    
  • + 0 comments

    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;

  • + 0 comments
    SELECT ROUND(SUM(LAT_N), 4)
    FROM STATION
    WHERE LAT_N BETWEEN 38.7880 AND 137.2345
    -- MySQL
    
  • + 0 comments

    SELECT ROUND(SUM(LAT_N),4) as lat FROM station WHERE LAT_N BETWEEN '38.7880' and '137.2345';