# Inverse Distribution Functions

### From PostgreSQL wiki

# Inverse Distribution Functions

Defined in the SQL standard in Section 10.9 <aggregate function>, inverse distribution functions open whole new vistas both of reporting and of implementation challenges.

# Vistas of Reporting

- MEDIAN! YAY!
- N-tiles (continuous and discrete)
- Many others.

# Implementation Challenges

- Parser
- Mostly done. Thanks, Atri Sharma!
- WITHIN GROUP clause

- Planner/Optimizer
- In progress
- Really applies atop FILTER, not yet in master.
- New element in ProcedureCreate

- Executor
- New way to do aggregates: transition function now optional.