Re: Aggregating edges based on the source & target vertex attributes
Kevin Schmidt <ktsc...@...>
Vishu, This may not be optimal, but seems to work: g.E().hasLabel('collaboration').as('e').outV().values('organization').as('1').select('e').inV().values('organization').as('2').select('e').group().by(select('1', '2')).by(values('collaborationHours').sum()).unfold(); ==>{1=engineering, 2=marketing}=2 ==>{1=marketing, 2=engineering}=2 ==>{1=engineering, 2=sales}=3 ==>{1=sales, 2=marketing}=2 Note, you have some leading spaces in your Gremlin on 'collaborationHours' I had to remove, and with the data you provided the engineering/sales total is 3, not 4. Kevin On Wed, Dec 16, 2020 at 11:57 PM vishnu gajendran <ggvis...@...> wrote: Hello, |
|