I have two nodes end relationship between them as invoice with invoice amount, there are a lot of invoices between two company-nodes, I need to summarize relationships amounts and use this syfer in bloom
I tried to write down this query
match (n:company {comp_ID:$parameter})-[r:invoice]->(m:company)
with n, m, sum(r.amount) as total, collect(r) as relationships
where size(relationships) > 1
with total, head(relationships) as keep, tail(relationships) as delete
is it possible in bloom to ad this query in scene action and get some results?
match(n:piri)-[r:miwodeba]->(m:piri)
where id(n) in $nodes
with n, m, sum(r.Rirebuleba) as total, collect(r) as relationships
where size(relationships) > 1
with total, head(relationships) as keep, tail(relationships) as delete
set keep.w = total
foreach(r in delete | delete r)
return *