Skip to content

Instantly share code, notes, and snippets.

@vladbatushkov
Created May 11, 2019 16:59
Show Gist options
  • Save vladbatushkov/e00e5e037f3d476afa39d3615b2414f4 to your computer and use it in GitHub Desktop.
Save vladbatushkov/e00e5e037f3d476afa39d3615b2414f4 to your computer and use it in GitHub Desktop.
Reccomend person to listen bands, that other persons with similar preferences like.
MATCH (vb:Person { name: "vlad batushkov" })-[:LIKES]->(cross_band:Band)<-[:LIKES]-(p:Person)-[:LIKES]->(other_band:Band)
WHERE NOT (vb)-[:LIKES]->(other_band)
WITH other_band.name as name, count(p) as followers_num
RETURN name, followers_num
ORDER BY followers_num DESC
LIMIT 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment