0

My application has an object "comments" where users can rate each comment as "positive" and "negative", I want to sort my comments based on a count (number of positive - amount of negative) based on that score I want to sort comments through a cypher query.

Does anyone know help me get this query?

Thanks in advance everyone!

1 Answers1

0

Taking a wild guess:

MATCH (cid:Comment)
RETURN (cid.plus_rating_count - cid.negative_rating_count) 
ORDER BY (cid.plus_rating_count - cid.negative_rating_count)
Tim Kuehn
  • 3,201
  • 1
  • 17
  • 23