mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
one more test
This commit is contained in:
parent
5a916860ef
commit
02f236e457
@ -0,0 +1 @@
|
||||
1 [1]
|
@ -20,3 +20,11 @@ ARRAY JOIN
|
||||
WHERE CounterID = 100500;
|
||||
|
||||
DROP TABLE test.visits;
|
||||
|
||||
select u, cumSum from (
|
||||
select u, min(d) mn, max(d) mx, groupArray(d) dg, groupArray(v) vg,
|
||||
arrayMap(x -> x + mn, range(toUInt32(mx - mn + 1))) days,
|
||||
toString(arrayCumSum(arrayMap( x -> vg[indexOf(dg, x)] , days))) cumSum
|
||||
from (select 1 u, today()-1 d, 1 v)
|
||||
group by u
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user