g.V().hasLabel("person").where(__.values("age"), lt(__.values("dayofBirth")))g.V().hasLabel("person").where(__.values("name"), neq(__.values("birthdayMonth"))) , but this doesn't seem to work in gremlin. g.V().hasLabel("person").as("v").where(lt("v")).by("age").by("dayofBirth") , but it assigns an alias to the node before comparison.g.V().hasLabel("person").as("a")
.outE("isFriendsWith").inV()
.hasLabel("dog")
.filter(__.values("age").where(neq(__.select("a").values("age"))))