GROUP BY and SUM

Hello,

I’m brand new to Appgyver and i am building an app to track some transactions. This app will work offline, so i use On-device storage.

This is the structure of my list data: [ {“name”: “bibi”, “currency”: “USD”, “amount”: 125, “is_active”: true}, …]

My need is to SUM “amount” GROUP BY “name” and “currency” WHERE “is_active=true”.

In sql this would be “SELECT name, currency, sum(amount) FROM table WHERE is_active=true GROUP BY name, currency”

How to achieve this please ?

Thanks for your help.