PRODUCT() GROUP BY ...

All functions > GROUP BY > PRODUCT() GROUP BY ...

Returns the product of the numeric values in the group.

Syntax

PRODUCT(expr)
 [ FILTER (WHERE condition) ]
  [ GROUP BY feature [, feature ...] ]

Notes

  • NULL values are ignored where the underlying aggregate skips NULLs
  • Can be used with FILTER (WHERE condition) and GROUP BY like other aggregates

Examples

FeatureQL
SELECT
    f1 := ZIP(ARRAY[1, 1, 1] AS g, ARRAY[2, 3, 4] AS v).TRANSFORM(SELECT PRODUCT(v) GROUP BY g).UNWRAP_ONE() -- Product over one group
;
Result
f1 BIGINT
24

Last update at: 2026/05/26 17:22:09