Skip to Content
avatar image
Former Member

use of $max operator in XSDS

Hello all,

i'm sure this is a very simple question, but i can't get the answer anywhere...

How would you code an xsds query in order to get the max value of a table?

for example:

"SELECT MAX(AGE) FROM PERSON"

I've tried some things like:

personEntity.$query().$max(personEntity.age)

Could sombody give me a clue? I've been looking for guides, but they don't specify the use, they just say there are these operators available...

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 29, 2015 at 12:54 PM

    Hello Luis.

    personEntity.$query().$project({}).$addFields({ maxAge: personEntity.age.$max() });

    Best Regards,

    Florian

    Add comment
    10|10000 characters needed characters exceeded