+1 vote
in Databases by (71.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 (56.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.


...