apoc.stats.degrees
Procedure APOC Core
Signature
apoc.stats.degrees(types = :: STRING?) :: (type :: STRING?, direction :: STRING?, total :: INTEGER?, p50 :: INTEGER?, p75 :: INTEGER?, p90 :: INTEGER?, p95 :: INTEGER?, p99 :: INTEGER?, p999 :: INTEGER?, max :: INTEGER?, min :: INTEGER?, mean :: FLOAT?)
Output parameters
Name | Type |
---|---|
type |
STRING? |
direction |
STRING? |
total |
INTEGER? |
p50 |
INTEGER? |
p75 |
INTEGER? |
p90 |
INTEGER? |
p95 |
INTEGER? |
p99 |
INTEGER? |
p999 |
INTEGER? |
max |
INTEGER? |
min |
INTEGER? |
mean |
FLOAT? |
Usage Examples
The examples in this section are based on the following sample graph:
CREATE (TheMatrix:Movie {title:'The Matrix', released:1999, tagline:'Welcome to the Real World'})
CREATE (Keanu:Person {name:'Keanu Reeves', born:1964})
CREATE (Carrie:Person {name:'Carrie-Anne Moss', born:1967})
CREATE (Laurence:Person {name:'Laurence Fishburne', born:1961})
CREATE (Hugo:Person {name:'Hugo Weaving', born:1960})
CREATE (LillyW:Person {name:'Lilly Wachowski', born:1967})
CREATE (LanaW:Person {name:'Lana Wachowski', born:1965})
CREATE (JoelS:Person {name:'Joel Silver', born:1952})
CREATE
(Keanu)-[:ACTED_IN {roles:['Neo']}]->(TheMatrix),
(Carrie)-[:ACTED_IN {roles:['Trinity']}]->(TheMatrix),
(Laurence)-[:ACTED_IN {roles:['Morpheus']}]->(TheMatrix),
(Hugo)-[:ACTED_IN {roles:['Agent Smith']}]->(TheMatrix),
(LillyW)-[:DIRECTED]->(TheMatrix),
(LanaW)-[:DIRECTED]->(TheMatrix),
(JoelS)-[:PRODUCED]->(TheMatrix);
CALL apoc.stats.degrees();
type | direction | total | p50 | p75 | p90 | p95 | p99 | p999 | max | min | mean |
---|---|---|---|---|---|---|---|---|---|---|---|
NULL |
"BOTH" |
7 |
1 |
1 |
1 |
7 |
7 |
7 |
7 |
1 |
1.75 |
CALL apoc.stats.degrees("ACTED_IN");
type | direction | total | p50 | p75 | p90 | p95 | p99 | p999 | max | min | mean |
---|---|---|---|---|---|---|---|---|---|---|---|
"ACTED_IN" |
"BOTH" |
4 |
1 |
1 |
1 |
4 |
4 |
4 |
4 |
0 |
1.0 |