with cte as (
select A.ct,
case when A.ct%2 = 1 then A.ct + 1
else A.ct
end as dt from (
select count(*) as ct
from station
) as A)
select cast(round(A.lat_n,4) as decimal(36,4))
from (
SELECT lat_n,ROW_NUMBER() OVER(ORDER BY LAT_N) AS ft FROM STATION
) as A ,cte as B
where ft in ((floor(B.dt/2) + ceiling(B.dt/2))/2);
No comments:
Post a Comment