PERCENTILE_APPROX_WEIGHT (Lakehouse v2)
返回加权近似百分位数。
Analyze 语法
Section titled “Analyze 语法”func.percentile_approx_weight(get_column(table, 'val'), get_column(table, 'weight'), 0.5)Analyze 示例
Section titled “Analyze 示例”func.percentile_approx_weight(get_column(table, 'val'), get_column(table, 'weight'), 0.5)
┌──────┐│ 72.5 │└──────┘SQL 语法
Section titled “SQL 语法”PERCENTILE_APPROX_WEIGHT(<val>, <weight>, 0.5)SQL 示例
Section titled “SQL 示例”SELECT PERCENTILE_APPROX_WEIGHT(val, weight, 0.5) FROM data;
┌──────┐│ 72.5 │└──────┘