Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elisedeux/2a1481e94e471e4107a9bf670dadf37d to your computer and use it in GitHub Desktop.
Save elisedeux/2a1481e94e471e4107a9bf670dadf37d to your computer and use it in GitHub Desktop.
MATCH (a), (b), p = allShortestPaths((a)-[*..{{"Maximum path length":number:{"default": 4, "min": 1, "max": 10}}}]-(b))
WHERE ALL (r IN relationships(p)
WHERE type(r)= 'IS_SHAREHOLDER' AND r.shares > 0.20) AND id(a) = {{"Source":node:"Person"}} AND id(b) = {{"Target":node:"Company"}}
RETURN p LIMIT {{"Maxiumum number of paths":number:{"default":5, "min": 1, "max": 50}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment