SQL 문제풀이
[해커랭크 SQL] Aggregation - Weather Observation Station 13
냄비짱
2023. 8. 25. 17:10
728x90
❓ Question
https://www.hackerrank.com/challenges/weather-observation-station-13
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
❗ Answer
SELECT ROUND(SUM(lat_n),4)
FROM station
WHERE lat_n BETWEEN 38.7880 AND 137.2345;
📌 Discussion
- WHERE 절에서 BETWEEN으로 범위 조건을 걸어준다.