apoc.agg

Qualified Name Type

apoc.agg.first(value ANY) - returns the first value from the given collection.

Function

apoc.agg.graph(path ANY) - returns all distinct NODE and RELATIONSHIP values collected into a MAP with the keys nodes and relationships.

Function

apoc.agg.last(value ANY) - returns the last value from the given collection.

Function

apoc.agg.maxItems(items ANY, value ANY, groupLimit INTEGER) - returns a MAP {items: LIST<ANY>, value: ANY} where the value key is the maximum value present, and items represent all items with the same value. The size of the list of items can be limited to a given max size.

Function

apoc.agg.median(value ANY) - returns the mathematical median for all non-null INTEGER and FLOAT values.

Function

apoc.agg.minItems(items ANY, value ANY, groupLimit INTEGER) - returns a MAP {items: LIST<ANY>, value: ANY} where the value key is the minimum value present, and items represent all items with the same value. The size of the list of items can be limited to a given max size.

Function

apoc.agg.nth(value ANY, offset INTEGER) - returns the nth value in the given collection (to fetch the last item of an unknown length collection, -1 can be used).

Function

apoc.agg.percentiles(value INTEGER | FLOAT, percentiles LIST<FLOAT>) - returns the given percentiles over the range of numerical values in the given collection.

Function

apoc.agg.product(value INTEGER | FLOAT) - returns the product of all non-null INTEGER and FLOAT values in the collection.

Function

apoc.agg.slice(value ANY, from INTEGER, to INTEGER) - returns subset of non-null values from the given collection (the collection is considered to be zero-indexed). To specify the range from start until the end of the collection, the length should be set to -1.

Function

apoc.agg.statistics(value INTEGER | FLOAT, percentiles LIST<FLOAT>) - returns the following statistics on the INTEGER and FLOAT values in the given collection: percentiles, min, minNonZero, max, total, mean, stdev.

Function