Datamart Query Expressions
Â
This list is valid ONLY for direct Datamart / Data Source queries, not for cached (table context) tables queries. For cached tables we use the H2 database which has a slightly different syntax.
Expressions
The expression string supports:
Variables and functions
Number expressions (resulting in either an Integer or BigDecimal, but not double/float)Â
String expressions
Literal strings have to be quoted using the double quotes (")
Supported operators are:
( ) + - * / ^ and or < <= > >= = <> % not inv
The +
operator can be used for the concatenation (i.e., "a" + "b" -> "ab") in Data Source and Datamart field expressions. It is not applicable as an expression within Charts.
General Functions
Function | Description |
---|---|
| Returns a Boolean value indicating whether a specified expression contains no valid data (null). |
| Evaluates a condition. Argument2 and 3 have to have the same data type. Sample SQL: |
|
|
| Returns the first expression if the two expressions are not equal. |
|
|
|
|
| Argument1 is literal, argument2 is literal string, e.g. "STRING". For argument2, allowed values are:Â STRING, NUMBER, DATE, BOOLEAN, DATETIME, LOB, LONG |
| An SQL query with formula: |
| The nearest integer greater than or equal to the argument. |
| The nearest integer less than or equal to the argument. |
| Rounds to the specified number of decimals: round(42.4382, 2) = 42.44 |
Aggregation Functions for Group By
Function | Description |
---|---|
| Sum of the expression across all input values. |
| Average of the expression across all input values. |
| Minimum value of the expression across all input values. |
| Maximum value of the expression across all input values. |
| Number of input rows for which the value of the expression is not null. |
| Number of all distinct non-null values specified by the expression. |
| |
| |
|
|
|
|
Statistical Aggregation Functions
Function | Description |
---|---|
| Correlation coefficient |
| Population covariance |
| Sample covariance |
| Average of the independent variable (sum(X)/N) |
| Average of the dependent variable (sum(Y)/N) |
| Number of input rows in which both expressions are non-null |
| Y-intercept of the least-squares-fit linear equation determined by the (X, Y) pairs |
| Square of the correlation coefficient |
| Slope of the least-squares-fit linear equation determined by the (X, Y) pairs |
| Sum(X^2) - sum(X)^2/N ("sum of squares" of the independent variable) |
| Sum(X*Y) - sum(X) * sum(Y)/N ("sum of products" of independent times dependent variable) |
| Sum(Y^2) - sum(Y)^2/N ("sum of squares" of the dependent variable) |
| Population standard deviation of the input values |
| Sample standard deviation of the input values |
| Population variance of the input values (square of the population standard deviation) |
| Sample variance of the input values (square of the population standard deviation) |
Functions Used Within Groups
Function | Description |
---|---|
| Relative rank of the current row: (rank - 1) / (total rows - 1) |
| Relative rank of the current row: (number of rows preceding or peer with current row) / (total rows) |
|
|
|
|
|
|
|
|
Â
Found an issue in documentation? Write to us.
Â