withMin<TChild, V> method

MssqlProjectedQuery<(TRow, V?)> withMin<TChild, V>(
  1. MssqlRelation<TRow, TChild> relation(
    1. TFields fields
    ),
  2. MssqlExpression operand
)

Parent rows plus MIN of operand on matching children.

MIN keeps the operand's SQL type exactly, so V is the operand column's own Dart type. See withSum on why it is unbounded.

Implementation

MssqlProjectedQuery<(TRow, V?)> withMin<TChild, V>(
  MssqlRelation<TRow, TChild> Function(TFields fields) relation,
  MssqlExpression operand,
) {
  return _withAggregate(
    relation,
    MssqlAggregate.min(operand),
    (v) => _decodeAggregate<V>('withMin', v),
  );
}