How do I make sure each node label (not just the node itself) is unique in the path it traverses?
MATCH (customer:Customer { id: '123' })-[*]->(product:Product)
RETURN product
The behavior I want:
[Customer]->[Sale]->[Product]
What I don't want (The path contains a Sale
twice):
[Customer]->[Sale]->[Department]->[Sale]->[Product]
I don't know the depth beforehand so using (customer:Customer)-[*2]->(product:Product)
is not an option.