apoc.agg.product

Function APOC Core

apoc.agg.product(number) - returns given product for non-null values

Signature

apoc.agg.product(number :: NUMBER?) :: (NUMBER?)

Input parameters

Name Type Default

number

NUMBER?

null

Usage Examples

We can compute the product of rows of numeric values, by running the following query:

UNWIND range(1,10) AS value
RETURN apoc.agg.product(value),
       1*2*3*4*5*6*7*8*9*10 AS manualEquivalent;
Table 1. Results
apoc.agg.product(value) manualEquivalent

3628800

3628800