withAvgTruncating<TChild, V> method
MssqlProjectedQuery<(TRow, V?)>
withAvgTruncating<TChild, V>(
- MssqlRelation<
TRow, TChild> relation(- TFields fields
- MssqlExpression operand
Parent rows plus AVG of operand with SQL Server's own integer
rule kept: the remainder of an integer column is discarded.
For a whole-unit average where the fraction is noise. Use withAvgExact when it is not.
Implementation
MssqlProjectedQuery<(TRow, V?)> withAvgTruncating<TChild, V>(
MssqlRelation<TRow, TChild> Function(TFields fields) relation,
MssqlExpression operand,
) {
return _withAggregate(
relation,
MssqlAggregate.avg(operand, integers: MssqlIntegerAverage.truncating),
(v) => _decodeAggregate<V>('withAvgTruncating', v),
);
}