pub fn avg<'a, V, E>(
expr: E,
) -> SQLExpr<'a, V, <E::SQLType as AggregatePolicy<V::DialectMarker>>::Avg, Null, Agg>Expand description
AVG(expr) - calculates average of numeric values.
Requires the expression to be Numeric.
Always returns Double (SQL standard behavior), nullable.
§Type Safety
// ✅ OK: Numeric column
avg(products.price);
// ❌ Compile error: Text is not Numeric
avg(users.name);