on dev help sign in
docs
b35affcEitan Chatav
squeal-postgresql/src/Squeal/PostgreSQL/Expression/Aggregate.hs+7
@@ -96,6 +96,7 @@ class Aggregate expr1 exprN aggr
96
96
97 {- |
97 {- |
98 the bitwise AND of all non-null input values, or null if none
98 the bitwise AND of all non-null input values, or null if none
99+
99 >>> :{
100 >>> :{
100 let
101 let
101 expression :: Expression '[] commons ('Grouped bys) schemas params '[tab ::: '["col" ::: null 'PGint4]] ('Null 'PGint4)
102 expression :: Expression '[] commons ('Grouped bys) schemas params '[tab ::: '["col" ::: null 'PGint4]] ('Null 'PGint4)
@@ -194,6 +195,7 @@ class Aggregate expr1 exprN aggr
194 -> aggr ('Null (PGAvg ty))
195 -> aggr ('Null (PGAvg ty))
195
196
196 {- | correlation coefficient
197 {- | correlation coefficient
198+
197 >>> :{
199 >>> :{
198 let
200 let
199 expression :: Expression '[] c ('Grouped g) s p '[t ::: '["x" ::: 'NotNull 'PGfloat8, "y" ::: 'NotNull 'PGfloat8]] ('Null 'PGfloat8)
201 expression :: Expression '[] c ('Grouped g) s p '[t ::: '["x" ::: 'NotNull 'PGfloat8, "y" ::: 'NotNull 'PGfloat8]] ('Null 'PGfloat8)
@@ -207,6 +209,7 @@ class Aggregate expr1 exprN aggr
207 -> aggr ('Null 'PGfloat8)
209 -> aggr ('Null 'PGfloat8)
208
210
209 {- | population covariance
211 {- | population covariance
212+
210 >>> :{
213 >>> :{
211 let
214 let
212 expression :: Expression '[] c ('Grouped g) s p '[t ::: '["x" ::: 'NotNull 'PGfloat8, "y" ::: 'NotNull 'PGfloat8]] ('Null 'PGfloat8)
215 expression :: Expression '[] c ('Grouped g) s p '[t ::: '["x" ::: 'NotNull 'PGfloat8, "y" ::: 'NotNull 'PGfloat8]] ('Null 'PGfloat8)
@@ -220,6 +223,7 @@ class Aggregate expr1 exprN aggr
220 -> aggr ('Null 'PGfloat8)
223 -> aggr ('Null 'PGfloat8)
221
224
222 {- | sample covariance
225 {- | sample covariance
226+
223 >>> :{
227 >>> :{
224 let
228 let
225 winFun :: WindowFunction '[] c 'Ungrouped s p '[t ::: '["x" ::: 'NotNull 'PGfloat8, "y" ::: 'NotNull 'PGfloat8]] ('Null 'PGfloat8)
229 winFun :: WindowFunction '[] c 'Ungrouped s p '[t ::: '["x" ::: 'NotNull 'PGfloat8, "y" ::: 'NotNull 'PGfloat8]] ('Null 'PGfloat8)
@@ -233,6 +237,7 @@ class Aggregate expr1 exprN aggr
233 -> aggr ('Null 'PGfloat8)
237 -> aggr ('Null 'PGfloat8)
234
238
235 {- | average of the independent variable (sum(X)/N)
239 {- | average of the independent variable (sum(X)/N)
240+
236 >>> :{
241 >>> :{
237 let
242 let
238 expression :: Expression '[] c ('Grouped g) s p '[t ::: '["x" ::: 'NotNull 'PGfloat8, "y" ::: 'NotNull 'PGfloat8]] ('Null 'PGfloat8)
243 expression :: Expression '[] c ('Grouped g) s p '[t ::: '["x" ::: 'NotNull 'PGfloat8, "y" ::: 'NotNull 'PGfloat8]] ('Null 'PGfloat8)
@@ -246,6 +251,7 @@ class Aggregate expr1 exprN aggr
246 -> aggr ('Null 'PGfloat8)
251 -> aggr ('Null 'PGfloat8)
247
252
248 {- | average of the dependent variable (sum(Y)/N)
253 {- | average of the dependent variable (sum(Y)/N)
254+
249 >>> :{
255 >>> :{
250 let
256 let
251 winFun :: WindowFunction '[] c 'Ungrouped s p '[t ::: '["x" ::: 'NotNull 'PGfloat8, "y" ::: 'NotNull 'PGfloat8]] ('Null 'PGfloat8)
257 winFun :: WindowFunction '[] c 'Ungrouped s p '[t ::: '["x" ::: 'NotNull 'PGfloat8, "y" ::: 'NotNull 'PGfloat8]] ('Null 'PGfloat8)
@@ -259,6 +265,7 @@ class Aggregate expr1 exprN aggr
259 -> aggr ('Null 'PGfloat8)
265 -> aggr ('Null 'PGfloat8)
260
266
261 {- | number of input rows in which both expressions are nonnull
267 {- | number of input rows in which both expressions are nonnull
268+
262 >>> :{
269 >>> :{
263 let
270 let
264 winFun :: WindowFunction '[] c 'Ungrouped s p '[t ::: '["x" ::: 'NotNull 'PGfloat8, "y" ::: 'NotNull 'PGfloat8]] ('Null 'PGint8)
271 winFun :: WindowFunction '[] c 'Ungrouped s p '[t ::: '["x" ::: 'NotNull 'PGfloat8, "y" ::: 'NotNull 'PGfloat8]] ('Null 'PGint8)