+1 vote
in Databases by (66.8k points)
How can I find the node with the maximum value in a graph for a given property using the Cypher query?

1 Answer

+2 votes
by (51.8k points)
edited by
 
Best answer

To find a node with the maximum value for a given property using a Cypher query, you can use the ORDER BY and LIMIT clauses. 

Here's an example:

MATCH (n:Label)

RETURN n

ORDER BY n.propertyName DESC

LIMIT 1

Label represents the label of the nodes you want to search.

propertyName represents the property you want to find the maximum value for.


...