You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "mohayu22 (via GitHub)" <gi...@apache.org> on 2023/03/05 17:56:30 UTC

[GitHub] [age] mohayu22 commented on issue #730: How to apply arithmetic operations on a property of variable length edge

mohayu22 commented on issue #730:
URL: https://github.com/apache/age/issues/730#issuecomment-1455158700

   You can use the [sum()](https://age.apache.org/age-manual/master/functions/aggregate_functions.html#sum) aggregate function to add up the cost property of each edge in the path. Here's an example query:
   ```
   WITH relationships(path) as edges
   RETURN sum(edges.cost) as total_cost
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org