I am using Gremlin in amazon-neptune. I have vertex user, country, order
I have edge 'lives_in' from user to country ,edge 'purchased' from user to order, edge 'delivered' from order to country
Goal : Find top most country which purchases most orders to foreign country rather than live_in country in descending order
gremlin> g.V().hasLabel("user").outE('purchased').inV().hasLabel("order").
......1> outE("delivered").inV().hasLabel("country").
......2> has('name').neq(outE('lives_in').inV().hasLabel("country").values()).
......3> groupCount().by(values)
I am not able to traverse back to root vertex from step neq(outE("lives_in"))
I am getting the same results after removing the last has step
gremlin> g.V().hasLabel("user").outE('purchased').inV().hasLabel("order").
......1> outE("delivered").inV().hasLabel("country")
This means my last has step is not executing.
Result sample - {v[country_GB]=38,v[country_NZ]=6,v[country_AU]=3}