Edit on GitHub

sqlglot expressions - aggregate, window, and statistical functions.

  1"""sqlglot expressions - aggregate, window, and statistical functions."""
  2
  3from __future__ import annotations
  4
  5from sqlglot.expressions.core import Expression, Func, AggFunc, Binary
  6
  7
  8class AIAgg(Expression, AggFunc):
  9    arg_types = {"this": True, "expression": True}
 10    _sql_names = ["AI_AGG"]
 11
 12
 13class AISummarizeAgg(Expression, AggFunc):
 14    _sql_names = ["AI_SUMMARIZE_AGG"]
 15
 16
 17class AnyValue(Expression, AggFunc):
 18    pass
 19
 20
 21class ApproximateSimilarity(Expression, AggFunc):
 22    _sql_names = ["APPROXIMATE_SIMILARITY", "APPROXIMATE_JACCARD_INDEX"]
 23
 24
 25class ApproxPercentileAccumulate(Expression, AggFunc):
 26    pass
 27
 28
 29class ApproxPercentileCombine(Expression, AggFunc):
 30    pass
 31
 32
 33class ApproxPercentileEstimate(Expression, Func):
 34    arg_types = {"this": True, "percentile": True}
 35
 36
 37class ApproxQuantiles(Expression, AggFunc):
 38    arg_types = {"this": True, "expression": False}
 39
 40
 41class ApproxTopK(Expression, AggFunc):
 42    arg_types = {"this": True, "expression": False, "counters": False}
 43
 44
 45class ApproxTopKAccumulate(Expression, AggFunc):
 46    arg_types = {"this": True, "expression": False}
 47
 48
 49class ApproxTopKCombine(Expression, AggFunc):
 50    arg_types = {"this": True, "expression": False}
 51
 52
 53class ApproxTopKEstimate(Expression, Func):
 54    arg_types = {"this": True, "expression": False}
 55
 56
 57class ApproxTopSum(Expression, AggFunc):
 58    arg_types = {"this": True, "expression": True, "count": True}
 59
 60
 61class ArgMax(Expression, AggFunc):
 62    arg_types = {"this": True, "expression": True, "count": False}
 63    _sql_names = ["ARG_MAX", "ARGMAX", "MAX_BY"]
 64
 65
 66class ArgMin(Expression, AggFunc):
 67    arg_types = {"this": True, "expression": True, "count": False}
 68    _sql_names = ["ARG_MIN", "ARGMIN", "MIN_BY"]
 69
 70
 71class ArrayAgg(Expression, AggFunc):
 72    arg_types = {"this": True, "nulls_excluded": False}
 73
 74
 75class ArrayConcatAgg(Expression, AggFunc):
 76    pass
 77
 78
 79class ArrayUnionAgg(Expression, AggFunc):
 80    pass
 81
 82
 83class ArrayUniqueAgg(Expression, AggFunc):
 84    pass
 85
 86
 87class Avg(Expression, AggFunc):
 88    pass
 89
 90
 91class Corr(Expression, AggFunc, Binary):
 92    # Correlation divides by variance(column). If a column has 0 variance, the denominator
 93    # is 0 - some dialects return NaN (DuckDB) while others return NULL (Snowflake).
 94    # `null_on_zero_variance` is set to True at parse time for dialects that return NULL.
 95    arg_types = {"this": True, "expression": True, "null_on_zero_variance": False}
 96
 97
 98class Count(Expression, AggFunc):
 99    arg_types = {"this": False, "expressions": False, "big_int": False}
