Table of Contents

Class Sum

Namespace
YndigoBlue.Velocity.Functions
Assembly
YndigoBlue.Velocity.dll

Represents the SUM aggregate function that calculates the total of numeric values.

public class Sum : Function, IElement, ICheckItem, IDefaultItem, IFilterItem
Inheritance
Sum
Implements

Remarks

The SUM function adds up all non-null numeric values in a column or expression. When used with multiple elements, it can sum arithmetic expressions. Null values are ignored in the calculation. Commonly used with GROUP BY to calculate subtotals for each group.

Constructors

Sum(IEnumerable<IElement>)

Initializes a new instance of SUM for multiple elements (for arithmetic expressions).

Sum(IElement)

Initializes a new instance of SUM for a single element.