gremlin> g=TinkerFactory.createModern().traversal()
==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
gremlin> g.V(1).property('period',5)
==>v[1]
gremlin> g.V(2).property('period',5)
==>v[2]
gremlin> g.V().has('age').has('period').valueMap(true)
==>[period:[5],label:person,name:[marko],id:1,age:[29]]
==>[period:[5],label:person,name:[vadas],id:2,age:[27]]
gremlin> g.V().has('age').has('period').map(values('age', 'period').sum())
==>34
==>32
gremlin> g.V().has('age').has('period').project('a').by(values('age', 'period').sum())
==>[a:34]
==>[a:32]
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/658f1d05-0ed1-4518-8c2d-9115eac96a93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
g.V(1,2).as("a").math("_+a").by("age").by("period")
g.V(1,2).sack(assign).by('age').sack(sum).by('period').sack()
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CA%2Bf9seWmQbAq4E%2B_ZsEbDaEgyb3AXFZze00Hi_xZ37JS6k9FJw%40mail.gmail.com.