Hi @Chinni ,
Using a query activity in a workflow, leave the filtering conditions blank and configure the output columns to look something like this:

The records outputted will be grouped by partyId, and the newly month colums will sum the Money_arrears values for each partyId, but only if the month is equal to the one you specify. (Remember to disable automatic adding of primary key in the query's advanced parameters.)

Thanks,
Josh