100    is_var_len_args = True
101
102
103class CountIf(Expression, AggFunc):
104    _sql_names = ["COUNT_IF", "COUNTIF"]
105    arg_types = {"this": True, "zero_on_all_null": False}
106
107
108class CovarPop(Expression, AggFunc):
109    arg_types = {"this": True, "expression": True}
110
111
112class CovarSamp(Expression, AggFunc):
113    arg_types = {"this": True, "expression": True}
114
115
116class CumeDist(Expression, AggFunc):
117    arg_types = {"expressions": False}
118    is_var_len_args = True
119
120
121class DenseRank(Expression, AggFunc):
122    arg_types = {"expressions": False}
123    is_var_len_args = True
124
125
126class First(Expression, AggFunc):
127    arg_types = {"this": True, "expression": False}
128
129
130class FirstValue(Expression, AggFunc):
131    pass
132
133
134class GroupConcat(Expression, AggFunc):
135    arg_types = {"this": True, "separator": False, "on_overflow": False}
136
137
138class Grouping(Expression, AggFunc):
139    arg_types = {"expressions": True}
140    is_var_len_args = True
141
142
143class GroupingId(Expression, AggFunc):
144    arg_types = {"expressions": False}
145    is_var_len_args = True
146
147
148class Kurtosis(Expression, AggFunc):
149    pass
150
151
152class Lag(Expression, AggFunc):
153    arg_types = {"this": True, "offset": False, "default": False}
154
155
156class Last(Expression, AggFunc):
157    arg_types = {"this": True, "expression": False}
158
159
160class LastValue(Expression, AggFunc):
161    pass
162
163
164class Lead(Expression, AggFunc):
165    arg_types = {"this": True, "offset": False, "default": False}
166
167
168class LogicalAnd(Expression, AggFunc):
169    _sql_names = ["LOGICAL_AND", "BOOL_AND", "BOOLAND_AGG"]
170
171
172class LogicalOr(Expression, AggFunc):
173    _sql_names = ["LOGICAL_OR", "BOOL_OR", "BOOLOR_AGG"]
174
175
176class Max(Expression, AggFunc):
177    arg_types = {"this": True, "expressions": False}
178    is_var_len_args = True
179
180
181class Median(Expression, AggFunc):
182    pass
183
184
185class Min(Expression, AggFunc):
186    arg_types = {"this": True, "expressions": False}
187    is_var_len_args = True
188
189
190class Minhash(Expression, AggFunc):
191    arg_types = {"this": True, "expressions": True}
192    is_var_len_args = True
193
194
195class MinhashCombine(Expression, AggFunc):
196    pass
197
198
199class Mode(Expression, AggFunc):
200    arg_types = {"this": False, "deterministic": False}
201
202
203class Ntile(Expression, AggFunc):
204    arg_types = {"this": False}
205
206
207class NthValue(Expression, AggFunc):
208    arg_types = {"this": True, "offset": True, "from_first": False}
209
210
211class ObjectAgg(Expression, AggFunc):
212    arg_types = {"this": True, "expression": False}
213
214
215class PercentileCont(Expression, AggFunc):
216    arg_types = {"this": True, "expression": False}
217
218
219class PercentileDisc(Expression, AggFunc):
220    arg_types = {"this": True, "expression": False}
221
222
223PERCENTILES = (PercentileCont, PercentileDisc)
224
225
226class PercentRank(Expression, AggFunc):
227    arg_types = {"expressions": False}
228    is_var_len_args = True
229
230
231class Quantile(Expression, AggFunc):
232    arg_types = {"this": True, "quantile": True}
233
234
235class ApproxQuantile(Quantile):
236    arg_types = {
237        "this": True,
238        "quantile": True,
239        "accuracy": False,
240        "weight": False,
241        "error_tolerance": False,
242    }
243
244
245class Rank(Expression, AggFunc):
246    arg_types = {"expressions": False}
247    is_var_len_args = True
248
249
250class RegrAvgx(Expression, AggFunc):
251    arg_types = {"this": True, "expression": True}
252
253
254class RegrAvgy(Expression, AggFunc):
255    arg_types = {"this": True, "expression": True}
256
257
258class RegrCount(Expression, AggFunc):
259    arg_types = {"this": True, "expression": False}
260
261
262class RegrIntercept(Expression, AggFunc):
263    arg_types = {"this": True, "expression": False}
264
265
266class RegrR2(Expression, AggFunc):
267    arg_types = {"this": True, "expression": False}
268
269
270class RegrSlope(Expression, AggFunc):
271    arg_types = {"this": True, "expression": False}
272
273
274class RegrSxx(Expression, AggFunc):
275    arg_types = {"this": True, "expression": True}
276
277
278class RegrSxy(Expression, AggFunc):
279    arg_types = {"this": True, "expression": True}
280
281
282class RegrSyy(Expression, AggFunc):
283    arg_types = {"this": True, "expression": True}
284
285
286class RegrValx(Expression, AggFunc):
287    arg_types = {"this": True, "expression": True}
288
289
290class RegrValy(Expression, AggFunc):
291    arg_types = {"this": True, "expression": True}
292
293
294class RowNumber(Expression, Func):
295    arg_types = {"this": False}
296
297
298class Skewness(Expression, AggFunc):
299    pass
300
301
302class Stddev(Expression, AggFunc):
303    _sql_names = ["STDDEV", "STDEV"]
304
305
306class StddevPop(Expression, AggFunc):
307    pass
308
309
310class StddevSamp(Expression, AggFunc):
311    pass
312
313
314class Sum(Expression, AggFunc):
315    pass
316
317
318class Variance(Expression, AggFunc):
319    _sql_names = ["VARIANCE", "VARIANCE_SAMP", "VAR_SAMP"]
320
321
322class VariancePop(Expression, AggFunc):
323    _sql_names = ["VARIANCE_POP", "VAR_POP"]
 9class AIAgg(Expression, AggFunc):
