PERCENTILE_APPROX_WEIGHT (Lakehouse v2)
Returns a weighted approximate percentile value.
Analyze Syntax
Section titled “Analyze Syntax”func.percentile_approx_weight(get_column(table, 'val'), get_column(table, 'weight'), 0.5)Analyze Examples
Section titled “Analyze Examples”func.percentile_approx_weight(get_column(table, 'val'), get_column(table, 'weight'), 0.5)
┌──────┐│ 72.5 │└──────┘SQL Syntax
Section titled “SQL Syntax”PERCENTILE_APPROX_WEIGHT(<val>, <weight>, 0.5)SQL Examples
Section titled “SQL Examples”SELECT PERCENTILE_APPROX_WEIGHT(val, weight, 0.5) FROM data;
┌──────┐│ 72.5 │└──────┘