Hologres is compatible with PostgreSQL and allows you to use standard PostgreSQL syntax for data development.
The functions supported by Hologres are only a subset of the PostgreSQL functions. The following table describes the ordered-set aggregate functions that are supported by Hologres.
If the percentile_cont
and percentile_disc
functions are used in the WITHIN GROUP (ORDER BY col)
statement, the WITHIN GROUP (ORDER BY col)
statement only supports fields of the FLOAT4 or FLOAT8 type. In this case, you need to manually change the statement to WITHIN GROUP (ORDER BY col::float8)
.
Function | Description | Direct argument type | Aggregated argument type | Example | Return value type |
| Returns the most frequent input value. If multiple values are equally frequent, the function returns the first value. | None | A sortable type |
| Same as the sorting expression |
| Continuous percentile: returns a value that corresponds to the specified fraction in the ordering. If needed, the function interpolates a value between adjacent input items. |
|
|
| Same as the sorting expression |
| Multiple continuous percentile: returns an array of results that match the shape of the fractions parameter, with each non-null element replaced by the value that corresponds to that percentile. |
|
|
| Array of the same type as the sorting expression |
| Discrete percentile: returns the first input value whose position in the ordering equals or exceeds the specified percentile. |
| A sortable type |
| Same as the sorting expression |
| Multiple discrete percentile: returns an array of results that match the shape of the fractions parameter, with each non-null element replaced by the input value that corresponds to that percentile. |
| A sortable type |
| Array of the same type as the sorting expression |