Weather Observation Station 13

  • + 0 comments

    For MySQL Platform

    Using BETWEEN operator will give you the same result. But as per question, its wrong to use that operator because when using BETWEEN, both the start(38.7880) and end(137.2345) are included. If you read the question carefully, its greater than 38.7880(not >=) and less than 137.2345(not <=)

    In MySQL, There is a seperate function for truncating a decimal unlike standard ROUND function in other platforms. And that function is TRUNCATE

    SELECT TRUNCATE(SUM(lat_n), 4) FROM station
    WHERE lat_n > 38.7880 AND lat_n < 137.2345;