10    arg_types = {"this": True, "expression": True}
11    _sql_names = ["AI_AGG"]
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'aiagg'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
14class AISummarizeAgg(Expression, AggFunc):
15    _sql_names = ["AI_SUMMARIZE_AGG"]
key: ClassVar[str] = 'aisummarizeagg'
required_args: 't.ClassVar[set[str]]' = {'this'}
18class AnyValue(Expression, AggFunc):
19    pass
key: ClassVar[str] = 'anyvalue'
required_args: 't.ClassVar[set[str]]' = {'this'}
class ApproximateSimilarity(sqlglot.expressions.core.Expression, sqlglot.expressions.core.AggFunc):
22class ApproximateSimilarity(Expression, AggFunc):
23    _sql_names = ["APPROXIMATE_SIMILARITY", "APPROXIMATE_JACCARD_INDEX"]
key: ClassVar[str] = 'approximatesimilarity'
required_args: 't.ClassVar[set[str]]' = {'this'}
class ApproxPercentileAccumulate(sqlglot.expressions.core.Expression, sqlglot.expressions.core.AggFunc):
26class ApproxPercentileAccumulate(Expression, AggFunc):
27    pass
key: ClassVar[str] = 'approxpercentileaccumulate'
required_args: 't.ClassVar[set[str]]' = {'this'}
class ApproxPercentileCombine(sqlglot.expressions.core.Expression, sqlglot.expressions.core.AggFunc):
30class ApproxPercentileCombine(Expression, AggFunc):
31    pass
key: ClassVar[str] = 'approxpercentilecombine'
required_args: 't.ClassVar[set[str]]' = {'this'}
class ApproxPercentileEstimate(sqlglot.expressions.core.Expression, sqlglot.expressions.core.Func):
34class ApproxPercentileEstimate(Expression, Func):
35    arg_types = {"this": True, "percentile": True}
arg_types = {'this': True, 'percentile': True}
key: ClassVar[str] = 'approxpercentileestimate'
required_args: 't.ClassVar[set[str]]' = {'percentile', 'this'}
38class ApproxQuantiles(Expression, AggFunc):
39    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'approxquantiles'
required_args: 't.ClassVar[set[str]]' = {'this'}
42class ApproxTopK(Expression, AggFunc):
43    arg_types = {"this": True, "expression": False, "counters": False}
arg_types = {'this': True, 'expression': False, 'counters': False}
key: ClassVar[str] = 'approxtopk'
required_args: 't.ClassVar[set[str]]' = {'this'}
class ApproxTopKAccumulate(sqlglot.expressions.core.Expression, sqlglot.expressions.core.AggFunc):
46class ApproxTopKAccumulate(Expression, AggFunc):
47    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'approxtopkaccumulate'
required_args: 't.ClassVar[set[str]]' = {'this'}
50class ApproxTopKCombine(Expression, AggFunc):
51    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'approxtopkcombine'
required_args: 't.ClassVar[set[str]]' = {'this'}
class ApproxTopKEstimate(sqlglot.expressions.core.Expression, sqlglot.expressions.core.Func):
54class ApproxTopKEstimate(Expression, Func):
55    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'approxtopkestimate'
required_args: 't.ClassVar[set[str]]' = {'this'}
58class ApproxTopSum(Expression, AggFunc):
59    arg_types = {"this": True, "expression": True, "count": True}
arg_types = {'this': True, 'expression': True, 'count': True}
key: ClassVar[str] = 'approxtopsum'
required_args: 't.ClassVar[set[str]]' = {'expression', 'count', 'this'}
62class ArgMax(Expression, AggFunc):
63    arg_types = {"this": True, "expression": True, "count": False}
64    _sql_names = ["ARG_MAX", "ARGMAX", "MAX_BY"]
arg_types = {'this': True, 'expression': True, 'count': False}
key: ClassVar[str] = 'argmax'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
67class ArgMin(Expression, AggFunc):
68    arg_types = {"this": True, "expression": True, "count": False}
69    _sql_names = ["ARG_MIN", "ARGMIN", "MIN_BY"]
arg_types = {'this': True, 'expression': True, 'count': False}
key: ClassVar[str] = 'argmin'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
72class ArrayAgg(Expression, AggFunc):
73    arg_types = {"this": True, "nulls_excluded": False}
arg_types = {'this': True, 'nulls_excluded': False}
key: ClassVar[str] = 'arrayagg'
required_args: 't.ClassVar[set[str]]' = {'this'}
76class ArrayConcatAgg(Expression, AggFunc):
77    pass
key: ClassVar[str] = 'arrayconcatagg'
required_args: 't.ClassVar[set[str]]' = {'this'}
80class ArrayUnionAgg(Expression, AggFunc):
81    pass
key: ClassVar[str] = 'arrayunionagg'
required_args: 't.ClassVar[set[str]]' = {'this'}
84class ArrayUniqueAgg(Expression, AggFunc):
85    pass
key: ClassVar[str] = 'arrayuniqueagg'
required_args: 't.ClassVar[set[str]]' = {'this'}
88class Avg(Expression, AggFunc):
89    pass
key: ClassVar[str] = 'avg'
required_args: 't.ClassVar[set[str]]' = {'this'}
92class Corr(Expression, AggFunc, Binary):
93    # Correlation divides by variance(column). If a column has 0 variance, the denominator
94    # is 0 - some dialects return NaN (DuckDB) while others return NULL (Snowflake).
95    # `null_on_zero_variance` is set to True at parse time for dialects that return NULL.
96    arg_types = {"this": True, "expression": True, "null_on_zero_variance": False}
arg_types = {'this': True, 'expression': True, 'null_on_zero_variance': False}
key: ClassVar[str] = 'corr'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
 99class Count(Expression, AggFunc):
