Re: stddev returns 0 when there is one row
| От | nolan@celery.tssi.com |
|---|---|
| Тема | Re: stddev returns 0 when there is one row |
| Дата | |
| Msg-id | 20030421174134.7748.qmail@celery.tssi.com обсуждение исходный текст |
| Ответ на | stddev returns 0 when there is one row (Bruno Wolff III <bruno@wolff.to>) |
| Ответы |
Re: stddev returns 0 when there is one row
Re: stddev returns 0 when there is one row |
| Список | pgsql-general |
> I'm not volunteering, no. (For starters, I think you'd need to upgrade > the aggregate code to allow multiple-input aggregates. Which is worth > doing, but I do not expect to have time to think about such things for > 7.4.) Having multiple-input aggregates opens up possibilites for a large number of multivariate statistical measures, either built in or as user-defined functions. (He says as he works on formatting output from an Oracle DBMS for time-series analysis via SPSS or SAS.) I guess I don't understand the point of the count(*) parameter, but wouldn't the easiest way to offer both sample and population formulas for variance and standard deviation be to just add two new functions, varp and stddevp, most of the code for which already exists? That way they remain single-input aggregates. (A perfectionist would also include vars and stddevs as equivalents to the existing var and stddev functions.) -- Mike Nolan
В списке pgsql-general по дате отправления: