Excuting the query of similarity was successuful by using this :
MATCH (at1:Attrib)<-[r:ASSIGNED]-(c:Contrat)-[x:ASSIGNED]->(at2:Attrib) MERGE (at1)-[s:SIMILARITY]-(at2)
And then , to display only Attribs which are working together , I worked with this query and it's fine :
MATCH (at:Attrib)<-[r]-(c:Contrat) WITH DISTINCT c.id AS Contrat , collect(DISTINCT at.label) AS Attributaires, count( DISTINCT at.id) AS Count Return Attributaires;
and this the result :
My question is how can I remove duplicates for "at" in the graph and not only in the list . if 2 at have the same ID and they re displayed then we display only one at .