I am trying to perform a procedure to estimate the median absolute deviation of a set of numbers (usually obtained using the GROUP BY clause),
An example query in which I would like to use this:
select id, mad(values) from mytable group by id;
I turn to the aggregate function example , but a little confused, since the function must know the median of all numbers before all iterations are performed.
Any pointers to how such a function could be implemented would be greatly appreciated.
sql oracle aggregate
rguha
source share