SQL 문제풀이
[해커랭크 SQL] Aggregation - Weather Observation Station 14
냄비짱
2023. 8. 25. 17:13
728x90
❓ Question
https://www.hackerrank.com/challenges/weather-observation-station-14
Weather Observation Station 14 | HackerRank
Query the greatest value of the Northern Latitudes from STATION that are under 137.2345 and truncated to 4 decimal places.
www.hackerrank.com
❗ Answer
SELECT ROUND(MAX(lat_n),4)
FROM station
WHERE lat_n < 137.2345;
📌 Discussion
- WHERE 절에서 조건을 주고 MAX값을 추출 후 ROUND로 반올림