SQL
[해커랭크] Weather Observation Station 13
주스 JUICE
2023. 7. 16. 15:05
728x90
Weather Observation Station 13 | HackerRank
Query the sum of Northern Latitudes having values greater than 38.7880 and less than 137.2345, truncated to 4 decimal places.
www.hackerrank.com
1. LAT_N > 38.7880 and LAT_N < 137.2345 -> where 절에 심기
2. LAT_N을 합해야 함 -> sum(LAT_N)
3. 4번째 자리수까지 출력해야 함 -> truncate(sum(LAT_N), 4)
select truncate(sum(LAT_N), 4)
from station
where LAT_N > 38.7880 and LAT_N < 137.2345
728x90