I am trying to not return the same node twice in this query in separate columns
START n=node:nodes(customer = 'c2')
MATCH n-[:OWNS]->owned-[:CROSS_SELL|UP_SELL]->sell
RETURN distinct n.customer,owned.product,sell.product
Customer C2 owns products P1 and P2. Product P2 and P3 can be cross sold from product P1. Product P3 can be also be up sold from product P2.
The query correctly returns
C2 P1 P3
C2 P2 P3
C2 P1 P2
Since the customer already owns P2, I do not want the last record in the result.
How can I accomplish this?
Thanks