apoc.schema.properties.distinctCount
Procedure
apoc.schema.properties.distinctCount(label STRING, key STRING)
- returns all distinct property values and counts 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.distinctCount(label = :: STRING, key = :: STRING) :: (label :: STRING, key :: STRING, value :: ANY, count :: INTEGER)
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.distinctCount("Person", "name");
label | key | value | count |
---|---|---|---|
"Person" |
"name" |
"Michael" |
1 |
"Person" |
"name" |
"Ryan" |
1 |