apoc.schema.properties.distinct

Procedure

apoc.schema.properties.distinct(label STRING, key STRING) - returns all distinct NODE property values for the given key.

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.

Signature

apoc.schema.properties.distinct(label :: STRING, key :: STRING) :: (value :: LIST<ANY>)

Input parameters

Name Type Default

label

STRING

null

key

STRING

null

Output parameters

Name Type

value

LIST<ANY>

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");
Table 1. Results
value

["Michael", "Ryan"]