Talk:Aggregate Median

From PostgreSQL wiki

Revision as of 13:39, 28 May 2010 by Joachim (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The median aggregate should also take account for missing values, i.e. nulls. If the there are nulls in the array, the ORDER BY puts them last. Then the result is not correct. If there are more than 50% nulls, the median is also null.

Would you mind publishing a generic quantile aggregate function, e.g. quantile(numeric, float)?

Thanks. Joachim

Personal tools