Aggregate Functions
An aggregate function is a function that operates on a number of cases at once. For example, the mean( ) function uses all the cases in a collection to compute its value. Other aggregate functions include stddev( ), median( ), iqr( ), sum( ), and count( ). They require one or two arguments (attributes) and take an optional filter as a second argument. For example,
mean(age) computes the mean age of people in your collection
mean(height, (age = 10)) computes the mean height of the 10-year-olds.
These contrast with case functions, which look at a single case, such as log( ).