This commit is contained in:
Andrei Bodrov 2019-12-15 16:41:50 +03:00
parent cae40d3d94
commit e2f347a5ad
2 changed files with 3 additions and 5 deletions

View File

@ -1 +1,3 @@
3
2.3333333333333335
nan
1

View File

@ -1,4 +0,0 @@
SELECT avgWeighted(x, weight) FROM (SELECT t.1 AS x, t.2 AS weight FROM (SELECT arrayJoin([(1, 5), (2, 4), (3, 3), (4, 2), (5, 1)]) AS t));
SELECT avgWeighted(x, weight) FROM (SELECT t.1 AS x, t.2 AS weight FROM (SELECT arrayJoin([(1, 0), (2, 0), (3, 0), (4, 0), (5, 0)]) AS t));
SELECT avgWeighted(toDecimal64(0, 0), toFloat64(0))