100    arg_types = {"this": False, "expressions": False, "big_int": False}
101    is_var_len_args = True
arg_types = {'this': False, 'expressions': False, 'big_int': False}
is_var_len_args = True
key: ClassVar[str] = 'count'
required_args: 't.ClassVar[set[str]]' = set()
104class CountIf(Expression, AggFunc):
105    _sql_names = ["COUNT_IF", "COUNTIF"]
106    arg_types = {"this": True, "zero_on_all_null": False}
arg_types = {'this': True, 'zero_on_all_null': False}
key: ClassVar[str] = 'countif'
required_args: 't.ClassVar[set[str]]' = {'this'}
109class CovarPop(Expression, AggFunc):
110    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'covarpop'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
113class CovarSamp(Expression, AggFunc):
114    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'covarsamp'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
117class CumeDist(Expression, AggFunc):
118    arg_types = {"expressions": False}
119    is_var_len_args = True
arg_types = {'expressions': False}
is_var_len_args = True
key: ClassVar[str] = 'cumedist'
required_args: 't.ClassVar[set[str]]' = set()
122class DenseRank(Expression, AggFunc):
123    arg_types = {"expressions": False}
124    is_var_len_args = True
arg_types = {'expressions': False}
is_var_len_args = True
key: ClassVar[str] = 'denserank'
required_args: 't.ClassVar[set[str]]' = set()
127class First(Expression, AggFunc):
128    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'first'
required_args: 't.ClassVar[set[str]]' = {'this'}
131class FirstValue(Expression, AggFunc):
132    pass
key: ClassVar[str] = 'firstvalue'
required_args: 't.ClassVar[set[str]]' = {'this'}
135class GroupConcat(Expression, AggFunc):
136    arg_types = {"this": True, "separator": False, "on_overflow": False}
arg_types = {'this': True, 'separator': False, 'on_overflow': False}
key: ClassVar[str] = 'groupconcat'
required_args: 't.ClassVar[set[str]]' = {'this'}
139class Grouping(Expression, AggFunc):
140    arg_types = {"expressions": True}
141    is_var_len_args = True
arg_types = {'expressions': True}
is_var_len_args = True
key: ClassVar[str] = 'grouping'
required_args: 't.ClassVar[set[str]]' = {'expressions'}
144class GroupingId(Expression, AggFunc):
145    arg_types = {"expressions": False}
146    is_var_len_args = True
arg_types = {'expressions': False}
is_var_len_args = True
key: ClassVar[str] = 'groupingid'
required_args: 't.ClassVar[set[str]]' = set()
149class Kurtosis(Expression, AggFunc):
150    pass
key: ClassVar[str] = 'kurtosis'
required_args: 't.ClassVar[set[str]]' = {'this'}
153class Lag(Expression, AggFunc):
154    arg_types = {"this": True, "offset": False, "default": False}
arg_types = {'this': True, 'offset': False, 'default': False}
key: ClassVar[str] = 'lag'
required_args: 't.ClassVar[set[str]]' = {'this'}
157class Last(Expression, AggFunc):
158    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'last'
required_args: 't.ClassVar[set[str]]' = {'this'}
161class LastValue(Expression, AggFunc):
162    pass
key: ClassVar[str] = 'lastvalue'
required_args: 't.ClassVar[set[str]]' = {'this'}
165class Lead(Expression, AggFunc):
166    arg_types = {"this": True, "offset": False, "default": False}
arg_types = {'this': True, 'offset': False, 'default': False}
key: ClassVar[str] = 'lead'
required_args: 't.ClassVar[set[str]]' = {'this'}
169class LogicalAnd(Expression, AggFunc):
170    _sql_names = ["LOGICAL_AND", "BOOL_AND", "BOOLAND_AGG"]
key: ClassVar[str] = 'logicaland'
required_args: 't.ClassVar[set[str]]' = {'this'}
173class LogicalOr(Expression, AggFunc):
174    _sql_names = ["LOGICAL_OR", "BOOL_OR", "BOOLOR_AGG"]
key: ClassVar[str] = 'logicalor'
required_args: 't.ClassVar[set[str]]' = {'this'}
177class Max(Expression, AggFunc):
178    arg_types = {"this": True, "expressions": False}
179    is_var_len_args = True
arg_types = {'this': True, 'expressions': False}
is_var_len_args = True
key: ClassVar[str] = 'max'
required_args: 't.ClassVar[set[str]]' = {'this'}
182class Median(Expression, AggFunc):
183    pass
key: ClassVar[str] = 'median'
required_args: 't.ClassVar[set[str]]' = {'this'}
186class Min(Expression, AggFunc):
187    arg_types = {"this": True, "expressions": False}
188    is_var_len_args = True
arg_types = {'this': True, 'expressions': False}
is_var_len_args = True
key: ClassVar[str] = 'min'
required_args: 't.ClassVar[set[str]]' = {'this'}
191class Minhash(Expression, AggFunc):
192    arg_types = {"this": True, "expressions": True}
193    is_var_len_args = True
arg_types = {'this': True, 'expressions': True}
is_var_len_args = True
key: ClassVar[str] = 'minhash'
required_args: 't.ClassVar[set[str]]' = {'expressions', 'this'}
196class MinhashCombine(Expression, AggFunc):
197    pass
key: ClassVar[str] = 'minhashcombine'
required_args: 't.ClassVar[set[str]]' = {'this'}
200class Mode(Expression, AggFunc):
201    arg_types = {"this": False, "deterministic": False}
arg_types = {'this': False, 'deterministic': False}
key: ClassVar[str] = 'mode'
required_args: 't.ClassVar[set[str]]' = set()
204class Ntile(Expression, AggFunc):
205    arg_types = {"this": False}
arg_types = {'this': False}
key: ClassVar[str] = 'ntile'
required_args: 't.ClassVar[set[str]]' = set()
208class NthValue(Expression, AggFunc):
209    arg_types = {"this": True, "offset": True, "from_first": False}
arg_types = {'this': True, 'offset': True, 'from_first': False}
key: ClassVar[str] = 'nthvalue'
required_args: 't.ClassVar[set[str]]' = {'offset', 'this'}
212class ObjectAgg(Expression, AggFunc):
213    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'objectagg'
required_args: 't.ClassVar[set[str]]' = {'this'}
216class PercentileCont(Expression, AggFunc):
217    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'percentilecont'
required_args: 't.ClassVar[set[str]]' = {'this'}
220class PercentileDisc(Expression, AggFunc):
221    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'percentiledisc'
required_args: 't.ClassVar[set[str]]' = {'this'}
PERCENTILES = (<class 'PercentileCont'>, <class 'PercentileDisc'>)
227class PercentRank(Expression, AggFunc):
228    arg_types = {"expressions": False}
229    is_var_len_args = True
arg_types = {'expressions': False}
is_var_len_args = True
key: ClassVar[str] = 'percentrank'
required_args: 't.ClassVar[set[str]]' = set()
232class Quantile(Expression, AggFunc):
233    arg_types = {"this": True, "quantile": True}
arg_types = {'this': True, 'quantile': True}
key: ClassVar[str] = 'quantile'
required_args: 't.ClassVar[set[str]]' = {'quantile', 'this'}
class ApproxQuantile(Quantile):
236class ApproxQuantile(Quantile):
237    arg_types = {
238        "this": True,
239        "quantile": True,
240        "accuracy": False,
241        "weight": False,
242        "error_tolerance": False,
243    }
arg_types = {'this': True, 'quantile': True, 'accuracy': False, 'weight': False, 'error_tolerance': False}
key: ClassVar[str] = 'approxquantile'
required_args: 't.ClassVar[set[str]]' = {'quantile', 'this'}
246class Rank(Expression, AggFunc):
247    arg_types = {"expressions": False}
248    is_var_len_args = True
arg_types = {'expressions': False}
is_var_len_args = True
key: ClassVar[str] = 'rank'
required_args: 't.ClassVar[set[str]]' = set()
251class RegrAvgx(Expression, AggFunc):
252    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regravgx'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
255class RegrAvgy(Expression, AggFunc):
256    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regravgy'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
259class RegrCount(Expression, AggFunc):
260    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'regrcount'
required_args: 't.ClassVar[set[str]]' = {'this'}
263class RegrIntercept(Expression, AggFunc):
264    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'regrintercept'
required_args: 't.ClassVar[set[str]]' = {'this'}
267class RegrR2(Expression, AggFunc):
268    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'regrr2'
required_args: 't.ClassVar[set[str]]' = {'this'}
271class RegrSlope(Expression, AggFunc):
272    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'regrslope'
required_args: 't.ClassVar[set[str]]' = {'this'}
275class RegrSxx(Expression, AggFunc):
276    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regrsxx'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
279class RegrSxy(Expression, AggFunc):
280    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regrsxy'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
283class RegrSyy(Expression, AggFunc):
284    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regrsyy'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
287class RegrValx(Expression, AggFunc):
288    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regrvalx'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
291class RegrValy(Expression, AggFunc):
292    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regrvaly'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
295class RowNumber(Expression, Func):
296    arg_types = {"this": False}
arg_types = {'this': False}
key: ClassVar[str] = 'rownumber'
required_args: 't.ClassVar[set[str]]' = set()
299class Skewness(Expression, AggFunc):
300    pass
key: ClassVar[str] = 'skewness'
required_args: 't.ClassVar[set[str]]' = {'this'}
303class Stddev(Expression, AggFunc):
304    _sql_names = ["STDDEV", "STDEV"]
key: ClassVar[str] = 'stddev'
required_args: 't.ClassVar[set[str]]' = {'this'}
307class StddevPop(Expression, AggFunc):
308    pass
key: ClassVar[str] = 'stddevpop'
required_args: 't.ClassVar[set[str]]' = {'this'}
311class StddevSamp(Expression, AggFunc):
312    pass
key: ClassVar[str] = 'stddevsamp'
required_args: 't.ClassVar[set[str]]' = {'this'}
315class Sum(Expression, AggFunc):
316    pass
key: ClassVar[str] = 'sum'
required_args: 't.ClassVar[set[str]]' = {'this'}
319class Variance(Expression, AggFunc):
320    _sql_names = ["VARIANCE", "VARIANCE_SAMP", "VAR_SAMP"]
key: ClassVar[str] = 'variance'
required_args: 't.ClassVar[set[str]]' = {'this'}
323class VariancePop(Expression, AggFunc):
324    _sql_names = ["VARIANCE_POP", "VAR_POP"]
key: ClassVar[str] = 'variancepop'
required_args: 't.ClassVar[set[str]]' = {'this'}