A median is defined as a number separating the higher half of a data set from the lower half. Query the median of the Northern Latitudes (LAT_N) from STATION and round your answer to 4 decimal places.
Input Format
The STATION table is described as follows:
where LATN is the northern latitude and LONG_W is the western longitude.
*참고
PERCENT_RANK()
0 부터 1까지의 값을 반환한다.
partition이나 result set안에서의 first row에 대해서는 항상 0을 반환한다.
반복되는 값이라면 같은 값을 반환한다._
SELECT ROUND(S.LAT_N, 4)
FROM (SELECT PERCENT_RANK() OVER(ORDER BY LAT_N) PER, LAT_N
FROM STATION) S
WHERE S.PER = 0.5 ;