Two-way tabulation with cypher, neo4j -
i have network 2 types of nodes: (n:type1)-[r]->(m:type2). type1 nodes have property, called, can take values true or false. query each node of type2, gives total of true's , falses' nodes related it.
i in 2 passes:
match (n:type1)-[r]->(m:type2) n.called return m.id, count(n); match (n:type1)-[r]->(m:type2) not n.called return m.id, count(n); but able in 1 query.
try this
match (n:type1)-[r]->(m:type2) return m.id, n.called, count(n);
Comments
Post a Comment