The aim of this work is knowing how my clusters were made/how the group of nodes which is connected to each other was made . I have contracts and attributes in my graph .
I used this query to have clusters of Attributes(companies) which collaborated together for 10 times at least :
match (n1:attribfxplaf)-[r]-()
with n1.clusterId as clusterId, count(n1) as clusterSize,count(distinct r) as numberOfRels
where clusterSize > 10 AND numberOfRels > 10
match (n2) where n2.clusterId = clusterId
return n2,clusterId```
now I want to know how to save this and not executing this query each time I need this result . And how can I compare nodes properties of the same cluster ?