public class Aggregations
extends java.lang.Object
Constructor and Description |
---|
Aggregations() |
Modifier and Type | Method and Description |
---|---|
static Expression |
count(Expression e,
boolean distinct)
Calculates the number of values for an expression: new expression = COUNT(e)
|
static Expression |
geometricMean(Expression e)
Calculates the geometric mean of all values for an expression: new expression =
EXP(AVG(LN(e))).
|
static Expression |
max(Expression e)
Calculates the maximum value of an expression: new expression = MAX(e)
|
static Expression |
mean(Expression e)
Calculates the arithmetic mean of all values for an expression: new expression = AVG(e)
|
static Expression |
min(Expression e)
Calculates the minimum value of an expression: new expression = MIN(e)
|
static Expression |
quadraticMean(Expression e)
Calculates the quadratic mean, also called Root Mean Square, for an expression:
new expression = sqrt(AVG(e*e))
|
static Expression |
sum(Expression e)
Calculates the sum of all values of an expression: new expression = SUM(e)
|
public static Expression count(Expression e, boolean distinct)
e
- The expression to count, or null to count all rows (ie. COUNT(*))distinct
- If only distinct values should be countedpublic static Expression geometricMean(Expression e) throws InvalidDataException
e
- The expression to use in the calculationInvalidDataException
- If the expression is nullpublic static Expression max(Expression e) throws InvalidDataException
e
- The expression to use in the calculationInvalidDataException
- If the expression is nullpublic static Expression min(Expression e) throws InvalidDataException
e
- The expression to use in the calculationInvalidDataException
- If the expression is nullpublic static Expression mean(Expression e) throws InvalidDataException
e
- The expression to use in the calculationInvalidDataException
- If the expression is nullpublic static Expression sum(Expression e) throws InvalidDataException
e
- The expression to use in the calculationInvalidDataException
- If the expression is nullpublic static Expression quadraticMean(Expression e)
e
- The expression to use in the calculationInvalidUseOfNullException
- If the expression is null