Skip to main content

sum_distinct

Function sum_distinct 

Source
pub fn sum_distinct<'a, V, E>(
    expr: E,
) -> SQLExpr<'a, V, <E::SQLType as AggregatePolicy<V::DialectMarker>>::Sum, Null, Agg>
where V: SQLParam + 'a, E: Expr<'a, V>, E::SQLType: AggregatePolicy<V::DialectMarker>,
Expand description

SUM(DISTINCT expr) - sums distinct numeric values.

Requires the expression to be Numeric. Result type is dialect-aware.