Re: [GENERAL] Median, Quartile and Percentile Aggregate Functions
От
Peter Eisentraut
Тема
Re: [GENERAL] Median, Quartile and Percentile Aggregate Functions
Дата
Msg-id
Pine.LNX.4.21.0003040343420.489-100000@localhost.localdomain
Ответ на
Median, Quartile and Percentile Aggregate Functions (Patrik Hall)
Список
Дерево обсуждения
Median, Quartile and Percentile Aggregate Functions Patrik Hall <phall@phall.kdsoft.fi>
Re: [GENERAL] Median, Quartile and Percentile Aggregate Functions Peter Eisentraut <peter_e@gmx.net>
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*. -- Peter Eisentraut Sernanders väg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden
В списке pgsql-general по дате отправления
От: Peter Eisentraut
Дата: