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 CodeCity, Population, State, YearBuffalo, 292000, NY, 2000Buffalo, 261000, NY, 2010Los Angeles, 3703000, CA, 2000Los Angeles, 3796000, CA, 2010Miami, 362000, FL, 2000Miami, 401000, FL, 2010New York, 8015000, NY, 2000New York, 8192000, NY, 2010Orlando, 195000, FL, 2000Orlando, 240000, FL, 2010San Diego 1228000, CA, 2010San Diego 1306000, CA, 2012San Francisco, 777000, CA, 2000San 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.
Was this helpful?