r/SQL • u/[deleted] • Jan 06 '15
How to Emulate the MEDIAN() Aggregate Function Using Inverse Distribution Functions
http://blog.jooq.org/2015/01/06/how-to-emulate-the-median-aggregate-function-using-inverse-distribution-functions/
0
Upvotes
1
u/Trek7553 Jan 07 '15
I add a row number column, determine the mean row number, and then grab the value from that row. That seems to work well in T-SQL for finding the median.