Created
May 11, 2019 16:59
-
-
Save vladbatushkov/e00e5e037f3d476afa39d3615b2414f4 to your computer and use it in GitHub Desktop.
Reccomend person to listen bands, that other persons with similar preferences like.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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