Hello guys,
i am trying to execute the below query and for one product i want to get all the products which lies in the similar category and price range but if i want to store all resultant product against the only product for which i queried(basically one product and against that all resultant products in one row itself, not in individual row each time)
how can i do it ?
"match(p1:Product) with COLLECT({ProductId: p1.ProductId }) as ws
unwind ws as ws1
match(pr:Product{ProductId : ws1.ProductId})<-[:HasProduct]-(c:Category)
match(c)-[:HasProduct]->(p:Product)
where p.Price>0.5pr.Price and p.Price<2pr.Price
return pr.ProductId, p.ProductId"
thanks