RMS Function

Returns the root mean square.

Category: Descriptive Statistics
Returned data type: DOUBLE

Syntax

RMS(expression [, ...expression])

Arguments

expression

specifies any valid expression that evaluates to a numeric value.

Data type DOUBLE
See <sql-expression>
FedSQL Expressions

Details

The root mean square is the square root of the arithmetic mean of the squares of the values. If all the arguments are null or missing values, then the result is a null or missing value. Otherwise, the result is the root mean square of the non-null or nonmissing values.
Let n be the number of arguments with non-null or nonmissing values, and let x sub 1 , comma , x sub 2 , comma dot dot dot comma , x sub n be the values of those arguments. The root mean square is calculated as follows.

Example

The following statements illustrate the RMS function:
Statements
Results
select rms(1,7);
5
select rms(.,1,5,11);
7
Last updated: February 23, 2017