SUM, MIN, and MAX aggregate numeric values. AND, OR, and XOR fold values as 64-bit integers, truncating fractions. These operations skip non-numeric values. USED counts occupied slots. MATCH counts values equal to the supplied value.
Arguments
str
required
The array key.
int
required
The first index of the inclusive range.
int
required
The last index of the inclusive range.
str
required
The reduction to apply. See the operations below.
ValueT
The value to match. Required for
MATCH; omit it for other operations."SUM", "MIN", "MAX", "AND", "OR", "XOR", "USED", or "MATCH". For MATCH, also supply value.
Response
The numeric aggregate, or
null (TypeScript) / None (Python) if no values can be used. USED and MATCH return zero for an empty range.