Skip to content

Aggregate Method ​

Definition ​

  • Namespace: JASE.Database.SqlGenerators
  • Assembly: JASE.Database.dll

SelectStatement Aggregate(ISelectable selectable, AggregateType kind, string columnName, bool distinct = null, IPredicateNode query = null, IEnumerable<IJoin> joins = null) ​

csharp
SelectStatement Aggregate(ISelectable selectable, AggregateType kind, string columnName, bool distinct = null, IPredicateNode query = null, IEnumerable<IJoin> joins = null)

Builds a SelectStatement that computes a single aggregate value over the specified column.

Parameters ​

NameDescription
columnNameThe target column name for the aggregate operation.
distinctWhen true, applies DISTINCT to the aggregate expression.
joinsOptional join definitions.
kindThe aggregate operation to apply (e.g. COUNT, SUM, AVG).
queryOptional predicate tree used to generate the WHERE clause.
selectableThe table or selectable source to aggregate over.

Returns ​

A SelectStatement representing a scalar aggregate query.