Skip to content

MEDIAN

SELECT MEDIAN(salary) OVER () AS median_salary
FROM employees;
MEDIAN_SALARY
--------------
5000.0

This query is computing the median of all the values present in the salary column from the employees table. The median is the middle value in an ordered list of numbers. Here, the median salary is 5000.0.