Sum field (number type) values

Hi there,

I have a collection with different fields (product, description, price, etc). How would you get the sum of prices of each item, in order to get the total incoming amount? Does query API is the right way?

Glad to read you suggestions!

1 Like

Yes you can accomplish this with wix-data. You’d likely want to create an aggregate and use the sum function. You can find examples on how to do this here: https://www.wix.com/velo/reference/wix-data/wixdataaggregate/sum