Reputation: 21810
in neo4j, I'm graphing all nodes that have > x number of connections of relationship r
with the following query:
match (c:Company)-[r:founder]-(x)
with c, count(r) as count where count > 3
return c
The above code outputs a graph visualization of company nodes only.
If I try to return all three variables by writing RETURN c,r,x
, I get the following error:
r not defined (line 3, column 12)
" return c,r,x"
^
how do i update this query so that I show the company nodes and their founders?
Upvotes: 1
Views: 47
Reputation: 36545
Does it work if you do this?
match (c:Company)-[r:founder]-(x)
with c, r, x, count(r) as count where count > 3
return c, r, x
Upvotes: 2