Skip to content

Instantly share code, notes, and snippets.

@nbransby
Created April 27, 2017 19:56
Show Gist options
  • Save nbransby/76a81f2b8836ec3d4f700a6dfeb48851 to your computer and use it in GitHub Desktop.
Save nbransby/76a81f2b8836ec3d4f700a6dfeb48851 to your computer and use it in GitHub Desktop.
MATCH (them:User)
//find out the lowest number of rating for any one of them
WITH them, min(size((them)<-[:RATED]-(:User))) as min_rating_count
//get all of them who share this lowest number of ratings
WITH them WHERE size((them)<-[:RATED]-(:User)) = min_rating_count RETURN them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment