I have a graph with 4 levels. While filtering using MATCH
, how can i get the \"degree\" of a node? I am always getting a \"degree\" of 1.
Here is my que
More information would be helpful, but in general you can get the degree of a node by doing something like:
MATCH (n)--(other)
WHERE n.id = {id}
RETURN count(other)
If you want to find degrees for many nodes you can leave out the WHERE
or specify a more generic query:
MATCH (n)--(other)
WHERE n.property = {value}
RETURN n, count(other)