How to populate all items in a dataset with aggregated (Sum) data from another dataset?

@kscholiadis So remove this line:

.having(wixData.filter().eq('vendorId', vendorId))

and then the res.items will be an array of items that contains _id and paymentsSum.