title: Neo4j shortestPath with highest aggregated relationship propertie
body: <p>I want to find the shortest path between two nodes. The path itself is not the problem... The bigger problem is, that I´ll want to return the path, where the aggregated relationship property on the path is highest.  </p>
  
  <p>For better understanding, here´s what I want: </p>
  
  <p>This is my query</p>
  
  <pre><code>MATCH
    (startNode:Person {id:"887111"}),
    (endNode:Person {id:"789321"}),
    paths = allShortestPaths((startNode)-[r:KNOWS *..20]-(endNode))
  RETURN paths
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/HBXrU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HBXrU.png" alt="Query result"></a></p>
  
  <p>In this example I´ll want to have the path from Elissa (id: 887111) to Kasey (id: 789321) where the aggregated count ON the relationship is MAX. 
  I´ve also had a look at 'shortestPath', which only gives me one path. The other way is to call the 'dijkstra'-algo, with this I´ll get only the path with the lowest 'cost' (and not the highest). 
  So in my example the only path which should shown up is <em>Elissa->Travon->Kasey</em></p>
  
  <p>I´d think, the problem isn´t that complex, but at the moment I´m gettin stucked with this.. </p>
  
  <p>Thanks so far in advance. </p>
  
  <hr>
  
  <h2>UPDATE</h2>
  
  <p>after calling the suggested query </p>
  
  <pre><code>MATCH  (startNode:Person {id:"789321"}), (endNode:Person {id:"887111"}) 
  CALL apoc.algo.dijkstra(startNode, endNode, 'KNOWS', '_duration') YIELD path, weight 
  RETURN path, -weight AS weight
  </code></pre>
  
  <p>my result is the following </p>
  
  <p><a href="https://i.stack.imgur.com/q9yBU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q9yBU.png" alt="updated result"></a></p>