4

With Cypher, I'm trying to return the node of the highest score. However it either just returns the score without any id to the node, what do I need to add to my query?

start n=node(*) WHERE HAS(n.score) return MAX(n.score);
CoffeeCoder
  • 103
  • 2
  • 11

1 Answers1

4

This solution should give you both the score and node.

start n=node(*) WHERE HAS(n.score) RETURN n, n.score ORDER BY n.score LIMIT 1
bornytm
  • 793
  • 1
  • 11
  • 27