You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
select number as c, sum(t), count(t), count(distinct t), sum(distinct t) from (select number, if( number < 2, 1, null) as t from numbers_mt(4) ) group by c order by c
Copy file name to clipboardexpand all lines: tests/logictest/suites/query/02_function/02_0000_function_aggregate_retention
+4-1
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,6 @@
1
+
statement ok
2
+
use default
3
+
1
4
statement ok
2
5
DROP TABLE IF EXISTS retention_test
3
6
@@ -34,7 +37,7 @@ SELECT sum(r[1]) as r1, sum(r[2]) as r2, sum(r[3]) as r3 FROM (SELECT uid, reten
34
37
query II
35
38
SELECT uid, retention(date = '2018-08-06', date = '2018-08-07', date = '2018-08-08') AS r FROM retention_test WHERE uid = 999 GROUP BY uid
36
39
----
37
-
999 [0, 0, 0]
40
+
999 [0,0,0]
38
41
39
42
query I
40
43
SELECT uid FROM (SELECT uid,retention(date = '2018-08-06', date = '2018-08-07') AS r FROM retention_test WHERE date = '2018-08-06' OR date = '2018-08-07' GROUP BY uid) WHERE r[1] = 1 ORDER BY uid desc limit 1
0 commit comments