...
Group the sum of amount based on project iddepartment entity ancestry[6] id(
attributes.departmentEntity.ancestry[6].id
) that is GP(Gram Panchayat), COA(chart of account) id, and event type.Difference of sum of amount of "DEMAND" and "RECEIPT" event type with respect to distinct project iddepartment entity ancestry[6] id(
attributes.departmentEntity.ancestry[6].id
) that is GP(Gram Panchayat).Difference of sum of amount of "BILL" and "PAYMENT" event type with respect to distinct project iddepartment entity ancestry[6] id(
attributes.departmentEntity.ancestry[6].id
) that is GP(Gram Panchayat).
Upsert the final aggregated fiscal event data into the Postgres DB.
...