跳到主要内容
版本: 最新版本-3.5

percentile_hash

构造 DOUBLE 值作为 PERCENTILE 值。

语法

PERCENTILE_HASH(x);

参数

x: 支持的数据类型为 DOUBLE。

返回值

返回一个 PERCENTILE 值。

示例

mysql> select percentile_approx_raw(percentile_hash(234.234), 0.99);
+-------------------------------------------------------+
| percentile_approx_raw(percentile_hash(234.234), 0.99) |
+-------------------------------------------------------+
| 234.23399353027344 |
+-------------------------------------------------------+
1 row in set (0.00 sec)