[new]: `udaf` compatibility - `weighted_average`(element, weight)
Closed this issue · 0 comments
AxelThevenot commented
Check the idea has not already been suggested
- I could not find my idea in existing issues
Edit the title above with self-explanatory function name and argument names
- The function name and the argument names I entered in the title above seems self explanatory to me.
BigFunction Description as it would appear in the documentation
with
_sample_data as (
select 10 as grade, 1 as ponderation
union all
select 13 as grade, 2 as ponderation
)
select
`sandbox-athevenot`.`wrk_dataset`.weighted_average(grade, ponderation) as final_grade
from `_sample_data`
Examples of (arguments, expected output) as they would appear in the documentation
example above returns 12.0