Each of the script functions in this section are modeled after a corresponding aggregate expression function, but is tailored for use with python lists of values instead of a dataset column. This format gives them the appearance of handling column data when used within the select string of a view expression function instance. To conform to SQL standard behavior, these script functions ignore null/None values. The statistical functions in this group accept java.lang.Date list items, but convert them to milliseconds before use.
To make its select strings more similar to real SQL, the view expression function assigns all of these functions to its local scope, allowing their use without the "system.aggregate." prefix. However, these functions only accept list data types as arguments. Where real SQL will accept normal arithmetic and other expressions inside the aggregate function's parenthesis, these functions cannot. You must perform such operations with an appropriate jython expression.
Return the numerical average of the values. Returns null/None if there are no non-null values. Functionally identical to mean().
Return the number of non-null values.
Like the built-in groupConcat expression function, construct a string from all of the supplied list elements, joined by the given delimiter.
Like the built-in max expression function, return the numerically largest value. Returns null/None if there are no non-null values.
Like the built-in mean expression function, return the numerical average of the values. Returns null/None if there are no non-null values.
Like the built-in min expression function, return the numerically smallest value. Returns null/None if there are no non-null values.
Return the population standard deviation of the values. Returns null/None if there are less than two non-null values.
Like the built-in stdDev expression function, return the sample standard deviation of the values. Returns null/None if there are less than two non-null values.
Like the built-in sum expression function, return the numerical sum of the values. Returns zero if there are no non-null values.