hello guys I am new to cypher query and I want to restrict duplicate values in my result
the query is
match (ee:Personal {id:"id"})-[:Friend]->(fr),
(fr)-[:Friend]->(fr2),
(fr2)-[:Friend]->(friend:Personal),
(friend)-[:Works]->(comp:Company)
where comp.name=~".*name.*"
and not friend.id="id"
and not (friend)-[:Friend]-(fr)
and not (friend)-[:Friend]-(ee)
and not (fr2)-[:Friend]-(ee)
optional match (comp)-[:Position]->(pos),
(friend)-[:Position]->(pos)
optional match (friend)-[:Location]->(loc)
return distinct friend.name, comp.name
but i get duplicate values as there are multiple node properties in return statemnt. If I return only one property then its fine. but i want distinct friends