cancel
Showing results for 
Search instead for 
Did you mean: 

use of $max operator in XSDS

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor
0 Kudos

Hello Luis.

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

Best Regards,

Florian

Former Member
0 Kudos

Thank you so much again, Florian

Best regards,

Luis

Answers (0)