User Documentation
 All Files Functions Groups
quantile.sql_in File Reference

SQL function for Quantile. More...

Go to the source code of this file.

Functions

float quantile_big (text table_name, text col_name, float quantile)
 Computes quantile. More...
 
float quantile (text table_name, text col_name, float quantile)
 Computes quantile. More...
 

Detailed Description

Date
January 2011
See Also
For a brief introduction to quantiles, see the module description Quantile.

Definition in file quantile.sql_in.

Function Documentation

float quantile ( text  table_name,
text  col_name,
float  quantile 
)
Parameters
table_namename of the table from which quantile is to be taken
col_namename of the column that is to be used for quantile calculation
quantiledesired quantile value \( \in (0,1) \)
Returns
The quantile value

This function computes the specified quantile value. It reads the name of the table, the specific column, and computes the quantile value based on the fraction specified as the third argument.

Definition at line 239 of file quantile.sql_in.

float quantile_big ( text  table_name,
text  col_name,
float  quantile 
)
Parameters
table_namename of the table from which quantile is to be taken
col_namename of the column that is to be used for quantile calculation
quantiledesired quantile value \( \in (0,1) \)
Returns
The quantile value

This function computes the specified quantile value. It reads the name of the table, the specific column, and computes the quantile value based on the fraction specified as the third argument. The functionality is the same as quantile except this implementation is designed to work more efficiently with large tables.

Definition at line 69 of file quantile.sql_in.