Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

Tags:
replied

Hello Luis.

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

Best Regards,

Florian

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question