OQL query in microflow

0
Hi, Member account will be my input, based on member account Id I need to get all my MCB entity objects group by Associations (balance ,fund, tax, contribution category),attributes(totalType) to give the amount sum which is attribute of MCB.   Can someone help me in writing OQL for this ?   TIA
asked
2 answers
0

You can do this kind of summation in a microflow (i.e. use a Retrieve activity to get some objects, sum different fields using a List Aggregation activity, etc.).  Is there a reason you need to use OQL for this?

answered
0

You probably need an OQL like this:

select c.CustomerType, count(*) Ordercount, sum(o.TotalPrice) TotalSpent
from "Sales.Customer" c
join "c/Sales.Order_Customer/Sales.Order" o
group by c.CustomerType;

Modify this to meet your requirements. And if need be, you can test this on the OQL page of service.mendixcloud.com.

answered