title: gremlin where clause with property and traversal sum
body: <p>sample graph:</p>
  
  <pre><code>g.addV('location').property('name','Location A').as('location')
  .addV('building').property('totalLetterCapacity',50).as('building')
  .sideEffect(addE('has-building').from('location'))
  .addV('letter').property('totalLetters',10).as('a')
  .sideEffect(addE('has-letter').from('building'))
  .addV('letter').property('totalLetters',10).as('b')
  .sideEffect(addE('has-letter').from('building'))
  .addV('letter').property('totalLetters',10).as('c')
  .sideEffect(addE('has-letter').from('building'))
  .addV('letter').property('totalLetters',10).as('d')
  .sideEffect(addE('has-letter').from('building'))
  .addV('letter').property('totalLetters',10).as('e')
  .sideEffect(addE('has-letter').from('building'))
  </code></pre>
  
  <p>In this sample graph, I want to get all buildings that are full with letters.  So in this sample graph there is only one location which does fulfill the requirement - has 50 total letter capacity and 5 letters with 10 capacity attached to the building.</p>
  
  <p>I was hoping something like this would work:</p>
  
  <pre><code>g.V().hasLabel('location')
   .out('has-building')
   .where(values('totalLetterCapacity')
         .is(eq(out('has-letter').values('totalLetters').sum())
  </code></pre>
  
  <p>but it seems like the eq predicate or any of the predicates (lte,lt, gte)  does not allow for traversals.  I tried doing some kind of double where clause - a where within a where, but ended up getting a bit crazy.</p>
  
  <p>I'm using azure cosmos db gremlin.  what's the correct way to use a property in the traversal as a sum comparison?</p>