Last active
May 30, 2020 06:21
-
-
Save vladbatushkov/dfd632f58c8205654c042b080128355e to your computer and use it in GitHub Desktop.
Find circular money flow in financial graph
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
PROFILE MATCH path = (t1:Transaction)-[:HOP*3..10]->(t2:Transaction) | |
WHERE (t1)<-[:OUT]-(:Client)-[:IN]->(t2) | |
AND t1.timestamp < t2.timestamp | |
AND (t1.amount - t2.amount) / t1.amount < 0.25 | |
UNWIND nodes(path) as t | |
MATCH (e)-[:OUT]->(t) | |
WHERE e:Client OR e:Company | |
RETURN e, t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment