represents an entity class containing a single entity with the property prop whose value is the result of applying the function f to the whole specified entity class.


constructs multiple properties propi obtained by applying fi to class.


forms groups of elements of class according to their values of the property gprop, then generates an entity class with an entity for each of these groups.


forms groups according to the values obtained by applying the entity function f, with the resulting property named pname.


forms groups for which the set of values defined by the gspeci is distinct.



open allclose all

Basic Examples  (3)

Create an aggregation of all countries and compute their total area:

An equivalent computation, suitable for small datasets:

Find the mean atomic mass for elements in each period class:

When used with relational-database-backed entities, a two-argument AggregatedEntityClass corresponds to using aggregate functions in the SELECT statement:

Compute the total amount of payments:

Compute the maximum credit limit by country (similar to a GROUP BY statement in SQL languages):

Scope  (2)

The third argument can be an EntityFunction:

Apply a function to the result, typically an aggregation function:

Use this to compute the mean value of the result:

Or create a pie chart with the result:

Properties & Relations  (2)

AggregatedEntityClass generates entities that correspond to groups:

Single entities obtained from AggregatedEntityClass effectively correspond to implicit entities:

Wolfram Research (2019), AggregatedEntityClass, Wolfram Language function,


Wolfram Research (2019), AggregatedEntityClass, Wolfram Language function,


@misc{reference.wolfram_2021_aggregatedentityclass, author="Wolfram Research", title="{AggregatedEntityClass}", year="2019", howpublished="\url{}", note=[Accessed: 17-June-2021 ]}


@online{reference.wolfram_2021_aggregatedentityclass, organization={Wolfram Research}, title={AggregatedEntityClass}, year={2019}, url={}, note=[Accessed: 17-June-2021 ]}


Wolfram Language. 2019. "AggregatedEntityClass." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2019). AggregatedEntityClass. Wolfram Language & System Documentation Center. Retrieved from