I'm working with a database that tracks IOUs. People are nodes (Person) and IOUs are relationships (OWES). OWES has a property of Date.
I need to search for simple circuits (paths that originate and end with the same node), and identify the circuit that includes the oldest transaction (OWES:Date).
To search for paths I've got:
When there is more than one path, I want to find the one that includes the relationship with the smallest value in the Date property.
I'm a Cypher newbie, and any suggestions would be greatly appreciated!