IQR Function

Returns the interquartile range.

Category: Descriptive Statistics
Returned data type: DOUBLE

Syntax

IQR(expression [, ...expression])

Arguments

expression

specifies any valid expression that evaluates to a numeric value.

Data type DOUBLE
See <sql-expression>
FedSQL Expressions

Details

If all arguments have null or missing values, the result is a null or missing value depending on whether you are in ANSI mode or SAS mode. For more information, see How FedSQL Processes Nulls and SAS Missing Values.
Otherwise, the result is the interquartile range of the non-null or nonmissing values. The formula for the interquartile range is the same as the one that is used in the Base SAS UNIVARIATE procedure. For more information, see Base SAS Procedures Guide: Statistical Procedures.

Example

The following statement illustrates the IQR function:
Statements
Results
select iqr(2,4,1,3,999999);
 2

See Also