We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Weather Observation Station 20
Weather Observation Station 20
Sort by
recency
|
3999 Discussions
|
Please Login in order to post a comment
Using oracle inbuild function MEDIAN
WITH indexed AS( SELECT LAT_N , ROW_NUMBER() OVER(ORDER BY LAT_N ASC) AS idx FROM STATION )
SELECT ROUND(LAT_N, 4) FROM indexed WHERE idx = ( SELECT COUNT(LAT_N) FROM STATION ) / 2
with c1 as (select , dense_rank() over (order by lat_n) as rnk from station) select round(lat_n,4) from c1 where rnk=(select (count()+1)/2 from station);