Skip to content

Instantly share code, notes, and snippets.

@jonaslund
Created June 15, 2015 19:58
Show Gist options
  • Save jonaslund/a3c622023890a4779452 to your computer and use it in GitHub Desktop.
Save jonaslund/a3c622023890a4779452 to your computer and use it in GitHub Desktop.
Friends of Friends
MATCH (j:Artist {name:""})-[:`WORKED_WITH`]->()<-[:`WORKED_WITH`]-(c),
(c)-[:`WORKED_WITH`]->()<-[:`WORKED_WITH`]-(coc)
WHERE coc <> j AND NOT((j)-[:`WORKED_WITH`]->()<-[:`WORKED_WITH`]-(coc))
RETURN coc.name, count(coc)
ORDER BY count(coc) DESC
LIMIT 10;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment