cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Seeking to answer a practical question

In the existing heavy-edge directed buying and selling relationship network, the node represents the company, the edge represents a sale, and the buyer points to the seller, the edge has the attribute money representing the transaction amount, and there are parallel edges between the nodes. Now take node A, analyze the importance of his partners to him, is there any algorithm or method to calculate it?
ps: The number of purchases and sales amount will affect the importance.

1 REPLY 1

You haven't specified enough information to be sure, but it sounds like a pretty simple sum aggregate type of query.

MATCH (b:Buyer)<-[sale:SOLD]-(s:Seller)
RETURN s.name, sum(sale.value) as totalValue, b.name
ORDER BY s.name ASC, totalValue DESC

That would give you the name of every buyer / seller pair, sorted by seller & total relationship size