apoc.schema.properties.distinct

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

  • Prior to the release of APOC 2025.07, this procedure was restricted on on-premise instances. To use it on an older version, it must be unrestricted. For more details, see Installation → Load and unrestrict.

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"]