PRODUCT() OVER ...

All functions > WINDOW FUNCTION > PRODUCT() OVER ...

Returns the product of values in the window frame.

Syntax

PRODUCT(expr) OVER ([PARTITION BY expr [, ...]] [ORDER BY sort_item [, ...]] [ROWS|RANGE|GROUPS frame])

Notes

  • SQL translation is implemented only when the current SQL backend is DuckDB
  • Requires a well-defined window (ORDER BY, and optionally PARTITION BY and frame)
  • NULL values are ignored where the underlying window aggregate skips NULLs

See also

Examples

FeatureQL
SELECT
    f1 := ZIP(ARRAY[1,2,3] AS id, ARRAY[10, 20, 30] AS v).TRANSFORM(SELECT PRODUCT(v) OVER (ORDER BY id ASC)).UNWRAP() -- Running product to the current row
;
Result
f1 ARRAY
[10, 200, 6000]

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