apoc.schema.properties.distinct

This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime.

Details

Syntax

apoc.schema.properties.distinct(label, key) :: (value)

Description

Returns all distinct NODE property values for the given key.

Input arguments

Name

Type

Description

label

STRING

The node label to find distinct properties on.

key

STRING

The name of the property to find distinct values of.

Return arguments

Name

Type

Description

value

LIST<ANY>

The list of distinct values for the given property.

Usage Examples

The examples in this section are based on the following sample graph:

CREATE (:Person {name: "Michael"});
CREATE (:Person {name: "Ryan"});
CALL apoc.schema.properties.distinct("Person", "name");
Results
value

["Michael", "Ryan"]