Introduction

The aggregation functionality of the Data API allows you to perform calculations on your collection data, as whole or on groups of items that you define, to retrieve meaningful summaries. You can also add filtering and sorting to your aggregations to retrieve exactly what you need.

The examples below use a sample collection, named PopulationData, with the following data:

Copy
City, Population, State, Year Buffalo, 292000, NY, 2000 Buffalo, 261000, NY, 2010 Los Angeles, 3703000, CA, 2000 Los Angeles, 3796000, CA, 2010 Miami, 362000, FL, 2000 Miami, 401000, FL, 2010 New York, 8015000, NY, 2000 New York, 8192000, NY, 2010 Orlando, 195000, FL, 2000 Orlando, 240000, FL, 2010 San Diego 1228000, CA, 2010 San Diego 1306000, CA, 2012 San Francisco, 777000, CA, 2000 San Francisco, 805000, CA, 2010

For more information, see Working with Aggregations and Groupings in the Data API.

Note: Aggregations can only be used on collections you have created. They cannot be used on Wix App Collections.

Did this help?