Weather Observation Station 20 | HackerRank
Query the median of Northern Latitudes in STATION and round to 4 decimal places.
www.hackerrank.com
문제 조건
북부 위도(LAT_N)의 중앙값을 출력하시오
문제 풀이
WITH TEMP AS(
SELECT LAT_N,
PERCENT_RANK() OVER(ORDER BY LAT_N) AS PERCENT
FROM STATION)
SELECT ROUND(LAT_N,4)
FROM TEMP
WHERE PERCENT = 0.5
'SQL > Hacker Rank' 카테고리의 다른 글
[EASY] Weather Observation Station 7 (0) | 2022.10.26 |
---|---|
[EASY] Weather Observation Station 6 (0) | 2022.10.26 |
[Medium] Weather Observation Station 19 (0) | 2022.10.24 |
[Easy] Weather Observation Station 4 (0) | 2022.10.24 |
[Easy] Weather Observation Station 3 (0) | 2022.10.24 |