You are viewing a single comment's thread. Return to all comments →
select round(lat_n,4) from (select row_number() over (order by lat_n) as rnk, lat_n from station ) as a
where rnk = (select round(count(*)/2) from station)
1-select round and lat_n 2- used row_number to lat_n to number the table 3- used where to count all row_number and divide in half to get median row_id
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 →
select round(lat_n,4) from (select row_number() over (order by lat_n) as rnk, lat_n from station ) as a
where rnk = (select round(count(*)/2) from station)
1-select round and lat_n 2- used row_number to lat_n to number the table 3- used where to count all row_number and divide in half to get median row_id