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 column5, avg(column1) FROM d GROUP BY column5;
5018
+
----
5019
+
1 0 days 0 hours 0 mins 6 secs 2 0 days 0 hours 0 mins 15 secs
5020
+
5021
+
# window function tests for retract batch code
5022
+
query ????I
5023
+
SELECT column5, column1, avg(column1) OVER (PARTITION BY column5 ORDER BY column1 ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) as window_avg
5024
+
FROM d WHERE column1 IS NOT NULL;
5025
+
----
5026
+
1 0 days 0 hours 0 mins 1 secs 0 days 0 hours 0 mins 1 secs 1 0 days 0 hours 0 mins 11 secs 0 days 0 hours 0 mins 6 secs2 0 days 0 hours 0 mins 5 secs 0 days 0 hours 0 mins 5 secs 2 0 days 0 hours 0 mins 25 secs 0 days 0 hours 0 mins 15 secs
5027
+
5028
+
# window function with cumulative frame
5029
+
query ????I
5030
+
SELECT column5, column1, avg(column1) OVER (ORDER BY column5, column1 ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) as cumulative_avg
5031
+
FROM d WHERE column1 IS NOT NULL;
5032
+
----
5033
+
1 0 days 0 hours 0 mins 1 secs 0 days 0 hours 0 mins 1 secs 1 0 days 0 hours 0 mins 11 secs 0 days 0 hours 0 mins 6 secs 2 0 days 0 hours 0 mins 5 secs 0 days 0 hours 0 mins 5.666666667 secs 2 0 days 0 hours 0 mins 25 secs 0 days 0 hours 0 mins 10.5 secs
5034
+
5035
+
# window function with centered frame
5036
+
query ????I
5037
+
SELECT column5, column1, avg(column1) OVER (ORDER BY column5 ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) as centered_avg
5038
+
FROM d WHERE column1 IS NOT NULL;
5039
+
----
5040
+
1 0 days 0 hours 0 mins 1 secs 0 days 0 hours 0 mins 6 secs 1 0 days 0 hours 0 mins 11 secs 0 days 0 hours 0 mins 8 secs 2 0 days 0 hours 0 mins 5 secs 0 days 0 hours 0 mins 13.66666667 secs 2 0 days 0 hours 0 mins 25 secs 0 days 0 hours 0 mins 15 secs
5041
+
5042
+
statement ok
5043
+
drop table d;
5044
+
5001
5045
# Prepare the table with dictionary values for testing
0 commit comments