Hi,

I would like to get the document from my collection which contains the 
maximum value "val" of all stored documents.
I've created the following statement:

FOR vertex in MyCollection
filter has(vertex, "val")
COLLECT AGGREGATE 
    maxVal = max(vertex.val) INTO maxVertex
RETURN 
{
    maxVal_1: maxVal,
    maxVal_2: maxVertex[0].val
}

As far as I understand it, *maxVertex *should contain a set of documents 
for each value of *maxVal*. Because there is only onevalue of *maxVal*, 
there should only be one group containing the document with *maxVal* in the 
*maxVertex*-group.
In this case *maxVal_1* and *maxVal_2* should have the same value, but both 
values are different.

What did I understand wrong?

best regards
Christoph

-- 
You received this message because you are subscribed to the Google Groups 
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to