SQL median function
Posted: Wed Apr 20, 2016 10:12 pm
Is there a SQL function to calculate the median of a number set?
Code: Select all
dbadmin=> \df *median*
List of functions
procedure_name | procedure_return_type | procedure_argument_types
----------------+------------------------+--------------------------
median | Float | Float
median | Float | Integer
median | Float | Numeric
median | Interval Day to Second | Interval Day to Second
median | Interval Year to Month | Interval Year to Month
(5 rows)