apoc.schema.properties.distinct

Procedure APOC Core

apoc.schema.properties.distinct(label, key) - quickly returns all distinct values for a given key

Signature

apoc.schema.properties.distinct(label :: STRING?, key :: STRING?) :: (value :: LIST? OF ANY?)

Input parameters

Name Type Default

label

STRING?

null

key

STRING?

null

Output parameters

Name Type

value

LIST? OF 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"]