Re: [GENERAL] Median, Quartile and Percentile Aggregate Functions
От | Ed Loehr |
---|---|
Тема | Re: [GENERAL] Median, Quartile and Percentile Aggregate Functions |
Дата | |
Msg-id | 38C182BE.648A24A3@austin.rr.com обсуждение исходный текст |
Ответ на | Re: [GENERAL] Median, Quartile and Percentile Aggregate Functions (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: [GENERAL] Median, Quartile and Percentile Aggregate Functions
|
Список | pgsql-general |
Peter Eisentraut wrote: > > Patrik Hall writes: > > > I am in need of median, quartile and percentile functions in postgres. > > > > Has anybody implemented any of them allready? > > Haven't heard, but if you can come up with a way to calculate them with a > single pass over the data rows (keeping several state variables, if > necessary) then you're half way there to implementing your own aggregate > function. See the Programmer's Guide on how that might be done. > > Incidentally I couldn't think of a way to do just that. In that case it > will be *hard*. Forgive me if I already said this...May I suggest a lovely little perl package called Statistics::Descriptive which I use for this sort of thing? I know it's not exactly what your were looking for, but it's a possible consideration if you happen to be accessing pgsql via perl/DBI. Cheers, Ed Loehr
В списке pgsql-general по дате отправления: