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
106
107class CovarPop(Expression, AggFunc):
108    arg_types = {"this": True, "expression": True}
109
110
111class CovarSamp(Expression, AggFunc):
112    arg_types = {"this": True, "expression": True}
113
114
115class CumeDist(Expression, AggFunc):
116    arg_types = {"expressions": False}
117    is_var_len_args = True
118
119
120class DenseRank(Expression, AggFunc):
121    arg_types = {"expressions": False}
122    is_var_len_args = True
123
124
125class First(Expression, AggFunc):
126    arg_types = {"this": True, "expression": False}
127
128
129class FirstValue(Expression, AggFunc):
130    pass
131
132
133class GroupConcat(Expression, AggFunc):
134    arg_types = {"this": True, "separator": False, "on_overflow": False}
135
136
137class Grouping(Expression, AggFunc):
138    arg_types = {"expressions": True}
139    is_var_len_args = True
140
141
142class GroupingId(Expression, AggFunc):
143    arg_types = {"expressions": False}
144    is_var_len_args = True
145
146
147class Kurtosis(Expression, AggFunc):
148    pass
149
150
151class Lag(Expression, AggFunc):
152    arg_types = {"this": True, "offset": False, "default": False}
153
154
155class Last(Expression, AggFunc):
156    arg_types = {"this": True, "expression": False}
157
158
159class LastValue(Expression, AggFunc):
160    pass
161
162
163class Lead(Expression, AggFunc):
164    arg_types = {"this": True, "offset": False, "default": False}
165
166
167class LogicalAnd(Expression, AggFunc):
168    _sql_names = ["LOGICAL_AND", "BOOL_AND", "BOOLAND_AGG"]
169
170
171class LogicalOr(Expression, AggFunc):
172    _sql_names = ["LOGICAL_OR", "BOOL_OR", "BOOLOR_AGG"]
173
174
175class Max(Expression, AggFunc):
176    arg_types = {"this": True, "expressions": False}
177    is_var_len_args = True
178
179
180class Median(Expression, AggFunc):
181    pass
182
183
184class Min(Expression, AggFunc):
185    arg_types = {"this": True, "expressions": False}
186    is_var_len_args = True
187
188
189class Minhash(Expression, AggFunc):
190    arg_types = {"this": True, "expressions": True}
191    is_var_len_args = True
192
193
194class MinhashCombine(Expression, AggFunc):
195    pass
196
197
198class Mode(Expression, AggFunc):
199    arg_types = {"this": False, "deterministic": False}
200
201
202class Ntile(Expression, AggFunc):
203    arg_types = {"this": False}
204
205
206class NthValue(Expression, AggFunc):
207    arg_types = {"this": True, "offset": True, "from_first": False}
208
209
210class ObjectAgg(Expression, AggFunc):
211    arg_types = {"this": True, "expression": True}
212
213
214class PercentileCont(Expression, AggFunc):
215    arg_types = {"this": True, "expression": False}
216
217
218class PercentileDisc(Expression, AggFunc):
219    arg_types = {"this": True, "expression": False}
220
221
222PERCENTILES = (PercentileCont, PercentileDisc)
223
224
225class PercentRank(Expression, AggFunc):
226    arg_types = {"expressions": False}
227    is_var_len_args = True
228
229
230class Quantile(Expression, AggFunc):
231    arg_types = {"this": True, "quantile": True}
232
233
234class ApproxQuantile(Quantile):
235    arg_types = {
236        "this": True,
237        "quantile": True,
238        "accuracy": False,
239        "weight": False,
240        "error_tolerance": False,
241    }
242
243
244class Rank(Expression, AggFunc):
245    arg_types = {"expressions": False}
246    is_var_len_args = True
247
248
249class RegrAvgx(Expression, AggFunc):
250    arg_types = {"this": True, "expression": True}
251
252
253class RegrAvgy(Expression, AggFunc):
254    arg_types = {"this": True, "expression": True}
255
256
257class RegrCount(Expression, AggFunc):
258    arg_types = {"this": True, "expression": True}
259
260
261class RegrIntercept(Expression, AggFunc):
262    arg_types = {"this": True, "expression": True}
263
264
265class RegrR2(Expression, AggFunc):
266    arg_types = {"this": True, "expression": True}
267
268
269class RegrSlope(Expression, AggFunc):
270    arg_types = {"this": True, "expression": True}
271
272
273class RegrSxx(Expression, AggFunc):
274    arg_types = {"this": True, "expression": True}
275
276
277class RegrSxy(Expression, AggFunc):
278    arg_types = {"this": True, "expression": True}
279
280
281class RegrSyy(Expression, AggFunc):
282    arg_types = {"this": True, "expression": True}
283
284
285class RegrValx(Expression, AggFunc):
286    arg_types = {"this": True, "expression": True}
287
288
289class RegrValy(Expression, AggFunc):
290    arg_types = {"this": True, "expression": True}
291
292
293class RowNumber(Expression, Func):
294    arg_types = {"this": False}
295
296
297class Skewness(Expression, AggFunc):
298    pass
299
300
301class Stddev(Expression, AggFunc):
302    _sql_names = ["STDDEV", "STDEV"]
303
304
305class StddevPop(Expression, AggFunc):
306    pass
307
308
309class StddevSamp(Expression, AggFunc):
310    pass
311
312
313class Sum(Expression, AggFunc):
314    pass
315
316
317class Variance(Expression, AggFunc):
318    _sql_names = ["VARIANCE", "VARIANCE_SAMP", "VAR_SAMP"]
319
320
321class VariancePop(Expression, AggFunc):
322    _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]]' = {'count', 'expression', '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"]
key: ClassVar[str] = 'countif'
required_args: 't.ClassVar[set[str]]' = {'this'}
108class CovarPop(Expression, AggFunc):
109    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'covarpop'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
112class CovarSamp(Expression, AggFunc):
113    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'covarsamp'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
116class CumeDist(Expression, AggFunc):
117    arg_types = {"expressions": False}
118    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()
121class DenseRank(Expression, AggFunc):
122    arg_types = {"expressions": False}
123    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()
126class First(Expression, AggFunc):
127    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'first'
required_args: 't.ClassVar[set[str]]' = {'this'}
130class FirstValue(Expression, AggFunc):
131    pass
key: ClassVar[str] = 'firstvalue'
required_args: 't.ClassVar[set[str]]' = {'this'}
134class GroupConcat(Expression, AggFunc):
135    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'}
138class Grouping(Expression, AggFunc):
139    arg_types = {"expressions": True}
140    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'}
143class GroupingId(Expression, AggFunc):
144    arg_types = {"expressions": False}
145    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()
148class Kurtosis(Expression, AggFunc):
149    pass
key: ClassVar[str] = 'kurtosis'
required_args: 't.ClassVar[set[str]]' = {'this'}
152class Lag(Expression, AggFunc):
153    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'}
156class Last(Expression, AggFunc):
157    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'last'
required_args: 't.ClassVar[set[str]]' = {'this'}
160class LastValue(Expression, AggFunc):
161    pass
key: ClassVar[str] = 'lastvalue'
required_args: 't.ClassVar[set[str]]' = {'this'}
164class Lead(Expression, AggFunc):
165    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'}
168class LogicalAnd(Expression, AggFunc):
169    _sql_names = ["LOGICAL_AND", "BOOL_AND", "BOOLAND_AGG"]
key: ClassVar[str] = 'logicaland'
required_args: 't.ClassVar[set[str]]' = {'this'}
172class LogicalOr(Expression, AggFunc):
173    _sql_names = ["LOGICAL_OR", "BOOL_OR", "BOOLOR_AGG"]
key: ClassVar[str] = 'logicalor'
required_args: 't.ClassVar[set[str]]' = {'this'}
176class Max(Expression, AggFunc):
177    arg_types = {"this": True, "expressions": False}
178    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'}
181class Median(Expression, AggFunc):
182    pass
key: ClassVar[str] = 'median'
required_args: 't.ClassVar[set[str]]' = {'this'}
185class Min(Expression, AggFunc):
186    arg_types = {"this": True, "expressions": False}
187    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'}
190class Minhash(Expression, AggFunc):
191    arg_types = {"this": True, "expressions": True}
192    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'}
195class MinhashCombine(Expression, AggFunc):
196    pass
key: ClassVar[str] = 'minhashcombine'
required_args: 't.ClassVar[set[str]]' = {'this'}
199class Mode(Expression, AggFunc):
200    arg_types = {"this": False, "deterministic": False}
arg_types = {'this': False, 'deterministic': False}
key: ClassVar[str] = 'mode'
required_args: 't.ClassVar[set[str]]' = set()
203class Ntile(Expression, AggFunc):
204    arg_types = {"this": False}
arg_types = {'this': False}
key: ClassVar[str] = 'ntile'
required_args: 't.ClassVar[set[str]]' = set()
207class NthValue(Expression, AggFunc):
208    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'}
211class ObjectAgg(Expression, AggFunc):
212    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'objectagg'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
215class PercentileCont(Expression, AggFunc):
216    arg_types = {"this": True, "expression": False}
arg_types = {'this': True, 'expression': False}
key: ClassVar[str] = 'percentilecont'
required_args: 't.ClassVar[set[str]]' = {'this'}
219class PercentileDisc(Expression, AggFunc):
220    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'>)
226class PercentRank(Expression, AggFunc):
227    arg_types = {"expressions": False}
228    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()
231class Quantile(Expression, AggFunc):
232    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):
235class ApproxQuantile(Quantile):
236    arg_types = {
237        "this": True,
238        "quantile": True,
239        "accuracy": False,
240        "weight": False,
241        "error_tolerance": False,
242    }
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'}
245class Rank(Expression, AggFunc):
246    arg_types = {"expressions": False}
247    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()
250class RegrAvgx(Expression, AggFunc):
251    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regravgx'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
254class RegrAvgy(Expression, AggFunc):
255    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regravgy'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
258class RegrCount(Expression, AggFunc):
259    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regrcount'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
262class RegrIntercept(Expression, AggFunc):
263    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regrintercept'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
266class RegrR2(Expression, AggFunc):
267    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regrr2'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
270class RegrSlope(Expression, AggFunc):
271    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regrslope'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
274class RegrSxx(Expression, AggFunc):
275    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regrsxx'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
278class RegrSxy(Expression, AggFunc):
279    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regrsxy'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
282class RegrSyy(Expression, AggFunc):
283    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regrsyy'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
286class RegrValx(Expression, AggFunc):
287    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regrvalx'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
290class RegrValy(Expression, AggFunc):
291    arg_types = {"this": True, "expression": True}
arg_types = {'this': True, 'expression': True}
key: ClassVar[str] = 'regrvaly'
required_args: 't.ClassVar[set[str]]' = {'expression', 'this'}
294class RowNumber(Expression, Func):
295    arg_types = {"this": False}
arg_types = {'this': False}
key: ClassVar[str] = 'rownumber'
required_args: 't.ClassVar[set[str]]' = set()
298class Skewness(Expression, AggFunc):
299    pass
key: ClassVar[str] = 'skewness'
required_args: 't.ClassVar[set[str]]' = {'this'}
302class Stddev(Expression, AggFunc):
303    _sql_names = ["STDDEV", "STDEV"]
key: ClassVar[str] = 'stddev'
required_args: 't.ClassVar[set[str]]' = {'this'}
306class StddevPop(Expression, AggFunc):
307    pass
key: ClassVar[str] = 'stddevpop'
required_args: 't.ClassVar[set[str]]' = {'this'}
310class StddevSamp(Expression, AggFunc):
311    pass
key: ClassVar[str] = 'stddevsamp'
required_args: 't.ClassVar[set[str]]' = {'this'}
314class Sum(Expression, AggFunc):
315    pass
key: ClassVar[str] = 'sum'
required_args: 't.ClassVar[set[str]]' = {'this'}
318class Variance(Expression, AggFunc):
319    _sql_names = ["VARIANCE", "VARIANCE_SAMP", "VAR_SAMP"]
key: ClassVar[str] = 'variance'
required_args: 't.ClassVar[set[str]]' = {'this'}
322class VariancePop(Expression, AggFunc):
323    _sql_names = ["VARIANCE_POP", "VAR_POP"]
key: ClassVar[str] = 'variancepop'
required_args: 't.ClassVar[set[str]]' = {'this'}