count function

MssqlAggregate count(
  1. MssqlExpression operand, {
  2. bool distinct = false,
})

COUNT(x), or COUNT(DISTINCT x) when distinct.

One expression when distinct, because that is SQL Server's own limit on COUNT(DISTINCT …). A composite key is counted through MssqlQuery.countDistinct, which routes it via a derived SELECT DISTINCT rather than quietly counting the first column.

Implementation

MssqlAggregate count(MssqlExpression operand, {bool distinct = false}) =>
    MssqlAggregate.count(operand, distinct: distinct);