[MSSQL] 해커랭크(HackerRank) - Weather Observation Station 20

develop_wan·2021년 12월 30일

HackerRank SQL

목록 보기
42/51
post-thumbnail

https://www.hackerrank.com/challenges/weather-observation-station-20/problem?isFullScreen=true


문제


해석
중위수는 데이터 집합의 위쪽 절반과 아래쪽 절반을 구분하는 숫자로 정의됩니다. STATION에서 북위도(LAT_N)의 중위수를 조회하고 소수점 4자리까지 반올림하십시오.

select top(1)
    format(round(percentile_cont(0.5) within group(order by lat_n)over(),4),'#.0000')
from
    station
profile
서른. 개발자가 되기로 했다

0개의 댓글