pub fn extract_aggregates(
expr: &Expr,
alias: &str,
functions: &FunctionRegistry,
) -> Result<Vec<AggregateExpr>>Expand description
Extract every aggregate function call from expr, binding each to
the given output alias. Nested aggregates (e.g. SUM(AVG(x)),
which is illegal SQL in Postgres and most other systems) are
reported as a planner error rather than silently double-extracted.