Count¶
Returns the number of non-NULL values among the given parameters or inputs, counting ARRAY elements individually.
Without parameters, Count counts every available input. When parameters
are given, it counts only those parameters/fields. An ARRAY input is
counted element-by-element (the same way Min/Max/Sum fold arrays),
so GetCDMTableId(@idx, :key)[] => Count() returns how many rows matched.
NULL values and NULL ARRAY elements are NOT counted — Count is the
number of present (non-NULL) values, mirroring SQL COUNT(expr). The
result is always INT. Any value type is accepted (it is only tested for
NULL, never compared).
Parameters¶
- N —
itemsOptional — accepts: field, BOOLEAN, DATE, FLOAT, INT, STRING -
The Nth value to count. May be a field reference (scalar or ARRAY) or a static value.
Input type¶
BOOLEANDATEFLOATINTSTRINGARRAY
Output type¶
INT
Examples¶
Count all inputs
Count a collected ARRAY