Sum aggregation


(Berntsson) #1

Hi, I cant figure out how to make the following aggregation. (This is on 1.7)
I have objects that look like following:

{"currencyRate": 2, "orderRow": [{"value": 1000, "productId": 1},{"value": 1000, "productId": 1}, {"value": 1000, "productId": 2}]}

What i want to do is: For every object sum the value of all orderRows with productId = 1 then multiply that value with the currencyRate. Then sum all of those values for all objects.

Any ideas how to do this?

Thanks, Robin.


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.