D
SELECT
argMaxIf(assumeNotNull(x), y, not isNull(x))
FROM
(
SELECT
null AS x,
1 AS y
UNION ALL
SELECT
null AS x,
2 AS y
);
DB::Exception: Cannot create column of type Nothing
Size: a a a
D
SELECT
argMaxIf(assumeNotNull(x), y, not isNull(x))
FROM
(
SELECT
null AS x,
1 AS y
UNION ALL
SELECT
null AS x,
2 AS y
);
DB::Exception: Cannot create column of type Nothing
DT
SELECT
argMaxIf(assumeNotNull(x), y, not isNull(x))
FROM
(
SELECT
null AS x,
1 AS y
UNION ALL
SELECT
null AS x,
2 AS y
);
DB::Exception: Cannot create column of type Nothing
AK
nsert into source values (0,0,null), (1,1,1), (1,2,null)
select a, argMaxMerge(st) from destination group by a
SELECT
a,
argMaxMerge(st)
FROM destination
GROUP BY a
┌─a─┬─argMaxMerge(st)─┐
│ 0 │ 0 │
│ 1 │ 1 │
└───┴─────────────────┘
D
AK
D
nsert into source values (0,0,null), (1,1,1), (1,2,null)
select a, argMaxMerge(st) from destination group by a
SELECT
a,
argMaxMerge(st)
FROM destination
GROUP BY a
┌─a─┬─argMaxMerge(st)─┐
│ 0 │ 0 │
│ 1 │ 1 │
└───┴─────────────────┘
AK
┌─a─┬─argMaxMerge(st)─┐
│ 0 │ 0 │
│ 1 │ 0 │
└───┴─────────────────┘
D
D
AK
D
AK
D
AK
S
AK
S
AK
S
AK