You are viewing a single comment's thread. Return to all comments →
with t1 as(select LAT_N, row_number() over (order by LAT_N) as rn from station), t2 as (select count(LAT_N) as co from station) select distinct case when mod(t2.co,2)!=0 then (select round(LAT_N,4) from t1,t2 where rn=(t2.co+1)/2) when mod(t2.co,2)=0 then (select round(avg(LAT_N),4) from t1,t2 where rn=t2.co/2 or rn=t2.co/2+1) end as median from t1, t2;
Seems like cookies are disabled on this browser, please enable them to open this website
Weather Observation Station 20
You are viewing a single comment's thread. Return to all comments →