I have student
node with marks. I need to display rank, username and marks. But I am storing username, marks in the database. I have tried following
MATCH (s:student) WHERE s.marks > 70 RETURN s.marks as marks, s.uasername as name ORDER BY s.marks DESC
Output is
marks | name
-------------------------
95 user1
94 user2
93 user3
93 user4
So here i want rank 3 for both user3, user4.
marks | name | rank
--------------------------------
95 user1 1
94 user2 2
93 user3 3
93 user4 3
Any suggestion.
You could group them by marks, then the order of your result represents the ranks.