SQL 문제풀이
[해커랭크 SQL] Aggregation - Weather Observation Station 16
냄비짱
2023. 8. 25. 17:55
728x90
❓ Question
https://www.hackerrank.com/challenges/weather-observation-station-16
Weather Observation Station 16 | HackerRank
Query the smallest of STATION's Northern Latitudes that is greater than 38.7780, and round to 4 decimal places
www.hackerrank.com
❗ Answer
SELECT ROUND(MIN(lat_n),4)
FROM station
WHERE lat_n > 38.7780;
📌 Discussion
- WHERE 절에서 조건을 걸고 최소값에 반올림하여 레코드 추출