Hi Andre,
I've written some C statistics functions for Postgres before, here:
https://github.com/pjungwir/aggs_for_arrays
https://github.com/pjungwir/aggs_for_vecs
They are all really simple, although they operate on arrays, so yours
should be even simpler. The second link has aggregate functi
SUMMARY
--
I am trying to program in PostgreSQL a statistics function.
My old method in SQL is here.
select ( avg(measure) - 0.0 ) / nullif(stddev_pop(case when measure > 0.00 then
0.00 else measure end ),0) sortino_true from TABLE/VIEW;
The logic is based on
SORTINO RATIO: ARE YOU CALCULA