2022-01-16 06:25:11 +00:00
|
|
|
SELECT sumIf(1, 0);
|
|
|
|
SELECT SumIf(1, 0);
|
|
|
|
SELECT sUmIf(1, 0);
|
2024-05-30 12:27:25 +00:00
|
|
|
SELECT sumIF(1, 0); -- { serverError UNKNOWN_FUNCTION }
|
2022-01-16 06:25:11 +00:00
|
|
|
|
|
|
|
DROP TABLE IF EXISTS data;
|
|
|
|
DROP TABLE IF EXISTS agg;
|
|
|
|
|
|
|
|
CREATE TABLE data
|
|
|
|
(
|
|
|
|
`n` UInt32,
|
|
|
|
`t` DateTime
|
|
|
|
)
|
|
|
|
ENGINE = Null;
|
|
|
|
|
|
|
|
CREATE TABLE agg
|
|
|
|
ENGINE = AggregatingMergeTree
|
|
|
|
ORDER BY tuple() AS
|
|
|
|
SELECT
|
|
|
|
t,
|
|
|
|
sumIF(n, 0)
|
|
|
|
FROM data
|
2024-05-30 12:27:25 +00:00
|
|
|
GROUP BY t; -- { serverError UNKNOWN_FUNCTION}
|
2022-01-16 06:25:11 +00:00
|
|
|
|
|
|
|
CREATE TABLE agg
|
|
|
|
ENGINE = AggregatingMergeTree
|
|
|
|
ORDER BY tuple() AS
|
|
|
|
SELECT
|
|
|
|
t,
|
|
|
|
sumIf(n, 0)
|
|
|
|
FROM data
|
|
|
|
GROUP BY t;
|
|
|
|
|
|
|
|
DROP TABLE data;
|
|
|
|
DROP TABLE agg;
|