Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

better cypher query

  • Loading branch information...
commit cd1228f3c719bf0fbe85ed885165ad8cb88ecfcf 1 parent f793d43
@peterneubauer authored
View
4 cypher/src/test/scala/org/neo4j/cypher/docgen/cookbook/ClusteringCoefficientTest.scala
@@ -61,9 +61,9 @@ Therefore the clustering coefficient of node 1 is `1/6`.
`n` and `r` are quite simple to retrieve via the follwoing query:""",
queryText = "START a = node(1) " +
"MATCH (a)--(b) " +
- "==== a, b as neighbours ====" +
+ "==== a, count(distinct b) as n ====" +
"MATCH (a)--()-[r]-()--(a) " +
- "RETURN count(distinct neighbours) as n, count(distinct r) as r",
+ "RETURN n, count(distinct r) as r",
returns = "Returns `n` and `r` for the above calculations",
assertions = (p) => assertEquals(List(
Map("n" -> 4, "r" -> 1)), p.toList))
Please sign in to comment.
Something went wrong with that request. Please try again.