ClickHouse/tests/queries/0_stateless/01700_deltasum.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.4 KiB
MySQL
Raw Normal View History

select deltaSum(arrayJoin([1, 2, 3]));
select deltaSum(arrayJoin([1, 2, 3, 0, 3, 4]));
select deltaSum(arrayJoin([1, 2, 3, 0, 3, 4, 2, 3]));
select deltaSum(arrayJoin([1, 2, 3, 0, 3, 3, 3, 3, 3, 4, 2, 3]));
select deltaSum(arrayJoin([1, 2, 3, 0, 0, 0, 0, 3, 3, 3, 3, 3, 4, 2, 3]));
2022-05-17 16:20:50 +00:00
select deltaSumMerge(rows) as delta_sum from
2022-02-02 16:49:44 +00:00
(
select * from
(
select deltaSumState(arrayJoin([0, 1])) as rows
union all
select deltaSumState(arrayJoin([4, 5])) as rows
) order by rows
2022-05-17 16:20:50 +00:00
) order by delta_sum;
select deltaSumMerge(rows) as delta_sum from
2022-02-02 16:49:44 +00:00
(
select * from
(
select deltaSumState(arrayJoin([4, 5])) as rows
union all
select deltaSumState(arrayJoin([0, 1])) as rows
) order by rows
2022-05-17 16:20:50 +00:00
) order by delta_sum;
select deltaSum(arrayJoin([2.25, 3, 4.5]));
2022-05-17 16:20:50 +00:00
select deltaSumMerge(rows) as delta_sum from
2022-02-02 16:49:44 +00:00
(
select * from
(
select deltaSumState(arrayJoin([0.1, 0.3, 0.5])) as rows
union all
select deltaSumState(arrayJoin([4.1, 5.1, 6.6])) as rows
) order by rows
2022-05-17 16:20:50 +00:00
) order by delta_sum;
select deltaSumMerge(rows) as delta_sum from
2022-02-02 16:49:44 +00:00
(
select * from
(
select deltaSumState(arrayJoin([3, 5])) as rows
union all
select deltaSumState(arrayJoin([1, 2])) as rows
union all
select deltaSumState(arrayJoin([4, 6])) as rows
) order by rows
2022-05-17 16:20:50 +00:00
) order by delta_sum;