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 count(*) from v where coalesce(x, 0.0::float8::vops_float4) >= 0;
68
68
count
69
69
-------
70
-
64
70
+
6
71
71
(1 row)
72
72
73
73
select unnest(t.*) from (select mcount(*) over w,mcount(x) over w,msum(x) over w,mavg(x) over w,mmin(x) over w,mmax(x) over w,x - lag(x) over w from v window w as (rows between unbounded preceding and current row)) t;
74
-
unnest
75
-
--------------------
74
+
unnest
75
+
-------------------
76
76
(1,1,1,1,1,1,)
77
77
(2,2,3,1.5,1,2,1)
78
78
(3,2,3,1.5,1,2,)
79
79
(4,3,6,2,1,3,)
80
80
(5,3,6,2,1,3,)
81
81
(6,4,10,2.5,1,4,)
82
-
(7,4,10,2.5,1,4,)
83
-
(8,4,10,2.5,1,4,)
84
-
(9,4,10,2.5,1,4,)
85
-
(10,4,10,2.5,1,4,)
86
-
(11,4,10,2.5,1,4,)
87
-
(12,4,10,2.5,1,4,)
88
-
(13,4,10,2.5,1,4,)
89
-
(14,4,10,2.5,1,4,)
90
-
(15,4,10,2.5,1,4,)
91
-
(16,4,10,2.5,1,4,)
92
-
(17,4,10,2.5,1,4,)
93
-
(18,4,10,2.5,1,4,)
94
-
(19,4,10,2.5,1,4,)
95
-
(20,4,10,2.5,1,4,)
96
-
(21,4,10,2.5,1,4,)
97
-
(22,4,10,2.5,1,4,)
98
-
(23,4,10,2.5,1,4,)
99
-
(24,4,10,2.5,1,4,)
100
-
(25,4,10,2.5,1,4,)
101
-
(26,4,10,2.5,1,4,)
102
-
(27,4,10,2.5,1,4,)
103
-
(28,4,10,2.5,1,4,)
104
-
(29,4,10,2.5,1,4,)
105
-
(30,4,10,2.5,1,4,)
106
-
(31,4,10,2.5,1,4,)
107
-
(32,4,10,2.5,1,4,)
108
-
(33,4,10,2.5,1,4,)
109
-
(34,4,10,2.5,1,4,)
110
-
(35,4,10,2.5,1,4,)
111
-
(36,4,10,2.5,1,4,)
112
-
(37,4,10,2.5,1,4,)
113
-
(38,4,10,2.5,1,4,)
114
-
(39,4,10,2.5,1,4,)
115
-
(40,4,10,2.5,1,4,)
116
-
(41,4,10,2.5,1,4,)
117
-
(42,4,10,2.5,1,4,)
118
-
(43,4,10,2.5,1,4,)
119
-
(44,4,10,2.5,1,4,)
120
-
(45,4,10,2.5,1,4,)
121
-
(46,4,10,2.5,1,4,)
122
-
(47,4,10,2.5,1,4,)
123
-
(48,4,10,2.5,1,4,)
124
-
(49,4,10,2.5,1,4,)
125
-
(50,4,10,2.5,1,4,)
126
-
(51,4,10,2.5,1,4,)
127
-
(52,4,10,2.5,1,4,)
128
-
(53,4,10,2.5,1,4,)
129
-
(54,4,10,2.5,1,4,)
130
-
(55,4,10,2.5,1,4,)
131
-
(56,4,10,2.5,1,4,)
132
-
(57,4,10,2.5,1,4,)
133
-
(58,4,10,2.5,1,4,)
134
-
(59,4,10,2.5,1,4,)
135
-
(60,4,10,2.5,1,4,)
136
-
(61,4,10,2.5,1,4,)
137
-
(62,4,10,2.5,1,4,)
138
-
(63,4,10,2.5,1,4,)
139
-
(64,4,10,2.5,1,4,)
140
-
(64 rows)
82
+
(6 rows)
141
83
142
84
143
85
create table s2(x float8, id serial);
@@ -252,35 +194,7 @@ select unnest(t.*) from (select msum(x,10) over (order by first(id)) from v2) t;
252
194
(935)
253
195
(945)
254
196
(955)
255
-
(864)
256
-
(772)
257
-
(679)
258
-
(585)
259
-
(490)
260
-
(394)
261
-
(297)
262
-
(199)
263
-
(100)
264
-
(0)
265
-
(0)
266
-
(0)
267
-
(0)
268
-
(0)
269
-
(0)
270
-
(0)
271
-
(0)
272
-
(0)
273
-
(0)
274
-
(0)
275
-
(0)
276
-
(0)
277
-
(0)
278
-
(0)
279
-
(0)
280
-
(0)
281
-
(0)
282
-
(0)
283
-
(128 rows)
197
+
(100 rows)
284
198
285
199
select sum(x) over (order by id rows between 9 preceding and current row) from s2;
0 commit comments