You are viewing a single comment's thread. Return to all comments →
WITH numbered AS ( SELECT lat_n, ROW_NUMBER() OVER(ORDER BY lat_n ASC) AS index_row, COUNT(*) OVER () AS total_rows FROM station ) SELECT ROUND(AVG(lat_n), 4) AS mediana FROM numbered WHERE index_row IN ( FLOOR((total_rows + 1) / 2), CEIL((total_rows + 1) / 2) );
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 →
MySQL: