SQL function for Quantile.
More...
- Date
- January 2011
- See also
- For a brief introduction to quantiles, see the module description Quantile.
| float quantile |
( |
text |
table_name, |
|
|
text |
col_name, |
|
|
float |
quantile |
|
) |
| |
- Parameters
-
| table_name | name of the table from which quantile is to be taken |
| col_name | name of the column that is to be used for quantile calculation |
| quantile | desired 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.
| float quantile_big |
( |
text |
table_name, |
|
|
text |
col_name, |
|
|
float |
quantile |
|
) |
| |
- Parameters
-
| table_name | name of the table from which quantile is to be taken |
| col_name | name of the column that is to be used for quantile calculation |
| quantile | desired 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.