Is there any way to find out maximum value from property in Neo4j?

Viewed 180

I have a nodes where property maximum value is 772 but when I try with maximum value it doesn't show.

Maximum value

I have been try with Max cyper query is output is different also not showing in graph form.

MATCH (n:citation) RETURN max(n.Name)

output result

Is there any way I have also try with DESC option but not working.

MATCH (n:citation) RETURN n.Name order by n.Name DESC

order by Descending

It's showing maximum number like 1 10 100 2 20 3 35

so it will not take normal maximum value 100 but showing 35 is maximum..............

1 Answers

The quotation marks in your query results indicate that this property is stored as a string. The order by is therefore alphabetical, not numeric. Try casting the results (or the property itself) to an int.

Related