I know that there are other queries already given to find the median but I want to know how this query is working
Select round(S.LAT_N,4) median from TEST.meadian S where (select count(Lat_N) from TEST.meadian where Lat_N > S.LAT_N ) = (select count(Lat_N) from TEST.meadian WHERE Lat_N > S.LAT_N);
If their are total 449 rows than this query returns 448
Select round(S.LAT_N,4) median from TEST.meadian S where (select count(Lat_N) from TEST.meadian where Lat_N > S.LAT_N );
If there are total 449 rows than this query returns 448
Select round(S.LAT_N,4) median from TEST.meadian S where (select count(Lat_N) from TEST.meadian where Lat_N < S.LAT_N )
Then how it is finding median fro a given for odd no of rows.