hash-threshold 8

statement ok
CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER)

statement ok
CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER)

statement ok
CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER)

statement ok
INSERT INTO tab0 VALUES(83,0,38)

statement ok
INSERT INTO tab0 VALUES(26,0,79)

statement ok
INSERT INTO tab0 VALUES(43,81,24)

statement ok
INSERT INTO tab1 VALUES(22,6,8)

statement ok
INSERT INTO tab1 VALUES(28,57,45)

statement ok
INSERT INTO tab1 VALUES(82,44,71)

statement ok
INSERT INTO tab2 VALUES(15,61,87)

statement ok
INSERT INTO tab2 VALUES(91,59,79)

statement ok
INSERT INTO tab2 VALUES(92,41,58)

query I rowsort
SELECT ALL + col2 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1944
0
0

query I rowsort
SELECT ALL 94 FROM tab0 AS cor0 GROUP BY cor0.col1
----
94
94

query I rowsort
SELECT + cor0.col2 FROM tab0 cor0 CROSS JOIN tab2 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col1 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3483

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4
SELECT ALL + + CAST( NULL AS SIGNED ) * cor0.col0 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4
SELECT ALL + + CAST ( NULL AS INTEGER ) * cor0.col0 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - + 26 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-26
-26

query I rowsort
SELECT + 7 FROM tab2 cor0 GROUP BY col0, cor0.col1
----
7
7
7

query I rowsort
SELECT ALL + 88 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
88
88
88

query I rowsort
SELECT + 93 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
93
93
93

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ( - cor0.col2 ) AS col0 FROM tab0, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL 39 FROM tab0 AS cor0 GROUP BY cor0.col0
----
39
39
39

query I rowsort
SELECT DISTINCT col0 / col0 FROM tab1 AS cor0 GROUP BY col0 HAVING NOT ( - cor0.col0 ) = NULL
----

query I rowsort
SELECT tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col2 + + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT ALL col2 + ( + 56 ) FROM tab1 GROUP BY tab1.col2
----
101
127
64

query I rowsort
SELECT DISTINCT - tab0.col2 + 62 AS col2 FROM tab0 GROUP BY col2
----
-17
24
38

query I rowsort
SELECT ALL 46 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT cor0.col0 * - 44 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4004
-4048
-660

query I rowsort
SELECT ALL col0 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT + - cor0.col2 + - cor0.col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-158
-48
-76

query I rowsort
SELECT 77 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
77
77
77

query I rowsort
SELECT DISTINCT - 18 FROM tab2 cor0 GROUP BY cor0.col2
----
-18

query I rowsort
SELECT ALL + ( + 69 ) FROM tab0 AS cor0 GROUP BY col1
----
69
69

query I rowsort
SELECT ALL 93 FROM tab2 AS cor0 GROUP BY cor0.col1
----
93
93
93

query I rowsort
SELECT + col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col1 + 52 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
133
52

query I rowsort
SELECT DISTINCT 86 * - 30 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2580

query I rowsort
SELECT DISTINCT 39 FROM tab2 AS cor0 GROUP BY cor0.col2
----
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 70 col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-70

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 84 col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-84

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-32
SELECT ALL - cor0.col2 * CAST( NULL AS SIGNED ) + + 78 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-32
SELECT ALL - cor0.col2 * CAST ( NULL AS INTEGER ) + + 78 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 95 + 53 AS col1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
148
148

query I rowsort
SELECT DISTINCT col1 + - 15 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-15
66

query I rowsort
SELECT - 69 * cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-1656
-2622
-5451

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-36
SELECT - ( + cor0.col1 * CAST( NULL AS DECIMAL ) ) + + 69 * col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-36
SELECT - ( + cor0.col1 * CAST ( NULL AS REAL ) ) + + 69 * col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col0 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
153
30
73

query I rowsort
SELECT - 3 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-3
-3
-3

query I rowsort
SELECT ALL + cor1.col0 FROM tab2, tab2 AS cor0, tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT + 85 * + tab0.col1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
0
6885

query I rowsort
SELECT ALL col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 96 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 43 * + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1935
-3053
-344

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-48
SELECT ALL - + CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-48
SELECT ALL - + CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT - 53 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-25
-31
29

query I rowsort
SELECT DISTINCT - cor0.col0 * - col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT 27 * col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2187

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

query I rowsort
SELECT + 26 * + cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
1118
2158
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col0 * 88 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
42592
591712
68992

query I rowsort
SELECT 46 * + 13 FROM tab0 AS cor0 GROUP BY cor0.col0
----
598
598
598

query I rowsort
SELECT ALL + cor0.col1 * 49 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2009
2891
2989

onlyif mysql # DIV for integer division: 
query I rowsort label-58
SELECT - 49 DIV cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-58
SELECT - 49 / cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

query I rowsort
SELECT ALL 81 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT - col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + - cor0.col1 * 36 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
-1584
-2052
-216

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-62
SELECT - CAST( NULL AS SIGNED ) * - 66 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-62
SELECT - CAST ( NULL AS INTEGER ) * - 66 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col2 * - 36 * - 21 FROM tab2 AS cor0 GROUP BY cor0.col2
----
43848
59724
65772

onlyif mysql # DIV for integer division: 
query I rowsort label-64
SELECT DISTINCT cor0.col2 + cor0.col1 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

skipif mysql # not compatible
query I rowsort label-64
SELECT DISTINCT cor0.col2 + cor0.col1 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT - cor0.col2 * ( 69 ) AS col2 FROM tab2 AS cor0 GROUP BY col2
----
-4002
-5451
-6003

query I rowsort
SELECT DISTINCT + 49 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
49

query I rowsort
SELECT 92 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
92
92
92

query I rowsort
SELECT + - 4 AS col2 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
-4
-4
-4

query I rowsort
SELECT ALL - cor0.col2 * + 91 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-5278
-7189
-7917

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT - cor1.col2 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT ALL - 0 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-75
SELECT ALL cor0.col1 DIV - cor0.col1 + cor0.col1 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
43
5
56

skipif mysql # not compatible
query I rowsort label-75
SELECT ALL cor0.col1 / - cor0.col1 + cor0.col1 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
43
5
56

query I rowsort
SELECT DISTINCT - 0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT DISTINCT + cor0.col0 * 36 + 42 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
1050
2994
834

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
22
28
82

query I rowsort
SELECT 52 FROM tab0 cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT DISTINCT tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT + ( - cor0.col2 + cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT 82 FROM tab2 cor0 GROUP BY cor0.col1
----
82
82
82

query I rowsort
SELECT DISTINCT - cor0.col0 + - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
-133
-150
-76

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
45
71
8

query I rowsort
SELECT + 33 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
33
33
33

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-87
SELECT + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-87
SELECT + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 74 * - 47 FROM tab0, tab2 AS cor0, tab1 AS cor1 GROUP BY tab0.col0
----
-3478

query I rowsort
SELECT DISTINCT 75 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 86 - - 47 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
133
133
133

query I rowsort
SELECT ALL ( + 0 ) + + cor0.col1 + - cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-3323
-6182
-7508

query I rowsort
SELECT - 77 + 6 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-71
-71
-71

query I rowsort
SELECT - tab1.col2 * + tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT 42 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
42

query I rowsort
SELECT DISTINCT + cor0.col0 + col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
133
150
76

query I rowsort
SELECT DISTINCT + cor0.col0 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT ALL cor0.col0 * 21 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1911
1932
315

query I rowsort
SELECT + col2 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
1260
176
5822

query I rowsort
SELECT DISTINCT + + cor0.col0 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT 19 * - cor0.col0 FROM tab2, tab1 cor0 GROUP BY cor0.col0
----
-1558
-418
-532

query I rowsort
SELECT 49 AS col1 FROM tab1, tab1 cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT ALL 85 FROM tab0 GROUP BY tab0.col1
----
85
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL 65 FROM tab0 AS cor0 GROUP BY cor0.col0
----
65
65
65

query I rowsort
SELECT - 62 AS col2 FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
-62
-62
-62

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT 29 AS col1 FROM tab1 GROUP BY tab1.col1
----
29
29
29

query I rowsort
SELECT ALL - tab1.col1 + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT DISTINCT col1 * - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT + 12 FROM tab0 cor0 GROUP BY cor0.col0
----
12

query I rowsort
SELECT DISTINCT + - cor0.col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT 54 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
54

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-116
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-116
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-117
SELECT DISTINCT CAST( NULL AS SIGNED ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-117
SELECT DISTINCT CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT + 27 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
35
72
98

query I rowsort
SELECT cor0.col2 + + 96 * - 27 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-2513
-2554
-2568

query I rowsort
SELECT + cor0.col1 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
24
38
79

query I rowsort
SELECT col2 + - ( - cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT + col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 64 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
64

onlyif mysql # DIV for integer division: 
query I rowsort label-125
SELECT ALL cor0.col2 DIV + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-125
SELECT ALL cor0.col2 / + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT 97 FROM tab0 AS cor0 GROUP BY col0
----
97
97
97

query I rowsort
SELECT ALL - col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT ( + 14 * + cor0.col2 ) + 44 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
1038
156
674

query I rowsort
SELECT DISTINCT 79 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
79

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col1 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT - col0 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-135
SELECT DISTINCT + + CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-135
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT DISTINCT + 68 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * 61 col2 FROM tab0 AS cor0 GROUP BY col1
----
0
4941

query I rowsort
SELECT ALL + cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-139
SELECT ALL - - CAST( NULL AS SIGNED ) FROM tab1, tab1 cor0, tab2 AS cor1 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-139
SELECT ALL - - CAST ( NULL AS INTEGER ) FROM tab1, tab1 cor0, tab2 AS cor1 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col2 + - cor0.col2 col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + - cor0.col2 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + 16 * 81 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
1296

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 84 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
84

query I rowsort
SELECT ALL - 70 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-70
-70
-70

query I rowsort
SELECT 77 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
77
77
77

query I rowsort
SELECT DISTINCT 49 AS col0 FROM tab2, tab2 cor0 GROUP BY tab2.col1
----
49

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-148
SELECT ALL - CAST( 95 AS SIGNED ) FROM tab2, tab1 cor0 GROUP BY tab2.col0
----
-95
-95
-95

skipif mysql # not compatible
query I rowsort label-148
SELECT ALL - CAST ( 95 AS INTEGER ) FROM tab2, tab1 cor0 GROUP BY tab2.col0
----
-95
-95
-95

query I rowsort
SELECT ALL + 58 AS col0 FROM tab1, tab1 cor0 GROUP BY cor0.col2
----
58
58
58

query I rowsort
SELECT + 21 * + cor0.col1 AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
1197
126
924

query I rowsort
SELECT - 77 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1155
-7007
-7084

query I rowsort
SELECT 66 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + 7 - cor0.col2 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-2018
-5034
-57

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - col1 * col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
45
71
8

query I rowsort
SELECT + - cor0.col2 FROM tab1, tab1 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + 91 FROM tab2 AS cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT cor0.col2 - + ( - cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-162
SELECT DISTINCT CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-162
SELECT DISTINCT CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL - cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col0 + - col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-46
32
51

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-168
SELECT DISTINCT - CAST( 9 AS SIGNED ) * - cor0.col2 * ( + cor0.col0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
11745
48024
64701

skipif mysql # not compatible
query I rowsort label-168
SELECT DISTINCT - CAST ( 9 AS INTEGER ) * - cor0.col2 * ( + cor0.col0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
11745
48024
64701

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
24
38
79

query I rowsort
SELECT ALL - ( - cor0.col1 ) FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT - tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL cor0.col2 + col0 + - cor0.col0 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1187
-146
-5669

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6642

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 81 * cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1782
2268
6642

onlyif mysql # DIV for integer division: 
query I rowsort label-175
SELECT + tab2.col1 DIV tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-175
SELECT + tab2.col1 / tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT ALL 72 * + cor0.col0 + 71 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
1943
3167
6047

query I rowsort
SELECT DISTINCT 81 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
81

query I rowsort
SELECT DISTINCT + 10 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 34 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-34

query I rowsort
SELECT DISTINCT - 49 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
-49

onlyif mysql # DIV for integer division: 
query I rowsort label-181
SELECT ALL cor1.col2 + cor1.col2 DIV 26 AS col2 FROM tab1 cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
60
82
90

skipif mysql # not compatible
query I rowsort label-181
SELECT ALL cor1.col2 + cor1.col2 / 26 AS col2 FROM tab1 cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
60
82
90

query I rowsort
SELECT + 85 FROM tab2 AS cor0 GROUP BY cor0.col2
----
85
85
85

query I rowsort
SELECT + 86 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
86
86
86

query I rowsort
SELECT 95 FROM tab1 GROUP BY tab1.col0
----
95
95
95

query I rowsort
SELECT ALL + col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-186
SELECT + cor0.col1 DIV - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-186
SELECT + cor0.col1 / - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
44
57
6

query I rowsort
SELECT 2 FROM tab1 AS cor0 GROUP BY col1
----
2
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - cor0.col1 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT - col2 FROM tab0 GROUP BY tab0.col2 HAVING NULL >= NULL
----

query I rowsort
SELECT - - cor0.col1 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col2 * 88 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
3960
6248
704

query I rowsort
SELECT DISTINCT + - cor0.col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL 69 FROM tab0 AS cor0 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT ALL cor0.col0 + col0 FROM tab2 cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT 71 AS col2 FROM tab0, tab1 cor0 GROUP BY tab0.col1
----
71
71

query I rowsort
SELECT ALL 52 FROM tab1 GROUP BY tab1.col0
----
52
52
52

query I rowsort
SELECT DISTINCT - 24 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-24

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 67 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-67
-67
-67

query I rowsort
SELECT ALL 7 FROM tab2 AS cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT + ( - cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + 68 ) + + cor0.col2 - + cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
68

query I rowsort
SELECT - cor0.col1 * col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT 10 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
10
10
10

query I rowsort
SELECT + 40 + cor0.col0 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
116
173
190

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL cor0.col2 + ( - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col2 * 62 AS col2 FROM tab0, tab2 AS cor0, tab1 cor1 GROUP BY cor0.col2
----
3596
4898
5394

query I rowsort
SELECT + 51 * + 50 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2550
2550
2550

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-214
SELECT DISTINCT CAST( NULL AS SIGNED ) * + 47 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-214
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + 47 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT + ( 8 ) AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
8
8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor1.col1 col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT DISTINCT ( 78 ) * cor0.col1 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
3432
4446
468

query I rowsort
SELECT - 23 + col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
5
59

query I rowsort
SELECT + 56 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
56
56
56

query I rowsort
SELECT cor0.col0 + + cor0.col0 * - col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1232
-154
-5740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 35 col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-35
-35
-35

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-222
SELECT - CAST( NULL AS SIGNED ) col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-222
SELECT - CAST ( NULL AS INTEGER ) col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-223
SELECT DISTINCT cor0.col2 * - cor0.col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

skipif mysql # not compatible
query I rowsort label-223
SELECT DISTINCT cor0.col2 * - cor0.col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-224
SELECT + - CAST( + 2 AS SIGNED ) AS col2 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-224
SELECT + - CAST ( + 2 AS INTEGER ) AS col2 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
-2
-2
-2

onlyif mysql # DIV for integer division: 
query I rowsort label-225
SELECT - cor0.col1 * cor0.col0 DIV cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-81
0
0

skipif mysql # not compatible
query I rowsort label-225
SELECT - cor0.col1 * cor0.col0 / cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-81
0
0

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL ( 65 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT ALL - cor0.col1 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-118
-122
-82

query I rowsort
SELECT ALL ( 25 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT DISTINCT + 37 FROM tab0 AS cor0 GROUP BY cor0.col0
----
37

query I rowsort
SELECT ALL + 99 * - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-4356
-5643
-594

query I rowsort
SELECT ALL 75 FROM tab1 AS cor0 GROUP BY cor0.col0
----
75
75
75

query I rowsort
SELECT DISTINCT - 16 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
-16

query I rowsort
SELECT ALL - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT cor0.col0 - - cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-462
-6642
-756

query I rowsort
SELECT DISTINCT - 83 FROM tab1 AS cor0 GROUP BY col0
----
-83

query I rowsort
SELECT - 66 FROM tab2 cor0 GROUP BY cor0.col2
----
-66
-66
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT 52 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
52
52
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT cor0.col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2, tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT 15 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT - ( + 14 ) FROM tab1, tab1 cor0, tab2 AS cor1 GROUP BY cor0.col2
----
-14
-14
-14

query I rowsort
SELECT + 29 AS col2 FROM tab2 GROUP BY tab2.col0
----
29
29
29

query I rowsort
SELECT - 62 FROM tab0 GROUP BY tab0.col1
----
-62
-62

query I rowsort
SELECT DISTINCT col2 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT DISTINCT + col2 + cor0.col2 FROM tab2 cor0 GROUP BY col2
----
116
158
174

query I rowsort
SELECT DISTINCT 37 FROM tab2 AS cor0 GROUP BY cor0.col0
----
37

query I rowsort
SELECT - 71 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-71
-71
-71

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ( + 83 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
83
83
83

query I rowsort
SELECT ALL 72 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
72
72
72

query I rowsort
SELECT ALL - + 79 + - col0 AS col2 FROM tab1 GROUP BY col0
----
-101
-107
-161

query I rowsort
SELECT + col1 + - cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1722
3540
3782

query I rowsort
SELECT ALL + 33 AS col0 FROM tab1, tab0 cor0 GROUP BY cor0.col1
----
33
33

query I rowsort
SELECT 67 * cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-129712
-217683
-2412

query I rowsort
SELECT cor0.col2 + - col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 39 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
39

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT ALL - col1 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1936
3249
36

query I rowsort
SELECT col1 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1936
3249
36

query I rowsort
SELECT + 97 AS col2 FROM tab2, tab1 cor0, tab2 AS cor1 GROUP BY cor1.col2
----
97
97
97

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-265
SELECT CAST( - cor0.col1 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

skipif mysql # not compatible
query I rowsort label-265
SELECT CAST ( - cor0.col1 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL col2 * + tab0.col2 + 67 FROM tab0 GROUP BY tab0.col2
----
1511
6308
643

query I rowsort
SELECT DISTINCT - col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col1 * ( + 54 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2214
3186
3294

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT 79 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT - 49 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-49
-49
-49

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-275
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-275
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT 54 FROM tab2 cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT ALL 5 FROM tab0 AS cor0 GROUP BY cor0.col2
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 - cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-182
-184
-30

query I rowsort
SELECT DISTINCT cor0.col0 + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT + 52 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
52

query I rowsort
SELECT ALL - col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL 63 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
154
155
78

query I rowsort
SELECT col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT - tab2.col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 95 col2 FROM tab2, tab2 AS cor0, tab0 AS cor1 GROUP BY cor1.col1
----
95
95

query I rowsort
SELECT DISTINCT + col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT - cor0.col1 + 14 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-67
14

query I rowsort
SELECT ALL 61 FROM tab1 AS cor0 GROUP BY cor0.col1
----
61
61
61

query I rowsort
SELECT + 75 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
75
75
75

query I rowsort
SELECT ALL - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + - 58 FROM tab0, tab0 cor0, tab0 AS cor1 GROUP BY cor0.col1
----
-58
-58

query I rowsort
SELECT DISTINCT - cor0.col0 + + ( - ( + cor0.col0 ) + - cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-273
-276
-45

query I rowsort
SELECT 33 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
33
33
33

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT - ( + ( - cor0.col1 ) * - 67 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2747
-3953
-4087

query I rowsort
SELECT ALL 30 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
30
30
30

query I rowsort
SELECT - cor0.col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + 67 - 80 AS col1 FROM tab2 GROUP BY tab2.col1
----
-13

query I rowsort
SELECT ALL cor0.col0 FROM tab2, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-302
SELECT ALL 47 DIV 29 FROM tab2, tab1 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-302
SELECT ALL 47 / 29 FROM tab2, tab1 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT + 61 FROM tab2 AS cor0 GROUP BY cor0.col2
----
61

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - 12 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-12

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-306
SELECT ALL tab2.col1 * - CAST( NULL AS DECIMAL ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-306
SELECT ALL tab2.col1 * - CAST ( NULL AS REAL ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 10 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor0.col0
----
10

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 60 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2700
4260
480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 13 + + col0 col0 FROM tab0 AS cor0 GROUP BY col0
----
13
30
70

query I rowsort
SELECT ALL 85 * col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
2210
3655
7055

query I rowsort
SELECT ALL + ( cor0.col1 ) * cor0.col0 + - ( col0 ) FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
110
1568
3526

query I rowsort
SELECT DISTINCT - 71 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-71

query I rowsort
SELECT - ( cor1.col0 ) FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0, cor0.col2
----
9 values hashing to f32c20d5ee6a5d0dbf41b03dd82c0edd

query I rowsort
SELECT - + 51 * + 90 AS col1 FROM tab2, tab1 AS cor0 GROUP BY tab2.col0
----
-4590
-4590
-4590

query I rowsort
SELECT DISTINCT cor0.col1 * 31 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1271
1829
1891

query I rowsort
SELECT ALL + + col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col1 * 86 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-324392
-461734
-78690

onlyif mysql # DIV for integer division: 
query I rowsort label-320
SELECT ALL cor0.col2 DIV - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-320
SELECT ALL cor0.col2 / - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT ALL 87 FROM tab0 AS cor0 GROUP BY cor0.col1
----
87
87

query I rowsort
SELECT ALL cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - col2 col0 FROM tab1 AS cor0 GROUP BY col2, col1
----
-2
-27
12

query I rowsort
SELECT DISTINCT - - cor0.col1 FROM tab0, tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + 60 FROM tab0 AS cor0 GROUP BY cor0.col0
----
60
60
60

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-326
SELECT - CAST( cor0.col0 AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

skipif mysql # not compatible
query I rowsort label-326
SELECT - CAST ( cor0.col0 AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT cor0.col2 + 57 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
102
128
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - cor0.col1 - - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1640
-3422
-3660

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
484
6724
784

query I rowsort
SELECT DISTINCT 97 * + 37 + + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
3613
3627
3668

query I rowsort
SELECT ALL - col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col2 - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL - col0 * cor0.col0 + - cor0.col0 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-16562
-16928
-450

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-334
SELECT ALL + CAST( NULL AS SIGNED ) * 96 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-334
SELECT ALL + CAST ( NULL AS INTEGER ) * 96 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + tab0.col2 * + 83 FROM tab0 GROUP BY col2
----
1992
3154
6557

query I rowsort
SELECT + 38 FROM tab2 GROUP BY tab2.col1
----
38
38
38

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ALL cor0.col1 + - 25 + - cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
-25
-25

query I rowsort
SELECT 84 FROM tab2 cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT - tab1.col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-341
SELECT cor0.col2 DIV + cor0.col2 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-341
SELECT cor0.col2 / + cor0.col2 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
-17
11
14

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

onlyif mysql # DIV for integer division: 
query I rowsort label-344
SELECT DISTINCT + 27 DIV cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-344
SELECT DISTINCT + 27 / cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
0
1

query I rowsort
SELECT ALL - 52 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor0.col1
----
-52
-52

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - ( 69 ) - cor0.col0 FROM tab2 cor0 GROUP BY col0
----
-160
-161
-84

query I rowsort
SELECT DISTINCT + cor0.col2 - + 51 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-43
-6
20

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 72 + + 43 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
115
115
115

query I rowsort
SELECT ALL 67 * + 29 FROM tab1 cor0 GROUP BY cor0.col0
----
1943
1943
1943

query I rowsort
SELECT 10 FROM tab1 cor0 GROUP BY cor0.col1
----
10
10
10

query I rowsort
SELECT + 45 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
45
45

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT + 29 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
29
29
29

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-357
SELECT CAST( NULL AS SIGNED ) FROM tab1, tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-357
SELECT CAST ( NULL AS INTEGER ) FROM tab1, tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT 6 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT ALL - 81 * cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-4698
-6399
-7047

query I rowsort
SELECT DISTINCT 90 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
90

query I rowsort
SELECT - cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-1444
-576
-6241

query I rowsort
SELECT ( + cor0.col0 ) * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT 39 FROM tab2 AS cor0 GROUP BY cor0.col1
----
39
39
39

query I rowsort
SELECT + - 90 AS col0 FROM tab0 GROUP BY tab0.col0
----
-90
-90
-90

query I rowsort
SELECT - 57 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
-57
-57
-57

query I rowsort
SELECT 55 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT 11 FROM tab1 cor0 GROUP BY cor0.col0
----
11
11
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col2 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 37 col2 FROM tab1 GROUP BY tab1.col1
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 86 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
86
86
86

query I rowsort
SELECT ALL - + cor0.col0 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + cor0.col2 + 95 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
119
133
174

query I rowsort
SELECT cor0.col0 * - ( cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-375
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-375
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 * 87 FROM tab0 cor0 GROUP BY cor0.col1
----
0
7047

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-6518
26
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 78 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
78

query I rowsort
SELECT + + 78 FROM tab0 GROUP BY col0
----
78
78
78

query I rowsort
SELECT 32 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
32
32
32

onlyif mysql # DIV for integer division: 
query I rowsort label-382
SELECT cor0.col0 DIV 50 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-382
SELECT cor0.col0 / 50 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
0
0
1

query I rowsort
SELECT DISTINCT - + 74 AS col0 FROM tab2 GROUP BY col0
----
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 59 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
59

query I rowsort
SELECT ALL 22 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
22
22
22

query I rowsort
SELECT 77 + 38 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
115
115
115

query I rowsort
SELECT DISTINCT - 58 + + cor0.col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
0
21
29

query I rowsort
SELECT ALL - + cor0.col2 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query III rowsort
SELECT ALL * FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col1 * + 24 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
1416
1464
984

query I rowsort
SELECT 45 FROM tab0 cor0 GROUP BY col2
----
45
45
45

query I rowsort
SELECT 38 * + 18 FROM tab1 cor0 GROUP BY col2
----
684
684
684

onlyif mysql # DIV for integer division: 
query I rowsort label-394
SELECT ALL + 63 DIV + col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
10

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-394
SELECT ALL + 63 / + col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL 2 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL - 0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
0
0
0

query I rowsort
SELECT - cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 + + 10 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
51
69
71

query I rowsort
SELECT ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT - cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, col1
----
1936
3249
36

query I rowsort
SELECT + 90 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
90
90

query I rowsort
SELECT DISTINCT tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT 28 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
28
28
28

query I rowsort
SELECT 38 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
38
38
38

query I rowsort
SELECT + cor0.col2 * cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
3364
6241
7569

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-408
SELECT DISTINCT CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-408
SELECT DISTINCT CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-409
SELECT ALL - 66 DIV + col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-409
SELECT ALL - 66 / + col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-1
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-411
SELECT + 27 DIV 59 FROM tab1 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-411
SELECT + 27 / 59 FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT - 87 FROM tab1 GROUP BY col2
----
-87
-87
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 41 col2 FROM tab0 GROUP BY col1
----
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - 15 ) col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-15

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
124
26
83

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - 8 * 20 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-160
-160
-160

onlyif mysql # DIV for integer division: 
query I rowsort label-418
SELECT ALL cor0.col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-418
SELECT ALL cor0.col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT + col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col1 * + col1 * - cor0.col1 + 99 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-531342
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - ( + cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - 53 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-53
-53
-53

query I rowsort
SELECT col2 * ( - 76 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4408
-6004
-6612

query I rowsort
SELECT + cor0.col1 + 55 * 39 AS col2 FROM tab2 cor0 GROUP BY col1
----
2186
2204
2206

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
58
79
87

query I rowsort
SELECT + cor0.col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT ALL + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL 84 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT ALL 87 FROM tab2 AS cor0 GROUP BY cor0.col1
----
87
87
87

query I rowsort
SELECT DISTINCT col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT + 29 FROM tab0 AS cor0 GROUP BY cor0.col2
----
29
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 27 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 83 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-83

query I rowsort
SELECT DISTINCT + 91 FROM tab1 AS cor0 GROUP BY cor0.col1
----
91

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-437
SELECT cor0.col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-437
SELECT cor0.col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ALL - + cor0.col1 FROM tab1, tab0 AS cor0, tab2 cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL cor0.col1 * cor0.col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
2565
3124
48

query I rowsort
SELECT + 77 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
77
77
77

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT 43 + - 79 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-36
-36

query I rowsort
SELECT - col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-444
SELECT DISTINCT + cor0.col2 DIV + 31 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
46
73
8

skipif mysql # not compatible
query I rowsort label-444
SELECT DISTINCT + cor0.col2 / + 31 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
46
73
8

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT DISTINCT 13 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
13

query I rowsort
SELECT - 64 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5184

query I rowsort
SELECT ( - 35 ) * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1505
-2905
-910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 + cor0.col2 * cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
1444
6241
7137

query I rowsort
SELECT ALL - 7 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-7
-7
-7

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - cor0.col0 + - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-164
-44
-56

query I rowsort
SELECT DISTINCT + 22 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
22

query I rowsort
SELECT DISTINCT - cor0.col0 + + col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-456
SELECT + tab2.col1 + + CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-456
SELECT + tab2.col1 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( - cor0.col1 ) + - cor0.col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-114
-12
-88

query I rowsort
SELECT ALL 97 FROM tab1 AS cor0 GROUP BY cor0.col1
----
97
97
97

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-459
SELECT + CAST( 0 AS SIGNED ) * - cor0.col1 FROM tab2, tab0 AS cor0, tab1 cor1 GROUP BY cor0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-459
SELECT + CAST ( 0 AS INTEGER ) * - cor0.col1 FROM tab2, tab0 AS cor0, tab1 cor1 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL col0 * 55 - + ( + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
4914
4968
810

query I rowsort
SELECT + cor0.col2 * 66 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
3828
5214
5742

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT cor0.col2 - 82 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-3
-44
-58

query I rowsort
SELECT ALL 33 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1419
2739
858

query I rowsort
SELECT + col2 * - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL cor0.col2 + 95 FROM tab2 cor0 GROUP BY cor0.col2
----
153
174
182

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 + 28 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2053
5069
92

query I rowsort
SELECT 42 FROM tab1 AS cor0 GROUP BY cor0.col1
----
42
42
42

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT 55 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2475
3905
440

query I rowsort
SELECT + 63 FROM tab2 AS cor0 GROUP BY cor0.col0
----
63
63
63

query I rowsort
SELECT DISTINCT + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - 15 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-15
-15
-15

onlyif mysql # DIV for integer division: 
query I rowsort label-476
SELECT col1 DIV cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-476
SELECT col1 / cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
0
0
0

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
26
43
83

query I rowsort
SELECT DISTINCT - + 19 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-19

query I rowsort
SELECT ALL - cor0.col0 * - 21 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
1722
462
588

query I rowsort
SELECT ALL - - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + 95 * - 77 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
-7315

query I rowsort
SELECT ALL + 20 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
20
20
20

query I rowsort
SELECT col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 5 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
5

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 93 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-93

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-488
SELECT - + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-488
SELECT - + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 72 col1 FROM tab2 cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT ALL 74 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
74
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( cor0.col0 + - cor0.col0 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col2 + + 14 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-31
-57
6

query I rowsort
SELECT + cor0.col2 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
102
150
170

onlyif mysql # DIV for integer division: 
query I rowsort label-494
SELECT DISTINCT + 73 + + cor0.col1 DIV 58 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
73
74

skipif mysql # not compatible
query I rowsort label-494
SELECT DISTINCT + 73 + + cor0.col1 / 58 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
73
74

query I rowsort
SELECT ALL 82 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT + 59 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
59
59
59

query I rowsort
SELECT - 80 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-80
-80
-80

query I rowsort
SELECT ALL + tab0.col1 * tab0.col1 + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6642

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 18 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-18

query I rowsort
SELECT 27 FROM tab1 AS cor0 GROUP BY cor0.col0
----
27
27
27

query I rowsort
SELECT + 74 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
74
74
74

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-503
SELECT CAST( - 47 AS SIGNED ) * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3807
0

skipif mysql # not compatible
query I rowsort label-503
SELECT CAST ( - 47 AS INTEGER ) * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3807
0

query I rowsort
SELECT ALL cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT + 27 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
2187

query I rowsort
SELECT DISTINCT + 10 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
10

query I rowsort
SELECT 12 AS col1 FROM tab1 GROUP BY tab1.col1
----
12
12
12

query I rowsort
SELECT DISTINCT - 31 * col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1178
-2449
-744

query I rowsort
SELECT - cor0.col1 * cor0.col1 * col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-531441
0

query I rowsort
SELECT + 87 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
87
87
87

query I rowsort
SELECT DISTINCT cor1.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT + 56 * - tab0.col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
-1456
-2408
-4648

query I rowsort
SELECT - 17 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-17
-17
-17

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 * - 21 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-131061
-158949
-70644

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - - tab0.col1 * - 27 AS col1 FROM tab0 GROUP BY col1
----
-2187
0

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT ALL - tab0.col2 + + col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT + col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - - 83 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
83

query I rowsort
SELECT ALL 22 + + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
113
114
37

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-527
SELECT 87 * - cor0.col1 + cor0.col1 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY col2, col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-527
SELECT 87 * - cor0.col1 + cor0.col1 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY col2, col1
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-528
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-528
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( cor0.col2 + col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-142
-16
-90

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT + cor0.col0 * cor0.col0 + 82 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
676
6889
8491

query I rowsort
SELECT ALL + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab0, tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + 49 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT DISTINCT 95 FROM tab0 AS cor0 GROUP BY cor0.col0
----
95

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 93 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
93

query I rowsort
SELECT ALL 92 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
92
92
92

query I rowsort
SELECT ALL + 5 FROM tab1 cor0 GROUP BY cor0.col1
----
5
5
5

query I rowsort
SELECT 46 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
46
46
46

onlyif mysql # DIV for integer division: 
query I rowsort label-541
SELECT + cor0.col1 DIV + cor0.col1 - 54 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-53
-53
-53

skipif mysql # not compatible
query I rowsort label-541
SELECT + cor0.col1 / + cor0.col1 - 54 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-53
-53
-53

query I rowsort
SELECT + - 2 + cor0.col2 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
43
6
69

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY col1, col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col1 + + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-550
SELECT - col2 DIV cor0.col2 + 67 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
66
66
66

skipif mysql # not compatible
query I rowsort label-550
SELECT - col2 / cor0.col2 + 67 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
66
66
66

query I rowsort
SELECT ALL - cor0.col0 * + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-1305
-5336
-7189

query I rowsort
SELECT ALL cor0.col0 * 58 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
5278
5336
870

query I rowsort
SELECT ALL - 33 + - col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-115
-55
-61

query I rowsort
SELECT col0 AS col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 44 col1 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT + 83 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
83
83
83

query I rowsort
SELECT + ( + 63 ) * cor0.col2 - 34 * col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1305
2059
232

query I rowsort
SELECT - col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
81

query I rowsort
SELECT DISTINCT 57 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
57

query I rowsort
SELECT - 68 FROM tab2, tab2 AS cor0, tab1 AS cor1 GROUP BY cor1.col1
----
-68
-68
-68

query I rowsort
SELECT DISTINCT 86 FROM tab0 cor0 GROUP BY col0, cor0.col1
----
86

query I rowsort
SELECT 3 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
3
3
3

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + + col1 + - col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL + col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL ( - 60 ) * cor0.col0 * 62 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-338520
-342240
-55800

query I rowsort
SELECT DISTINCT - 15 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
13
67
7

query I rowsort
SELECT DISTINCT + 77 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
77

query I rowsort
SELECT ( + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NULL > cor0.col0
----

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-572
SELECT DISTINCT - CAST( NULL AS SIGNED ) col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-572
SELECT DISTINCT - CAST ( NULL AS INTEGER ) col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT DISTINCT col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 23 col1 FROM tab1, tab2 cor0, tab2 AS cor1 GROUP BY cor1.col0
----
23
23
23

query I rowsort
SELECT + 31 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
31
31
31

onlyif mysql # DIV for integer division: 
query I rowsort label-576
SELECT - 21 DIV cor0.col0 + - cor0.col0 * + ( cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

skipif mysql # not compatible
query I rowsort label-576
SELECT - 21 / cor0.col0 + - cor0.col0 * + ( cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT - cor0.col2 * col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT + col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - 24 FROM tab2, tab2 cor0, tab2 AS cor1 GROUP BY tab2.col2
----
-24
-24
-24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 50 col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-50
-50
-50

onlyif mysql # DIV for integer division: 
query I rowsort label-581
SELECT - cor0.col1 * 59 DIV + 91 AS col0 FROM tab0, tab0 cor0 GROUP BY cor0.col1
----
-52
0

skipif mysql # not compatible
query I rowsort label-581
SELECT - cor0.col1 * 59 / + 91 AS col0 FROM tab0, tab0 cor0 GROUP BY cor0.col1
----
-52
0

query I rowsort
SELECT cor0.col2 * + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT - 95 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-95

query I rowsort
SELECT + cor0.col2 * - cor0.col2 * cor0.col1 + cor0.col1 + - col2 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-115413
-221831
-386

query I rowsort
SELECT cor0.col2 + + 84 FROM tab2 AS cor0 GROUP BY cor0.col2
----
142
163
171

onlyif mysql # DIV for integer division: 
query I rowsort label-586
SELECT - cor0.col0 + - 98 DIV - 13 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-8
-84
-85

skipif mysql # not compatible
query I rowsort label-586
SELECT - cor0.col0 + - 98 / - 13 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-8
-84
-85

query I rowsort
SELECT DISTINCT 14 + 90 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
104

query I rowsort
SELECT DISTINCT + 68 FROM tab1 AS cor0 GROUP BY col0
----
68

query III rowsort
SELECT * FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, col2
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

onlyif mysql # DIV for integer division: 
query I rowsort label-590
SELECT - ( 31 ) DIV - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-590
SELECT - ( 31 ) / - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
1
1

query I rowsort
SELECT + 10 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
10
10
10

query I rowsort
SELECT 12 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT - 67 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-67
-67
-67

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT ALL cor0.col1 * + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
2565
3124
48

query I rowsort
SELECT DISTINCT 61 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2684
-3477
-366

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL 83 FROM tab1 AS cor0 GROUP BY cor0.col1
----
83
83
83

onlyif mysql # DIV for integer division: 
query I rowsort label-600
SELECT + cor0.col2 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-600
SELECT + cor0.col2 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - col1 * + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1944
0

query I rowsort
SELECT 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
5
5
5

query I rowsort
SELECT + 99 FROM tab0 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT col2 - + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT - ( cor0.col1 ) + - cor0.col1 * - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1640
3422
3660

query I rowsort
SELECT DISTINCT ( col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ( 89 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT 58 * 1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
58

query I rowsort
SELECT DISTINCT - 89 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0
----
-89

query I rowsort
SELECT + 92 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1640
-3422
-3660

query I rowsort
SELECT ( ( cor0.col1 ) * - cor0.col1 ) + - 11 * - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-6297
418
869

query I rowsort
SELECT DISTINCT - + tab0.col0 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + cor0.col2 * + 92 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
5336
7268
8004

query I rowsort
SELECT 33 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - + col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2378
4661
5307

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT - ( cor0.col0 * cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL 49 FROM tab2 AS cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT col1 AS col0 FROM tab2 WHERE NULL < NULL GROUP BY tab2.col1
----

query I rowsort
SELECT - col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + cor0.col1 * 69 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5589

query I rowsort
SELECT ALL + 31 - 21 FROM tab1 AS cor0 GROUP BY cor0.col1
----
10
10
10

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-632
SELECT ALL + CAST( ( + col0 ) AS SIGNED ) * ( - cor0.col0 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

skipif mysql # not compatible
query I rowsort label-632
SELECT ALL + CAST ( ( + col0 ) AS INTEGER ) * ( - cor0.col0 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL col2 + + cor0.col2 * 40 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
1845
2911
328

query I rowsort
SELECT + cor0.col1 * 8 FROM tab2 AS cor0 GROUP BY cor0.col1
----
328
472
488

query I rowsort
SELECT ALL + 44 * + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1144
1892
3652

query I rowsort
SELECT + col2 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT cor0.col1 + - 99 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-38
-40
-58

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col2 col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col2
----
58
79
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-645
SELECT DISTINCT CAST( 95 AS SIGNED ) col1 FROM tab2, tab2 cor0 GROUP BY cor0.col2
----
95

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-645
SELECT DISTINCT CAST ( 95 AS INTEGER ) col1 FROM tab2, tab2 cor0 GROUP BY cor0.col2
----
95

query I rowsort
SELECT 32 AS col0 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
32
32
32

query I rowsort
SELECT DISTINCT 37 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
37

query I rowsort
SELECT - col1 FROM tab2 cor0 GROUP BY col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT ALL - cor0.col2 * ( col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL 35 * - cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-2030
-2765
-3045

query I rowsort
SELECT - cor0.col1 - 72 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-113
-131
-133

query I rowsort
SELECT ALL - - 75 AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
75
75
75

query I rowsort
SELECT + 91 FROM tab0 AS cor0 GROUP BY col0
----
91
91
91

query I rowsort
SELECT - 33 * ( cor0.col0 ) FROM tab1 cor0 GROUP BY cor0.col0
----
-2706
-726
-924

query I rowsort
SELECT 5 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 89 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
89
89
89

query I rowsort
SELECT DISTINCT 84 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
84

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - - 30 AS col0 FROM tab0 GROUP BY col0
----
30

query I rowsort
SELECT DISTINCT 19 FROM tab0 AS cor0 GROUP BY cor0.col0
----
19

query I rowsort
SELECT DISTINCT - ( - cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col1 * + 73 FROM tab1 AS cor0 GROUP BY col1
----
3212
4161
438

query I rowsort
SELECT DISTINCT - cor0.col0 + + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT - 72 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1728
-2736
-5688

query I rowsort
SELECT + col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
44
57
6

query I rowsort
SELECT + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT 92 FROM tab0 AS cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT ALL cor0.col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ( - col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 97 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
97
97
97

query III rowsort
SELECT ALL * FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
44
57
6

query I rowsort
SELECT DISTINCT 97 + + cor0.col1 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
145
2662
3221

query I rowsort
SELECT DISTINCT 80 FROM tab0 cor0 GROUP BY cor0.col1
----
80

query I rowsort
SELECT DISTINCT - ( + cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-678
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-678
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT DISTINCT - ( 72 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-72

query I rowsort
SELECT DISTINCT + 8 AS col1 FROM tab0 GROUP BY tab0.col1
----
8

query I rowsort
SELECT ALL ( cor0.col1 ) + - col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT + cor0.col1 + 89 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
170
89

query I rowsort
SELECT 3 + - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-55
-76
-84

query I rowsort
SELECT DISTINCT 69 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
69

query I rowsort
SELECT + 12 FROM tab0 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-687
SELECT ALL ( + cor0.col2 + cor0.col2 ) * 16 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
32
32
32

skipif mysql # not compatible
query I rowsort label-687
SELECT ALL ( + cor0.col2 + cor0.col2 ) * 16 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
32
32
32

query I rowsort
SELECT ALL col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - 54 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
-2376
-3078
-324

query I rowsort
SELECT - cor0.col0 - + cor0.col0 * + 70 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-1562
-1988
-5822

query I rowsort
SELECT DISTINCT 27 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
27

query I rowsort
SELECT 59 + cor0.col0 * + 66 AS col0 FROM tab2 cor0 GROUP BY col1, cor0.col1, cor0.col0
----
1049
6065
6131

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 53 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-53
-53
-53

query I rowsort
SELECT col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT cor0.col2 * cor0.col1 * cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-38
-79
46632

onlyif mysql # DIV for integer division: 
query I rowsort label-697
SELECT DISTINCT + cor0.col0 DIV + 11 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
8

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-697
SELECT DISTINCT + cor0.col0 / + 11 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
8

query I rowsort
SELECT col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-699
SELECT ALL - col0 DIV 87 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-699
SELECT ALL - col0 / 87 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT 16 FROM tab0 GROUP BY tab0.col2
----
16
16
16

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + 57 FROM tab0 AS cor0 GROUP BY col1
----
57

onlyif mysql # DIV for integer division: 
query I rowsort label-703
SELECT - cor0.col2 DIV - 41 - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-44
-70
-8

skipif mysql # not compatible
query I rowsort label-703
SELECT - cor0.col2 / - 41 - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-44
-70
-8

query I rowsort
SELECT DISTINCT - tab0.col0 AS col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
15
91
92

query I rowsort
SELECT + + col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT + cor0.col2 + + col2 * + cor0.col2 FROM tab0 cor0 GROUP BY col2
----
1482
600
6320

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
0
81

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-710
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-710
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL - 65 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-65
-65
-65

query I rowsort
SELECT - + 76 AS col1 FROM tab2 GROUP BY tab2.col0
----
-76
-76
-76

query I rowsort
SELECT - 50 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2050
2950
3050

query I rowsort
SELECT ALL - 88 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-88
-88
-88

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT - 38 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-38
-38
-38

query I rowsort
SELECT 2 AS col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
2
2
2

query I rowsort
SELECT 0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
45
71
8

query I rowsort
SELECT DISTINCT + cor0.col0 * - ( col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-1849
-676
-6889

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-723
SELECT DISTINCT + CAST( NULL AS DECIMAL ) + - cor0.col0 * cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-723
SELECT DISTINCT + CAST ( NULL AS REAL ) + - cor0.col0 * cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT + 44 * 12 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
528
528
528

query I rowsort
SELECT ALL - 41 + - col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-122
-41

onlyif mysql # DIV for integer division: 
query I rowsort label-726
SELECT + cor0.col2 DIV + 90 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-726
SELECT + cor0.col2 / + 90 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-728
SELECT ALL cor0.col0 + + cor0.col1 * + cor0.col1 - + CAST( NULL AS DECIMAL ) * + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-728
SELECT ALL cor0.col0 + + cor0.col1 * + cor0.col1 - + CAST ( NULL AS REAL ) * + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col2 FROM tab2 cor0 GROUP BY col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT ( NULL ) = ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 38 col0 FROM tab0 cor0 GROUP BY col2
----
38
38
38

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IN ( cor0.col0 )
----

query I rowsort
SELECT ( cor0.col2 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - 95 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-95
-95
-95

query I rowsort
SELECT + - 83 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-83
-83

query I rowsort
SELECT + 78 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
78
78

query I rowsort
SELECT cor0.col2 + - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL - col0 + ( cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - 49 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-49
-49
-49

query I rowsort
SELECT + 92 + col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
100
137
163

query I rowsort
SELECT 40 - 66 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5966
-6032
-950

query I rowsort
SELECT - cor0.col2 - cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-105
-121
-67

query I rowsort
SELECT DISTINCT 9 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
216
342
711

query I rowsort
SELECT DISTINCT - 61 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-61

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-3483
0

query I rowsort
SELECT DISTINCT 56 FROM tab2 AS cor0 GROUP BY cor0.col1
----
56

query I rowsort
SELECT ALL - + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + cor0.col2 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 94 col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
94
94

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT - 46 FROM tab0 cor0 GROUP BY cor0.col1
----
-46

query I rowsort
SELECT + cor0.col2 * cor0.col2 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT - cor0.col2 * 31 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1178
-2449
-744

query I rowsort
SELECT + ( + ( - cor0.col0 ) ) * cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 66 + + cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
-66
15

onlyif mysql # DIV for integer division: 
query I rowsort label-761
SELECT ( 9 ) DIV + cor0.col1 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

skipif mysql # not compatible
query I rowsort label-761
SELECT ( 9 ) / + cor0.col1 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT - 73 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-73
-73
-73

query I rowsort
SELECT DISTINCT + 81 FROM tab0 AS cor0 GROUP BY cor0.col0
----
81

query I rowsort
SELECT + 95 FROM tab1 GROUP BY tab1.col0
----
95
95
95

query I rowsort
SELECT - 76 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-76
-76
-76

query I rowsort
SELECT ALL ( + cor0.col2 ) + cor0.col2 * cor0.col0 FROM tab2 AS cor0 GROUP BY col2, col0
----
1392
5394
7268

query I rowsort
SELECT ALL + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT cor0.col0 + cor0.col0 * 38 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
3549
3588
585

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 71 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
71
71
71

query I rowsort
SELECT 60 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 96 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
96

query I rowsort
SELECT + cor0.col2 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
102
115
14

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-775
SELECT ALL + CAST( NULL AS SIGNED ) AS col2 FROM tab1, tab2 AS cor0, tab2 cor1 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-775
SELECT ALL + CAST ( NULL AS INTEGER ) AS col2 FROM tab1, tab2 AS cor0, tab2 cor1 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col1 + - 18 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-12
26
39

query I rowsort
SELECT ALL cor0.col1 + - ( + cor0.col1 ) FROM tab0 cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT ALL - tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT ALL 88 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1936
-2464
-7216

query I rowsort
SELECT ALL + 46 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
46
46
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT 89 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
7209

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + - tab2.col0 AS col1 FROM tab2, tab2 cor0 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT - 82 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-82
-82
-82

query I rowsort
SELECT 14 FROM tab2 AS cor0 GROUP BY col1, cor0.col1, cor0.col1
----
14
14
14

query I rowsort
SELECT + 86 FROM tab0 AS cor0 GROUP BY cor0.col2
----
86
86
86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-789
SELECT CAST( + 34 AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
34
34
34

skipif mysql # not compatible
query I rowsort label-789
SELECT CAST ( + 34 AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
34
34
34

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
0
81

query I rowsort
SELECT + ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col0 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1305
5336
7189

query I rowsort
SELECT ALL + 71 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
71
71
71

query I rowsort
SELECT DISTINCT cor0.col1 + 96 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
102
140
153

query I rowsort
SELECT ALL - ( 6 ) AS col0 FROM tab0 GROUP BY col2
----
-6
-6
-6

query I rowsort
SELECT + 30 FROM tab1 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT 71 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
71

query I rowsort
SELECT + col0 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
124
26
83

query I rowsort
SELECT ALL - cor0.col2 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-105
-38
-79

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab0 cor0 GROUP BY cor0.col1, col1
----
0
81

query I rowsort
SELECT ALL + cor0.col0 - + cor0.col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + 51 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
51

query I rowsort
SELECT DISTINCT 1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1

query I rowsort
SELECT ALL + col2 * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
0
0
1944

query I rowsort
SELECT + cor0.col0 - col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-46
32
51

query I rowsort
SELECT DISTINCT - tab1.col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL 7 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1 GROUP BY tab0.col0
----
7
7
7

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-810
SELECT ALL + CAST( cor0.col0 AS SIGNED ) AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

skipif mysql # not compatible
query I rowsort label-810
SELECT ALL + CAST ( cor0.col0 AS INTEGER ) AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT 1 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT cor0.col1 * 60 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2640
3420
360

query I rowsort
SELECT 63 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
63
63
63

onlyif mysql # DIV for integer division: 
query I rowsort label-814
SELECT ALL - 22 DIV cor0.col2 + + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

skipif mysql # not compatible
query I rowsort label-814
SELECT ALL - 22 / cor0.col2 + + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT - 41 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-41
-41
-41

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-817
SELECT DISTINCT CAST( NULL AS SIGNED ) - 56 col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-817
SELECT DISTINCT CAST ( NULL AS INTEGER ) - 56 col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT ALL 75 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
75
75
75

query I rowsort
SELECT ALL - 2 * 84 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-168
-168
-168

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - + 99 + 13 AS col2 FROM tab2 GROUP BY tab2.col2
----
-86
-86
-86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-823
SELECT DISTINCT CAST( 85 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
85

skipif mysql # not compatible
query I rowsort label-823
SELECT DISTINCT CAST ( 85 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 46 col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-46
-46
-46

query I rowsort
SELECT DISTINCT - 89 FROM tab2, tab1 AS cor0 GROUP BY tab2.col0
----
-89

query I rowsort
SELECT - 61 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-827
SELECT ALL + CAST( 17 AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
17
17
17

skipif mysql # not compatible
query I rowsort label-827
SELECT ALL + CAST ( 17 AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 26 col2 FROM tab0, tab2 cor0 GROUP BY tab0.col1
----
26
26

query I rowsort
SELECT col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-830
SELECT + 15 DIV 50 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-830
SELECT + 15 / 50 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

query I rowsort
SELECT 3 + - cor0.col2 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1441
-573
-6238

query III rowsort
SELECT * FROM tab2 cor0 GROUP BY col0, cor0.col2, cor0.col1
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT - col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 84 FROM tab0 GROUP BY tab0.col2
----
84

query I rowsort
SELECT + 52 AS col0 FROM tab0 GROUP BY col1
----
52
52

onlyif mysql # DIV for integer division: 
query I rowsort label-838
SELECT + col0 DIV cor0.col0 AS col2 FROM tab2 cor0 GROUP BY col0, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-838
SELECT + col0 / cor0.col0 AS col2 FROM tab2 cor0 GROUP BY col0, cor0.col0
----
1
1
1

query I rowsort
SELECT col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + 56 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2296
-3304
-3416

query I rowsort
SELECT DISTINCT 59 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 58 * + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1392
2204
4582

query I rowsort
SELECT - 73 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-73
-73
-73

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL 46 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1196
-1978
-3818

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-847
SELECT DISTINCT + CAST( NULL AS SIGNED ) col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-847
SELECT DISTINCT + CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-848
SELECT ALL - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-848
SELECT ALL - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 25 FROM tab1 GROUP BY col2
----
25
25
25

onlyif mysql # DIV for integer division: 
query I rowsort label-850
SELECT - cor0.col2 DIV ( 64 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-850
SELECT - cor0.col2 / ( 64 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1
0
0

query I rowsort
SELECT - cor0.col0 + 26 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-65
-66
11

query I rowsort
SELECT ALL col1 * + cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1980
3306
42

query I rowsort
SELECT ALL + col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL 35 FROM tab2 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT ALL - 38 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-38
-38
-38

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT 88 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
88
88

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT DISTINCT + 4 FROM tab1 AS cor0 GROUP BY col2
----
4

query I rowsort
SELECT - 89 FROM tab1 cor0 GROUP BY col0
----
-89
-89
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 - + cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-865
SELECT CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-865
SELECT CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + ( ( cor0.col0 ) * - cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1260
-176
-5822

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL - + tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT ( + 39 ) + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
118
126
97

query I rowsort
SELECT ALL 99 FROM tab2 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT + 55 FROM tab1 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT 41 + + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
123
63
69

query I rowsort
SELECT + + col2 AS col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT 2 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
2
2

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
133
150
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 20 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + cor0.col2 + 71 col0 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
161
213
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT ALL - 64 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-64
-64
-64

query I rowsort
SELECT ALL col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + 22 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
22
22
22

query I rowsort
SELECT cor0.col1 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0
0
162

query I rowsort
SELECT DISTINCT + 47 FROM tab2 AS cor0 GROUP BY col2
----
47

query I rowsort
SELECT - cor0.col2 * - 29 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
1305
2059
232

query I rowsort
SELECT + cor0.col2 * + 96 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5568
7584
8352

onlyif mysql # DIV for integer division: 
query I rowsort label-887
SELECT ( - 15 ) DIV col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-887
SELECT ( - 15 ) / col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query III rowsort
SELECT * FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 97 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
97
97
97

query I rowsort
SELECT - ( tab1.col1 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 17 col2 FROM tab2 GROUP BY tab2.col1
----
-17
-17
-17

query I rowsort
SELECT ALL - + cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + cor0.col2 + 28 FROM tab2 AS cor0 GROUP BY cor0.col2
----
107
115
86

query I rowsort
SELECT cor0.col1 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3483

query I rowsort
SELECT - ( + 46 ) + + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-20
-3
37

query I rowsort
SELECT DISTINCT 62 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
62

query I rowsort
SELECT ALL 51 * - col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-2244
-2907
-306

query I rowsort
SELECT + cor0.col1 * + col0 FROM tab0 cor0 GROUP BY col0, cor0.col1
----
0
0
3483

query I rowsort
SELECT + cor0.col1 * 26 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1144
1482
156

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

query I rowsort
SELECT - col0 * - ( - 73 * + cor0.col0 ) FROM tab1 cor0 GROUP BY cor0.col0
----
-35332
-490852
-57232

query I rowsort
SELECT ( + col0 ) FROM tab1 AS cor0 GROUP BY col0, cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT ALL - ( tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 3 FROM tab1 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT 82 + cor0.col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
140
161
169

query I rowsort
SELECT - col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - 82 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-82
-82
-82

query I rowsort
SELECT 57 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT cor0.col0 - cor0.col2 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1232
-154
-5740

query I rowsort
SELECT ALL ( - 10 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-10
-10
-10

query I rowsort
SELECT DISTINCT 52 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
52

query I rowsort
SELECT + 10 FROM tab2 AS cor0 GROUP BY col0
----
10
10
10

query I rowsort
SELECT DISTINCT + 72 FROM tab2 AS cor0 GROUP BY cor0.col1
----
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 34 col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
34
34
34

query I rowsort
SELECT - 93 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-93
-93

query I rowsort
SELECT DISTINCT + ( col1 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-921
SELECT ALL cor0.col1 DIV + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
0
0
4

skipif mysql # not compatible
query I rowsort label-921
SELECT ALL cor0.col1 / + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
0
0
4

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-923
SELECT DISTINCT - cor0.col1 DIV 89 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-923
SELECT DISTINCT - cor0.col1 / 89 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT ALL ( - 92 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-92
-92
-92

query I rowsort
SELECT ALL + - 83 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-83
-83

query I rowsort
SELECT ALL 12 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
12
12
12

query I rowsort
SELECT DISTINCT cor0.col0 + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT ALL col2 FROM tab0 cor0 GROUP BY cor0.col2 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT + ( cor0.col1 + + ( + cor0.col1 ) ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT 52 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
123
60
97

query I rowsort
SELECT ALL - 5 * 4 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-20
-20
-20

query I rowsort
SELECT - + tab2.col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL ( cor0.col0 ) FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT 73 FROM tab2 AS cor0 GROUP BY cor0.col0
----
73
73
73

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-935
SELECT CAST( - 9 AS SIGNED ) FROM tab1 GROUP BY col1
----
-9
-9
-9

skipif mysql # not compatible
query I rowsort label-935
SELECT CAST ( - 9 AS INTEGER ) FROM tab1 GROUP BY col1
----
-9
-9
-9

query I rowsort
SELECT + ( 25 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
25
25
25

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-937
SELECT - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-937
SELECT - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 67 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
67
67
67

query I rowsort
SELECT + 81 + - 69 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
12
12
12

query I rowsort
SELECT DISTINCT - 19 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-19

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-941
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-941
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 9 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
9
9
9

query I rowsort
SELECT 53 FROM tab1 AS cor0 GROUP BY cor0.col0
----
53
53
53

query I rowsort
SELECT ALL + 3 + + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
27
41
82

query I rowsort
SELECT DISTINCT 19 + cor0.col0 * ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY col0
----
244
8300
8483

query I rowsort
SELECT DISTINCT + - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col2 col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - cor0.col2 * - cor0.col2 FROM tab2 AS cor0 WHERE - cor0.col2 BETWEEN NULL AND NULL GROUP BY cor0.col2
----

query I rowsort
SELECT ALL - 47 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-47
-47
-47

query I rowsort
SELECT 38 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
38
38
38

query I rowsort
SELECT ALL - 15 FROM tab0 cor0 GROUP BY col0
----
-15
-15
-15

query I rowsort
SELECT ALL + ( 47 ) * - cor1.col2 + cor1.col2 FROM tab1, tab1 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
-2668
-3634
-4002

query I rowsort
SELECT + - cor0.col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL + col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT ALL + 7 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
7
7

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT + 10 FROM tab2 AS cor0 GROUP BY cor0.col1
----
10
10
10

onlyif mysql # DIV for integer division: 
query I rowsort label-960
SELECT DISTINCT + 26 DIV cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-960
SELECT DISTINCT + 26 / cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col0
----
0
1

query I rowsort
SELECT 10 + cor0.col0 * cor0.col0 - + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, col0
----
472
6652
766

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL - 9 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-9
-9
-9

query I rowsort
SELECT + 61 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
61
61

onlyif mysql # DIV for integer division: 
query I rowsort label-965
SELECT DISTINCT - cor0.col2 DIV cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-965
SELECT DISTINCT - cor0.col2 / cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1

query I rowsort
SELECT DISTINCT - 47 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 7 - + cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-17
-31
-72

query I rowsort
SELECT ( cor0.col2 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1444
576
6241

query I rowsort
SELECT 2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT ALL 65 + + 4 AS col0 FROM tab1 cor0 GROUP BY col1
----
69
69
69

query I rowsort
SELECT - 26 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-26
-26
-26

query I rowsort
SELECT ALL 76 * 93 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to 93d22aabf62943bfa83d44e3343abdd5

query I rowsort
SELECT ALL tab1.col1 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT - cor0.col0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + cor0.col1 ) col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - 57 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-57
-57
-57

query I rowsort
SELECT DISTINCT + cor0.col1 + 74 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
118
131
80

query I rowsort
SELECT DISTINCT + cor0.col1 + - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2
-27
12

query I rowsort
SELECT ALL + 28 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
28
28
28

query I rowsort
SELECT ALL ( + cor0.col2 ) * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1444
576
6241

query I rowsort
SELECT ALL - cor0.col1 * - 27 FROM tab2 AS cor0 GROUP BY col1
----
1107
1593
1647

query I rowsort
SELECT ALL cor0.col2 - cor0.col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3422
6320
7656

query I rowsort
SELECT - 94 FROM tab2 AS cor0 GROUP BY col2
----
-94
-94
-94

query I rowsort
SELECT ALL - tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-986
SELECT ALL - cor0.col2 DIV - 13 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
4
6
6

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-986
SELECT ALL - cor0.col2 / - 13 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
4
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT + 4 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
164
236
244

query I rowsort
SELECT - 97 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-97
-97
-97

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT - 93 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-93
-93
-93

query I rowsort
SELECT ALL 40 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
40
40
40

query I rowsort
SELECT + 67 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
67
67
67

query I rowsort
SELECT DISTINCT 33 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 88 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-88
-88
-88

query I rowsort
SELECT - cor0.col0 + cor0.col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1944

query I rowsort
SELECT + 26 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
26
26
26

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT 8 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
16
53
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab2, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col0 + 84 + - 17 FROM tab1 AS cor0 GROUP BY col0
----
149
89
95

query I rowsort
SELECT ALL tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 37 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1406
2923
888

query I rowsort
SELECT DISTINCT 10 - cor0.col0 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-16
-33
-73

query I rowsort
SELECT - 13 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-13
-13
-13

query I rowsort
SELECT DISTINCT + 11 FROM tab1 GROUP BY tab1.col2
----
11

query I rowsort
SELECT DISTINCT - 5 AS col1 FROM tab1 GROUP BY tab1.col0
----
-5

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NULL NOT IN ( cor0.col1 )
----

onlyif mysql # DIV for integer division: 
query I rowsort label-1010
SELECT + 68 DIV 77 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1010
SELECT + 68 / 77 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT 97 FROM tab2, tab2 AS cor0, tab1 AS cor1 GROUP BY tab2.col1
----
97
97
97

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT - 27 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-27
-27
-27

query I rowsort
SELECT - 32 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-32
-32
-32

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1018
SELECT - CAST( ( - col0 ) AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

skipif mysql # not compatible
query I rowsort label-1018
SELECT - CAST ( ( - col0 ) AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col2 + ( + cor0.col2 * - cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1215
-168
-5751

query I rowsort
SELECT ALL - 71 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-71
-71
-71

query I rowsort
SELECT - 55 FROM tab0, tab1 cor0 GROUP BY cor0.col2
----
-55
-55
-55

query I rowsort
SELECT cor0.col0 + - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT ALL - 51 + - 55 FROM tab0, tab1 cor0 GROUP BY cor0.col0
----
-106
-106
-106

query I rowsort
SELECT DISTINCT + cor0.col1 + + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT DISTINCT 73 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
154
73

query I rowsort
SELECT + 91 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
91
91
91

query I rowsort
SELECT DISTINCT + col0 FROM tab2 cor0 GROUP BY col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
22
28
82

query I rowsort
SELECT + col2 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
45
71
8

query I rowsort
SELECT + - 21 AS col1 FROM tab0, tab1 AS cor0, tab1 cor1 GROUP BY cor0.col1
----
-21
-21
-21

query I rowsort
SELECT DISTINCT 33 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * 97 col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-5626
-7663
-8439

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 92 col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
92
92
92

onlyif mysql # DIV for integer division: 
query I rowsort label-1034
SELECT + ( tab2.col1 ) DIV - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1034
SELECT + ( tab2.col1 ) / - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 40 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-40
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 23 + - 67 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-44
-44

query I rowsort
SELECT + 95 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
95
95
95

query I rowsort
SELECT DISTINCT 35 + - 10 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
25

onlyif mysql # DIV for integer division: 
query I rowsort label-1039
SELECT - col2 DIV 65 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1039
SELECT - col2 / 65 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-1
0
0

query I rowsort
SELECT + ( tab1.col2 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT + 27 FROM tab0, tab0 cor0 GROUP BY tab0.col0
----
27
27
27

query I rowsort
SELECT + 4 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
4
4
4

query I rowsort
SELECT ALL 91 FROM tab0 AS cor0 GROUP BY cor0.col1
----
91
91

query I rowsort
SELECT 8 FROM tab1 AS cor0 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT ALL col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col0 * - ( cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT + 11 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
11

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT cor0.col2 * - 86 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
-2064
-3268
-6794

query I rowsort
SELECT cor0.col1 + - 3 * + 70 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-149
-151
-169

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 15 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
15
15
15

query I rowsort
SELECT ALL - 76 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-76
-76

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1054
SELECT + CAST( NULL AS SIGNED ) * - 49 + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1054
SELECT + CAST ( NULL AS INTEGER ) * - 49 + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT 14 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
14
14
14

query I rowsort
SELECT + ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT DISTINCT + 80 AS col0 FROM tab2 GROUP BY col1
----
80

query I rowsort
SELECT ALL + ( + 87 ) AS col2 FROM tab0, tab2 cor0 GROUP BY cor0.col1
----
87
87
87

query I rowsort
SELECT - 39 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-39
-39

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1060
SELECT CAST( 11 AS SIGNED ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
11
11
11

skipif mysql # not compatible
query I rowsort label-1060
SELECT CAST ( 11 AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
11
11
11

query I rowsort
SELECT 43 * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1204
3526
946

query I rowsort
SELECT cor0.col1 - - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
114
12
88

query I rowsort
SELECT + cor0.col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1064
SELECT - cor0.col2 - + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1064
SELECT - cor0.col2 - + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 * - 23 + cor0.col1 * - 79 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-2337
-3363
-3477

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1066
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1066
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT ALL 89 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
89
89
89

query I rowsort
SELECT 28 FROM tab2, tab2 AS cor0, tab2 AS cor1 GROUP BY cor1.col1
----
28
28
28

query I rowsort
SELECT DISTINCT + 1 FROM tab1 GROUP BY tab1.col2
----
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1070
SELECT ALL - CAST( NULL AS SIGNED ) col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1070
SELECT ALL - CAST ( NULL AS INTEGER ) col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT + 51 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
51

query I rowsort
SELECT ALL - col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 3 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3

query I rowsort
SELECT ( cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT + 70 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
70
70
70

query I rowsort
SELECT + 71 FROM tab2 AS cor0 GROUP BY col0
----
71
71
71

query I rowsort
SELECT ALL 74 FROM tab2 AS cor0 GROUP BY col1
----
74
74
74

query I rowsort
SELECT + - 69 * - cor0.col0 FROM tab2, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col0
----
1794
2967
5727

query I rowsort
SELECT DISTINCT cor0.col2 * + 50 + + cor0.col2 + ( - cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
2900
3950
4350

query I rowsort
SELECT ALL + col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col2 + - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-12
-34
72

query I rowsort
SELECT ALL + 19 FROM tab0 cor0 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT 8 FROM tab2, tab2 cor0 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT ALL - 54 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col1
----
-54
-54
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT cor0.col0 * + 90 FROM tab0 cor0 GROUP BY cor0.col0
----
2340
3870
7470

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1088
SELECT ALL + CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1088
SELECT ALL + CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + + 51 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
4131

query I rowsort
SELECT 72 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2952
4248
4392

query I rowsort
SELECT DISTINCT tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
15
91
92

query I rowsort
SELECT 42 + 7 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
448
595
651

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 39 col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
-39

query I rowsort
SELECT ALL col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT + ( + cor0.col1 ) AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT - 66 * + tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-6006
-6072
-990

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1098
SELECT CAST( + 28 AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
28
28
28

skipif mysql # not compatible
query I rowsort label-1098
SELECT CAST ( + 28 AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
28
28
28

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab0, tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - 87 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-87
-87
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 44 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44

query I rowsort
SELECT ALL 90 FROM tab0 AS cor0 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT ALL 49 + cor0.col0 + ( + 18 ) AS col2 FROM tab1 AS cor0 GROUP BY col0
----
149
89
95

query I rowsort
SELECT ALL - 81 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-81
-81
-81

query I rowsort
SELECT + cor0.col0 FROM tab1, tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col1 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3772
5369
915

query I rowsort
SELECT - 83 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-83
-83
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 + tab2.col2 col1 FROM tab2 GROUP BY col2
----
116
158
174

onlyif mysql # DIV for integer division: 
query I rowsort label-1109
SELECT DISTINCT 31 DIV 33 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1109
SELECT DISTINCT 31 / 33 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0

query I rowsort
SELECT DISTINCT - 9 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-9

query I rowsort
SELECT - - 57 AS col0 FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
57
57
57

query I rowsort
SELECT + cor0.col0 + col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT cor0.col0 + + cor0.col0 * + 35 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3276
3312
540

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query III rowsort
SELECT ALL * FROM tab0 cor0 GROUP BY col0, col2, cor0.col1
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT DISTINCT 66 FROM tab1 AS cor0 GROUP BY cor0.col2
----
66

query I rowsort
SELECT DISTINCT + 58 FROM tab2 cor0 GROUP BY cor0.col0
----
58

query I rowsort
SELECT DISTINCT - 21 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-21

query I rowsort
SELECT + ( - col1 ) + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 - - col2 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1482
600
6320

query I rowsort
SELECT DISTINCT 13 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
13

query I rowsort
SELECT ALL + cor0.col2 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT + 96 FROM tab0 GROUP BY col1
----
96
96

query I rowsort
SELECT ALL + 68 * + tab0.col2 + + col2 AS col1 FROM tab0 GROUP BY col2
----
1656
2622
5451

query I rowsort
SELECT - - tab0.col0 + + 97 FROM tab0, tab2 cor0 GROUP BY tab0.col0
----
123
140
180

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
44
57
6

query I rowsort
SELECT cor0.col0 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT ALL ( 95 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT ALL + 78 FROM tab0 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT - 69 + - 84 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-153
-153
-153

query I rowsort
SELECT ALL col1 * cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
185193
216
85184

query I rowsort
SELECT ALL - col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT + 36 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
36
36
36

query I rowsort
SELECT + 63 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
63
63
63

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
162

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1136
SELECT CAST( 72 AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
72
72
72

skipif mysql # not compatible
query I rowsort label-1136
SELECT CAST ( 72 AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT DISTINCT 75 FROM tab0 AS cor0 GROUP BY cor0.col1
----
75

query I rowsort
SELECT DISTINCT + 86 FROM tab1 cor0 GROUP BY cor0.col1
----
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 30 col2 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
30
30
30

query I rowsort
SELECT DISTINCT 70 * + cor1.col2 * ( - 62 ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-104160
-164920
-342860

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT ALL + 6 * + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
156
258
498

query I rowsort
SELECT + 29 FROM tab1 GROUP BY tab1.col0
----
29
29
29

query I rowsort
SELECT ALL + 25 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
25
25
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + 65 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
2665
3835
3965

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 50 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
50
50
50

query I rowsort
SELECT DISTINCT + col2 * - cor0.col2 * 64 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
-36864
-399424
-92416

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2, cor0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-1151
SELECT cor0.col1 + cor0.col2 * - cor0.col0 + cor0.col2 * + cor0.col0 DIV cor0.col0 AS col1 FROM tab1 cor0 GROUP BY col1, cor0.col0, col2
----
-1158
-162
-5707

skipif mysql # not compatible
query I rowsort label-1151
SELECT cor0.col1 + cor0.col2 * - cor0.col0 + cor0.col2 * + cor0.col0 / cor0.col0 AS col1 FROM tab1 cor0 GROUP BY col1, cor0.col0, col2
----
-1158
-162
-5707

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1152
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1152
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 99 col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-99
-99
-99

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT DISTINCT 74 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1110
6734
6808

query I rowsort
SELECT ALL cor0.col1 - - 59 FROM tab1 AS cor0 GROUP BY col1
----
103
116
65

query I rowsort
SELECT cor0.col0 FROM tab0 cor0 GROUP BY col0, col1
----
26
43
83

query I rowsort
SELECT ALL - 72 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-72
-72
-72

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col1 * + cor0.col1 - 43 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
1638
3438
3678

query I rowsort
SELECT ALL - tab0.col1 + + 24 * 41 FROM tab0 GROUP BY col1
----
903
984

query I rowsort
SELECT + 21 * + col1 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
-35301
-73101
-78141

query I rowsort
SELECT DISTINCT - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL 1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
1
1
1

query I rowsort
SELECT cor0.col1 + + 35 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
76
94
96

query I rowsort
SELECT - 42 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-42
-42
-42

query I rowsort
SELECT + cor0.col1 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3772
5369
915

query I rowsort
SELECT DISTINCT 99 FROM tab1 AS cor0 GROUP BY col0
----
99

query I rowsort
SELECT - 24 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-24
-24
-24

query I rowsort
SELECT - - tab1.col2 AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT 13 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
13
13
13

query I rowsort
SELECT + col1 + 60 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
104
117
66

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
0
0
81

query I rowsort
SELECT ALL + 78 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
78
78

query I rowsort
SELECT ALL + + 33 * 61 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
2013
2013
2013

query I rowsort
SELECT DISTINCT + + tab1.col0 FROM tab1 GROUP BY col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT 82 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
82

query I rowsort
SELECT - - 3 AS col1 FROM tab2 GROUP BY tab2.col1
----
3
3
3

query I rowsort
SELECT ( - tab0.col2 ) * 11 AS col1 FROM tab0 GROUP BY tab0.col2
----
-264
-418
-869

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1183
SELECT cor0.col2 * ( + cor0.col2 * + CAST( NULL AS SIGNED ) ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1183
SELECT cor0.col2 * ( + cor0.col2 * + CAST ( NULL AS INTEGER ) ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 55 * + 67 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3685
3685
3685

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 45 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
45

onlyif mysql # DIV for integer division: 
query I rowsort label-1186
SELECT ALL + cor0.col0 DIV - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1186
SELECT ALL + cor0.col0 / - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1187
SELECT - CAST( NULL AS SIGNED ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1187
SELECT - CAST ( NULL AS INTEGER ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ALL 34 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
34
34
34

query I rowsort
SELECT ALL cor0.col2 + + cor0.col2 * - 29 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-1260
-1988
-224

query I rowsort
SELECT DISTINCT + cor0.col0 * col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1008
1975
3116

query I rowsort
SELECT + 10 FROM tab1 AS cor0 GROUP BY cor0.col2
----
10
10
10

query I rowsort
SELECT ALL tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL + 9 FROM tab0 AS cor0 GROUP BY cor0.col0
----
9
9
9

query I rowsort
SELECT + 80 * - 41 AS col2 FROM tab2 GROUP BY tab2.col1
----
-3280
-3280
-3280

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 89 * + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1335
8099
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + cor0.col2 col0 FROM tab2 cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT + cor0.col2 + 67 FROM tab1 AS cor0 GROUP BY col2
----
112
138
75

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 73 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT 40 FROM tab0 AS cor0 GROUP BY col0
----
40

query I rowsort
SELECT - cor0.col1 + cor0.col1 * ( - cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6642
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1204
SELECT DISTINCT + cor0.col0 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-1204
SELECT DISTINCT + cor0.col0 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT ALL + 39 FROM tab0 AS cor0 GROUP BY cor0.col1
----
39
39

query I rowsort
SELECT cor0.col2 * + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - col1 * + cor0.col0 * ( - cor0.col0 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
149769

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-1211
SELECT DISTINCT - col1 DIV CAST( + col1 AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-1211
SELECT DISTINCT - col1 / CAST ( + col1 AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1

query I rowsort
SELECT ALL 74 FROM tab0, tab1 cor0 GROUP BY tab0.col2
----
74
74
74

query I rowsort
SELECT 86 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
86
86
86

query I rowsort
SELECT DISTINCT + 83 FROM tab0 AS cor0 GROUP BY cor0.col0
----
83

query I rowsort
SELECT DISTINCT 49 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
49

query I rowsort
SELECT cor0.col2 * 0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - 11 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-11
-11
-11

query I rowsort
SELECT DISTINCT - 75 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-75

query I rowsort
SELECT col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + 14 FROM tab2 AS cor0 GROUP BY cor0.col0
----
14
14
14

query I rowsort
SELECT ALL 66 FROM tab0 AS cor0 GROUP BY cor0.col2
----
66
66
66

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT 59 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
59
59
59

query I rowsort
SELECT ALL - col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1227
SELECT + CAST( NULL AS SIGNED ) col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1227
SELECT + CAST ( NULL AS INTEGER ) col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT + cor0.col2 + 46 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
117
54
91

query I rowsort
SELECT ALL - col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT 42 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
42
42

query I rowsort
SELECT 43 FROM tab1 AS cor0 GROUP BY cor0.col1
----
43
43
43

query I rowsort
SELECT - cor0.col1 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3772
5369
915

query I rowsort
SELECT DISTINCT 61 FROM tab1 AS cor0 GROUP BY cor0.col2
----
61

query I rowsort
SELECT - col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-58
-79
-87

query I rowsort
SELECT 16 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
16
16
16

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT 64 + - ( cor1.col0 ) FROM tab2, tab2 cor0, tab0 AS cor1 GROUP BY cor1.col0
----
-19
21
38

query I rowsort
SELECT ALL + 90 FROM tab1 AS cor0 GROUP BY col1, col1
----
90
90
90

query I rowsort
SELECT ALL + 6 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
6
6
87

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
45
71
8

query I rowsort
SELECT DISTINCT + 6 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
6

query I rowsort
SELECT ALL cor0.col2 * - 34 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1292
-2686
-816

query I rowsort
SELECT 49 FROM tab0 cor0 GROUP BY cor0.col1
----
49
49

query I rowsort
SELECT DISTINCT cor0.col0 - - ( - cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT ALL + 38 FROM tab1 AS cor0 GROUP BY cor0.col0
----
38
38
38

query I rowsort
SELECT ALL - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1 HAVING ( NULL ) IN ( cor0.col1 )
----

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING + col1 >= NULL
----

query I rowsort
SELECT + + tab2.col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - 95 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-95
-95
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 48 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
48

query I rowsort
SELECT - 26 + + tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
-18
19
45

query I rowsort
SELECT DISTINCT + + 10 FROM tab0, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col0
----
10

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1254
SELECT ALL - CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1254
SELECT ALL - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-1255
SELECT + cor0.col1 DIV ( col2 * cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1255
SELECT + cor0.col1 / ( col2 * cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1256
SELECT ALL 8 DIV 82 + - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

skipif mysql # not compatible
query I rowsort label-1256
SELECT ALL 8 / 82 + - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT + 75 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
75
75
75

query I rowsort
SELECT ALL 36 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
117
36

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1259
SELECT CAST( 9 AS SIGNED ) + cor1.col2 FROM tab1, tab1 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
67
88
96

skipif mysql # not compatible
query I rowsort label-1259
SELECT CAST ( 9 AS INTEGER ) + cor1.col2 FROM tab1, tab1 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
67
88
96

query I rowsort
SELECT DISTINCT 92 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
92

query I rowsort
SELECT DISTINCT 31 FROM tab2 AS cor0 GROUP BY cor0.col1
----
31

query I rowsort
SELECT - 70 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-70
-70
-70

query I rowsort
SELECT DISTINCT 56 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
56

query I rowsort
SELECT ALL - cor0.col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + 98 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
7938

query I rowsort
SELECT ALL ( - cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 20 * - cor0.col1 * cor0.col1 col2 FROM tab2 AS cor0 GROUP BY col1
----
-33620
-69620
-74420

query I rowsort
SELECT ALL - tab2.col1 + 16 FROM tab2 GROUP BY tab2.col1
----
-25
-43
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * + cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT - cor0.col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
0
0
0

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1272
SELECT + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1272
SELECT + CAST ( NULL AS REAL ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 50 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-50
-50
-50

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1277
SELECT + CAST( NULL AS SIGNED ) / - 83 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1277
SELECT + CAST ( NULL AS INTEGER ) / - 83 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + 42 FROM tab0 cor0 GROUP BY cor0.col2
----
42

onlyif mysql # DIV for integer division: 
query I rowsort label-1280
SELECT ALL cor0.col2 DIV - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1280
SELECT ALL cor0.col2 / - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1281
SELECT - CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1281
SELECT - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 6 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT - cor0.col0 - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-166
-52
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
115425
221804
384

query I rowsort
SELECT + 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
5
5

query I rowsort
SELECT ALL 50 - 80 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
-30
-30
-30

query I rowsort
SELECT + tab0.col2 + - 76 FROM tab0 GROUP BY tab0.col2
----
-38
-52
3

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1289
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1289
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( cor0.col2 * + cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT 66 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
66

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT + 24 AS col2 FROM tab1 GROUP BY tab1.col1
----
24
24
24

query I rowsort
SELECT DISTINCT - col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-1295
SELECT cor0.col2 DIV + 29 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-1295
SELECT cor0.col2 / + 29 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
1
2

query I rowsort
SELECT ALL ( cor0.col1 ) + 28 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
109
28

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1297
SELECT + CAST( NULL AS SIGNED ) FROM tab0, tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1297
SELECT + CAST ( NULL AS INTEGER ) FROM tab0, tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 41 col0 FROM tab0 AS cor0 GROUP BY col2
----
41

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + ( + cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT col0 * - tab2.col0 + - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-240
-8372
-8556

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - + ( - cor0.col0 ) FROM tab0, tab1 cor0 GROUP BY cor0.col0
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1305
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1305
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1306
SELECT ALL CAST( NULL AS SIGNED ) * - 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1306
SELECT ALL CAST ( NULL AS INTEGER ) * - 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 62 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-62
-62
-62

query I rowsort
SELECT 81 FROM tab0 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT ALL - 71 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-71
-71
-71

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT 8 AS col2 FROM tab0, tab1 cor0 GROUP BY tab0.col0
----
8
8
8

query I rowsort
SELECT + 60 FROM tab2 AS cor0 GROUP BY cor0.col0
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 27 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
27
27
27

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1314
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1314
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT + 50 FROM tab2, tab0 cor0 GROUP BY cor0.col0
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + cor0.col0 + - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
225
8281
8464

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT 77 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT 93 FROM tab2 AS cor0 GROUP BY cor0.col0
----
93
93
93

onlyif mysql # DIV for integer division: 
query I rowsort label-1322
SELECT DISTINCT cor0.col0 DIV + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-1322
SELECT DISTINCT cor0.col0 / + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT + cor0.col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1324
SELECT cor0.col0 * + CAST( NULL AS SIGNED ) FROM tab1 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1324
SELECT cor0.col0 * + CAST ( NULL AS INTEGER ) FROM tab1 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-1326
SELECT + 6 DIV - col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1326
SELECT + 6 / - col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
0
0
0

query I rowsort
SELECT - cor0.col0 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL - tab2.col0 * 30 FROM tab2 GROUP BY tab2.col0
----
-2730
-2760
-450

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
44
57
6

query I rowsort
SELECT + cor0.col0 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL + 18 * 13 FROM tab2 GROUP BY tab2.col1
----
234
234
234

query I rowsort
SELECT DISTINCT 80 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
80

query III rowsort
SELECT ALL * FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1334
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1334
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col0 * + 19 FROM tab0 cor0 GROUP BY cor0.col0
----
1577
494
817

query I rowsort
SELECT ALL - 5 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
-5
-5
-5

query I rowsort
SELECT DISTINCT 24 FROM tab0 AS cor0 GROUP BY cor0.col0
----
24

query I rowsort
SELECT ALL - - cor0.col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + + 78 FROM tab0, tab1 cor0 GROUP BY cor0.col1
----
78
78
78

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor0.col2
----
0
0
0
81
81
81

query I rowsort
SELECT ALL col1 * 61 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4941

query I rowsort
SELECT - - cor0.col2 * + 13 * + 74 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
23088
36556
75998

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col0, col0, cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT + ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT 49 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
49
49
49

query I rowsort
SELECT ALL + 34 * + col1 FROM tab0 GROUP BY tab0.col1
----
0
2754

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-1347
SELECT DISTINCT - CAST( + cor0.col1 AS SIGNED ) + - cor0.col1 DIV - col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-40
-58
-60

skipif mysql # not compatible
query I rowsort label-1347
SELECT DISTINCT - CAST ( + cor0.col1 AS INTEGER ) + - cor0.col1 / - col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-40
-58
-60

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
124
26
83

query I rowsort
SELECT ALL + cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - 94 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * 65 - + 24 col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-24
5241

query I rowsort
SELECT + ( ( + cor0.col1 ) ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + 60 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
60
60
60

query I rowsort
SELECT ( - ( cor0.col1 ) ) * 83 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3403
-4897
-5063

query I rowsort
SELECT cor0.col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT cor0.col0 + - 57 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-2245
-3272
-3462

query I rowsort
SELECT DISTINCT 25 FROM tab0 AS cor0 GROUP BY cor0.col1
----
25

query I rowsort
SELECT DISTINCT - 44 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
3564

onlyif mysql # DIV for integer division: 
query I rowsort label-1361
SELECT ALL 98 + - cor0.col2 DIV ( cor0.col2 + cor0.col0 * cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
98
98
98

skipif mysql # not compatible
query I rowsort label-1361
SELECT ALL 98 + - cor0.col2 / ( cor0.col2 + cor0.col0 * cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
98
98
98

query I rowsort
SELECT ALL 84 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3696
-4788
-504

query I rowsort
SELECT - 56 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-56
-56
-56

query I rowsort
SELECT - col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 69 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
69
69
69

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + + 33 + 68 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
101

onlyif mysql # DIV for integer division: 
query I rowsort label-1368
SELECT - cor0.col1 DIV 18 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-1368
SELECT - cor0.col1 / 18 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2
-3
0

query I rowsort
SELECT ALL + + 73 AS col0 FROM tab2 GROUP BY tab2.col1
----
73
73
73

query I rowsort
SELECT + 98 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
98
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 + + cor0.col0 col1 FROM tab1 AS cor0 GROUP BY col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 12 * cor0.col0 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-1092
-1104
-180

query I rowsort
SELECT DISTINCT + ( + cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT - + 47 FROM tab0 GROUP BY col0
----
-47
-47
-47

query I rowsort
SELECT + - cor0.col1 + 97 * 81 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
7796
7798
7816

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - + col2 * col2 AS col1 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT + 46 FROM tab1, tab2 cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT ALL 64 + - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-7
19
56

query I rowsort
SELECT + 68 + + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
126
147
155

query I rowsort
SELECT - 85 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-85
-85
-85

query I rowsort
SELECT 67 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 53 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-53
-53
-53

query I rowsort
SELECT DISTINCT + 26 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
105
50
64

query I rowsort
SELECT - cor0.col2 * - 52 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
3016
4108
4524

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1389
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1389
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 + 74 AS col2 FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
115
133
135

query I rowsort
SELECT DISTINCT - 95 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-95

query I rowsort
SELECT ALL 81 FROM tab0 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT - col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 12 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
12

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-1396
SELECT DISTINCT 17 DIV - col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-1396
SELECT DISTINCT 17 / - col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT ALL cor0.col0 + cor0.col1 * 8 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
420
503
563

query I rowsort
SELECT ALL ( + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - ( - cor0.col1 * cor0.col1 ) + cor0.col1 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-1188
-12
684

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 55 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
55
55
55

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT - cor0.col1 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + 80 FROM tab0 AS cor0 GROUP BY cor0.col0
----
80
80
80

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1405
SELECT ALL + CAST( cor0.col0 * - cor0.col0 AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

skipif mysql # not compatible
query I rowsort label-1405
SELECT ALL + CAST ( cor0.col0 * - cor0.col0 AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 48 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
48
48
48

onlyif mysql # DIV for integer division: 
query I rowsort label-1407
SELECT 76 DIV 72 FROM tab2 cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1407
SELECT 76 / 72 FROM tab2 cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT + cor0.col2 + 20 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
136
178
194

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 89 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
89

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT 68 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
68
68
68

query I rowsort
SELECT DISTINCT - 40 * - 19 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
31160
44840
46360

query I rowsort
SELECT - + 4 FROM tab0 GROUP BY col2
----
-4
-4
-4

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1415
SELECT + CAST( NULL AS SIGNED ) * - 7 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1415
SELECT + CAST ( NULL AS INTEGER ) * - 7 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 16 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
16
16
16

query I rowsort
SELECT 95 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT DISTINCT - ( - cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 * - cor0.col1 AS col1 FROM tab2, tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - cor0.col2 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - col2 + 51 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-28
13
27

query I rowsort
SELECT ALL + cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor0.col1
----
58
58
79
79
87
87

query I rowsort
SELECT + 58 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
58
58
58

query I rowsort
SELECT + 94 FROM tab0 GROUP BY tab0.col2
----
94
94
94

query I rowsort
SELECT ALL - cor0.col0 + - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, col0
----
-182
-184
-30

query I rowsort
SELECT ALL + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0
0
81

query I rowsort
SELECT 91 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
91
91
91

query I rowsort
SELECT - cor0.col0 + 70 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-12
42
48

query I rowsort
SELECT - col1 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL + ( - cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL cor0.col1 * + 86 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3526
5074
5246

query I rowsort
SELECT ALL + 84 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
84
84
84

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL + 39 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
39
39
39

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT - 37 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-37
-37
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * cor0.col2 + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3422
6320
7656

query I rowsort
SELECT DISTINCT - 7 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-7

query I rowsort
SELECT cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT ALL - 74 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-74
-74
-74

query I rowsort
SELECT + ( + 6 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
6
6
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1445
SELECT - + CAST( ( - col1 ) AS SIGNED ) col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1445
SELECT - + CAST ( ( - col1 ) AS INTEGER ) col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1446
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1446
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT - 99 AS col1 FROM tab1 GROUP BY col1
----
-99

query I rowsort
SELECT ALL + cor0.col1 + - 21 FROM tab2 AS cor0 GROUP BY cor0.col1
----
20
38
40

query I rowsort
SELECT 82 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
82
82
82

query I rowsort
SELECT - + cor0.col0 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - col1 * tab2.col1 - 37 FROM tab2 GROUP BY tab2.col1
----
-1718
-3518
-3758

query I rowsort
SELECT ALL 80 * cor0.col0 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
1782
2268
6642

query I rowsort
SELECT ( cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT + 40 FROM tab0 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT - ( + cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + - tab2.col0 * tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT ALL + 17 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1411
442
731

query I rowsort
SELECT DISTINCT + ( cor0.col2 + cor0.col2 ) * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-12482
-15138
-6728

query I rowsort
SELECT - cor0.col2 - - cor0.col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3422
-6320
-7656

query I rowsort
SELECT - 71 FROM tab0 cor0 GROUP BY cor0.col0
----
-71
-71
-71

query I rowsort
SELECT DISTINCT + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT 79 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
79
79
79

query I rowsort
SELECT + 32 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
32
32
32

onlyif mysql # DIV for integer division: 
query I rowsort label-1466
SELECT DISTINCT - cor0.col0 - - cor0.col0 DIV 93 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

skipif mysql # not compatible
query I rowsort label-1466
SELECT DISTINCT - cor0.col0 - - cor0.col0 / 93 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + cor0.col1 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
126
28
85

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 31 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
31

query I rowsort
SELECT - col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 26 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
26

query I rowsort
SELECT DISTINCT ( 19 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
19

query I rowsort
SELECT ALL - 31 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-31
-31
-31

query I rowsort
SELECT ALL col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 3 FROM tab1 cor0 GROUP BY cor0.col0
----
3

query I rowsort
SELECT 20 FROM tab0 AS cor0 GROUP BY cor0.col0
----
20
20
20

query I rowsort
SELECT ALL - 73 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3212
4161
438

query I rowsort
SELECT 3 FROM tab0 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT DISTINCT ( 92 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
92

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT ALL 52 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
52
52
52

query I rowsort
SELECT DISTINCT - 16 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-16

query I rowsort
SELECT - - 78 AS col2 FROM tab0 GROUP BY tab0.col2
----
78
78
78

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT + 98 FROM tab2 AS cor0 GROUP BY cor0.col1
----
98
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 91 + - 6 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
85

query I rowsort
SELECT ALL - cor0.col0 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-164
-44
-56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1491
SELECT DISTINCT + CAST( + 37 AS SIGNED ) + - col2 FROM tab1 AS cor0 GROUP BY col2
----
-34
-8
29

skipif mysql # not compatible
query I rowsort label-1491
SELECT DISTINCT + CAST ( + 37 AS INTEGER ) + - col2 FROM tab1 AS cor0 GROUP BY col2
----
-34
-8
29

query I rowsort
SELECT 63 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3654
-4977
-5481

query I rowsort
SELECT 97 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
18
59
73

query I rowsort
SELECT + 73 FROM tab0 AS cor0 GROUP BY cor0.col2
----
73
73
73

query I rowsort
SELECT cor0.col1 * + ( - cor0.col1 ) FROM tab0 AS cor0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT 5 FROM tab1 AS cor0 GROUP BY cor0.col0
----
5
5
5

query I rowsort
SELECT 82 FROM tab0 AS cor0 GROUP BY col0
----
82
82
82

onlyif mysql # DIV for integer division: 
query I rowsort label-1498
SELECT 62 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
10

skipif mysql # not compatible
query I rowsort label-1498
SELECT 62 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
10

query I rowsort
SELECT ALL + cor0.col0 + - cor0.col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1806
-650
-6806

query I rowsort
SELECT ALL + 53 FROM tab0 AS cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT ALL ( + 87 ) FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
87
87
87

query I rowsort
SELECT tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - 24 * - 19 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
456
456
456

query III rowsort
SELECT * FROM tab0 AS cor0 GROUP BY col0, cor0.col2, cor0.col1
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT 11 * 27 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
297
297
297

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
0
81

query I rowsort
SELECT - 25 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-25
-25
-25

query I rowsort
SELECT ALL ( 60 ) AS col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT DISTINCT + - cor0.col1 * - cor0.col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT - 13 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-13
-13
-13

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 42 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1848
2394
252

query I rowsort
SELECT cor0.col2 * 92 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5336
7268
8004

query I rowsort
SELECT DISTINCT - cor0.col0 + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT 74 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
74
74
74

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - 31 AS col2 FROM tab1 GROUP BY tab1.col0
----
-31
-31
-31

query I rowsort
SELECT + ( 74 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT ALL - 14 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-14
-14
-14

query I rowsort
SELECT DISTINCT + 44 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44

query I rowsort
SELECT ( 37 ) AS col2 FROM tab0 AS cor0 GROUP BY col1
----
37
37

query I rowsort
SELECT - 5 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-5
-5
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT 80 FROM tab1 GROUP BY tab1.col1
----
80
80
80

query I rowsort
SELECT - + 92 + + 66 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-20
18
31

query I rowsort
SELECT + col0 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT 91 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
91
91
91

query I rowsort
SELECT + 41 FROM tab0 GROUP BY tab0.col2
----
41
41
41

query I rowsort
SELECT + tab0.col2 + + 5 AS col2 FROM tab0 GROUP BY tab0.col2
----
29
43
84

query I rowsort
SELECT - 94 AS col1 FROM tab0 GROUP BY tab0.col2
----
-94
-94
-94

query I rowsort
SELECT 54 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT ( - 85 ) FROM tab1 AS cor0 GROUP BY col0
----
-85
-85
-85

query I rowsort
SELECT DISTINCT - 81 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-81

query I rowsort
SELECT + 41 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT ALL + ( + cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT 48 + - 87 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-39
-39
-39

query I rowsort
SELECT 7 AS col0 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
7
7
7

query I rowsort
SELECT 50 FROM tab0 GROUP BY tab0.col0
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 73 ) col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
73
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 21 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
21

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1543
SELECT ALL col1 * CAST( + cor0.col0 AS SIGNED ) + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-26
-83
3440

skipif mysql # not compatible
query I rowsort label-1543
SELECT ALL col1 * CAST ( + cor0.col0 AS INTEGER ) + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-26
-83
3440

query I rowsort
SELECT ALL - col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-81
0
0

query I rowsort
SELECT 25 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT ALL 31 FROM tab2 AS cor0 GROUP BY cor0.col1
----
31
31
31

query I rowsort
SELECT ALL 95 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
95
95

onlyif mysql # DIV for integer division: 
query I rowsort label-1548
SELECT + cor0.col0 DIV - 56 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1548
SELECT + cor0.col0 / - 56 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
0
0

query I rowsort
SELECT DISTINCT - ( 42 ) FROM tab1 GROUP BY col2
----
-42

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL - 77 * - 82 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
6314
6314
6314

query I rowsort
SELECT DISTINCT 39 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
39

query I rowsort
SELECT ALL - cor0.col0 + + 93 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
11
65
71

onlyif mysql # DIV for integer division: 
query I rowsort label-1554
SELECT col0 DIV ( col0 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1554
SELECT col0 / ( col0 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT ALL - 43 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
-43
-43
-43

query I rowsort
SELECT col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT 21 + col2 * 34 AS col2 FROM tab1 GROUP BY tab1.col2
----
1551
2435
293

query I rowsort
SELECT DISTINCT 3 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
174
237
261

query I rowsort
SELECT + 58 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
58
58
58

query I rowsort
SELECT DISTINCT 70 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
70

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY col1, col2
----
44
57
6

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab1 cor0 GROUP BY col2 HAVING NOT cor0.col2 * cor0.col2 >= NULL
----

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + tab0.col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT cor0.col1 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
1596
3608

query I rowsort
SELECT DISTINCT tab0.col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT 77 + 51 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4718
4769
842

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1569
SELECT ALL + CAST( NULL AS SIGNED ) + 60 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1569
SELECT ALL + CAST ( NULL AS INTEGER ) + 60 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT - + 69 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-69

query I rowsort
SELECT - cor0.col2 FROM tab0 cor0 GROUP BY col2, cor0.col2
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1572
SELECT + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1572
SELECT + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-6561
0
0

query I rowsort
SELECT + col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-1576
SELECT ALL + cor0.col2 + - cor0.col2 DIV + col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
44
71
8

skipif mysql # not compatible
query I rowsort label-1576
SELECT ALL + cor0.col2 + - cor0.col2 / + col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
44
71
8

query I rowsort
SELECT DISTINCT cor0.col1 - + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 84 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL - ( + 23 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-23
-23
-23

query I rowsort
SELECT + 3 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT 14 AS col2 FROM tab2 GROUP BY tab2.col1
----
14

query I rowsort
SELECT DISTINCT + 61 * + 22 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
1342

query I rowsort
SELECT ALL - 18 FROM tab2 GROUP BY col0
----
-18
-18
-18

query I rowsort
SELECT 92 + + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
116
130
171

query I rowsort
SELECT DISTINCT - 16 + col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
10
27
67

query I rowsort
SELECT DISTINCT - 63 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-63

query I rowsort
SELECT cor0.col0 * 13 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1, col0
----
1079
338
559

query I rowsort
SELECT DISTINCT 9 FROM tab0 AS cor0 GROUP BY col1
----
9

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 7 col2 FROM tab1 GROUP BY tab1.col0
----
7

query I rowsort
SELECT DISTINCT 65 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
65

query I rowsort
SELECT DISTINCT ( 68 * + cor0.col2 ) + - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
3886
5293
5829

query I rowsort
SELECT ALL cor0.col1 * 6 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
486

query I rowsort
SELECT ALL - 65 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-65
-65
-65

query I rowsort
SELECT DISTINCT - 89 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-89

query I rowsort
SELECT DISTINCT + col0 - cor0.col0 FROM tab0 cor0 GROUP BY col0
----
0

query I rowsort
SELECT ALL + 44 * 33 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1452
1452
1452

query I rowsort
SELECT DISTINCT - ( + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1601
SELECT ALL - cor0.col2 + cor0.col2 * - cor0.col2 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1601
SELECT ALL - cor0.col2 + cor0.col2 * - cor0.col2 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-1602
SELECT - 17 DIV cor0.col2 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1602
SELECT - 17 / cor0.col2 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 15 * 7 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
105

query I rowsort
SELECT DISTINCT - cor0.col1 * - cor0.col1 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
274999
323727
97498

query I rowsort
SELECT - 21 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
5
62

query I rowsort
SELECT + 20 FROM tab1 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT ALL cor0.col0 * + col0 * + 47 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
10575
389207
397808

query I rowsort
SELECT 52 FROM tab1 AS cor0 GROUP BY cor0.col2
----
52
52
52

query I rowsort
SELECT ALL + ( cor0.col1 ) * + 98 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4312
5586
588

query I rowsort
SELECT DISTINCT - cor0.col0 + ( - cor0.col0 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-164
-44
-56

query I rowsort
SELECT ALL - 0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT - 64 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2624
3776
3904

query I rowsort
SELECT ALL col1 * - cor0.col1 * + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-185193
-216
-85184

query I rowsort
SELECT ALL - - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT - - ( - col0 ) FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT 12 + - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-14
-31
-71

query I rowsort
SELECT cor0.col0 * - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT + 44 FROM tab2 AS cor0 GROUP BY cor0.col0
----
44
44
44

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1621
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1621
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT cor0.col2 * + 39 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1755
2769
312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col0 col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL + cor0.col2 * - cor0.col1 + - ( - cor0.col2 ) * cor0.col1 + - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

query III rowsort
SELECT ALL * FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

query I rowsort
SELECT ALL 47 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
128
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT - 15 FROM tab1 AS cor0 GROUP BY col1
----
-15
-15
-15

query I rowsort
SELECT ALL + 63 FROM tab2 AS cor0 GROUP BY col1
----
63
63
63

query I rowsort
SELECT - 52 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1 GROUP BY tab2.col1
----
-52
-52
-52

query I rowsort
SELECT DISTINCT cor0.col2 * + 95 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5510
7505
8265

query I rowsort
SELECT + cor0.col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT ( - 81 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
-81

query I rowsort
SELECT + 69 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
127
148
156

query I rowsort
SELECT DISTINCT - ( col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-22
-28
-82

query I rowsort
SELECT 26 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT DISTINCT ( - cor0.col1 + - 72 ) AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-116
-129
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 3 col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-3
-3
-3

query I rowsort
SELECT ALL + tab1.col2 * 65 AS col2 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
2925
4615
520

query I rowsort
SELECT 4 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
4
4
4

query I rowsort
SELECT + col2 + + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1482
600
6320

query I rowsort
SELECT - cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - cor0.col1 + 60 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
16
3
54

query I rowsort
SELECT - 65 FROM tab0 cor0 GROUP BY cor0.col2
----
-65
-65
-65

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1645
SELECT CAST( NULL AS SIGNED ) * 39 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1645
SELECT CAST ( NULL AS INTEGER ) * 39 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-1646
SELECT + cor0.col2 DIV + 26 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-1646
SELECT + cor0.col2 / + 26 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
1
2

query I rowsort
SELECT - 58 FROM tab1 GROUP BY tab1.col2
----
-58
-58
-58

query I rowsort
SELECT ALL col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 - cor0.col2 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1406
-552
-6162

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-1651
SELECT - cor0.col1 + + cor0.col1 DIV col1 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-125
-27
-84

skipif mysql # not compatible
query I rowsort label-1651
SELECT - cor0.col1 + + cor0.col1 / col1 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-125
-27
-84

query I rowsort
SELECT ALL tab0.col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1654
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1654
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL ( + 4 ) FROM tab2 GROUP BY tab2.col1
----
4
4
4

query I rowsort
SELECT DISTINCT + 65 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5265

query I rowsort
SELECT ALL cor0.col1 * 72 FROM tab2 AS cor0 GROUP BY col1
----
2952
4248
4392

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1659
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1659
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 57 + cor0.col0 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
427
6667
727

query I rowsort
SELECT DISTINCT + 36 FROM tab0 AS cor0 GROUP BY col0
----
36

query I rowsort
SELECT DISTINCT 1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT + 68 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
68
68
68

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL 24 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
24
24
24

query I rowsort
SELECT 17 FROM tab1 AS cor0 GROUP BY cor0.col1
----
17
17
17

query I rowsort
SELECT DISTINCT - 4 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-4

query I rowsort
SELECT ALL 83 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
83
83
83

query I rowsort
SELECT - col1 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
205379
226981
68921

query I rowsort
SELECT - cor0.col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ( col0 * - cor0.col0 ) - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-240
-8372
-8556

query I rowsort
SELECT 50 * col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2200
2850
300

query I rowsort
SELECT cor0.col1 * + ( + ( + cor0.col1 ) ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT - 3 FROM tab2 AS cor0 GROUP BY col1
----
-3
-3
-3

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT 2 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
2
2
2

query I rowsort
SELECT DISTINCT + 23 FROM tab2 GROUP BY tab2.col2
----
23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1679
SELECT + CAST( col0 AS SIGNED ) * col0 + + ( + cor0.col0 + + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
1935
7055
728

skipif mysql # not compatible
query I rowsort label-1679
SELECT + CAST ( col0 AS INTEGER ) * col0 + + ( + cor0.col0 + + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
1935
7055
728

query I rowsort
SELECT ALL - 48 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-48
-48
-48

query I rowsort
SELECT - cor0.col1 - - 72 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
15
28
66

query I rowsort
SELECT ALL 76 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
76
76
76

query I rowsort
SELECT DISTINCT - 63 FROM tab1 AS cor0 GROUP BY col0, col1
----
-63

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT 41 * 15 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
615

query I rowsort
SELECT DISTINCT 74 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col1 FROM tab2 cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col1 * - 57 + + col1 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
1944

query I rowsort
SELECT col2 + col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT + 3 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
3

query I rowsort
SELECT DISTINCT 81 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + + 44 col2 FROM tab1 AS cor0 GROUP BY col2
----
-1
-27
36

query I rowsort
SELECT - 33 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-33
-33
-33

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
22
28
82

query I rowsort
SELECT ALL - 96 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-96
-96
-96

query I rowsort
SELECT + 49 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
49
49
49

query I rowsort
SELECT DISTINCT 83 FROM tab0 AS cor0 GROUP BY cor0.col2
----
83

query I rowsort
SELECT ALL 14 FROM tab0 AS cor0 GROUP BY col1
----
14
14

query I rowsort
SELECT DISTINCT - 48 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-48

query I rowsort
SELECT 72 AS col1 FROM tab0 cor0 GROUP BY col2
----
72
72
72

query I rowsort
SELECT - cor1.col1 FROM tab0, tab0 AS cor0, tab0 AS cor1 GROUP BY cor1.col1
----
-81
0

query I rowsort
SELECT ALL - 43 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-43
-43

onlyif mysql # DIV for integer division: 
query I rowsort label-1703
SELECT - + 17 DIV tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1703
SELECT - + 17 / tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT ALL + 98 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
98
98
98

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1705
SELECT CAST( - 79 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-79
-79
-79

skipif mysql # not compatible
query I rowsort label-1705
SELECT CAST ( - 79 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-79
-79
-79

query I rowsort
SELECT 86 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
101
177
178

query I rowsort
SELECT ALL + ( cor0.col0 + + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 17 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-17
-17
-17

query I rowsort
SELECT DISTINCT - 68 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-68

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT cor0.col2 * 47 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1128
1786
3713

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT ( cor0.col0 ) * 74 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1095
6643
6716

query I rowsort
SELECT DISTINCT + cor0.col2 * - 21 - - 84 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1575
-420
-714

query I rowsort
SELECT - 78 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-78
-78
-78

query I rowsort
SELECT ALL ( cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 88 col1 FROM tab1 GROUP BY tab1.col2
----
88
88
88

query I rowsort
SELECT ALL ( cor0.col2 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT 15 * ( - tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
-615
-885
-915

query I rowsort
SELECT cor0.col1 + + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
133
150
76

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 94 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-94

query I rowsort
SELECT DISTINCT - 50 FROM tab0 GROUP BY tab0.col2
----
-50

query I rowsort
SELECT 95 FROM tab2 cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT ALL cor0.col0 + + 90 AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
112
118
172

query I rowsort
SELECT ALL - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + 85 FROM tab1 AS cor0 GROUP BY cor0.col0
----
85
85
85

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT col1 + cor0.col1 * 42 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1763
2537
2623

query I rowsort
SELECT - tab1.col0 * ( 95 ) FROM tab1 GROUP BY tab1.col0
----
-2090
-2660
-7790

query I rowsort
SELECT ALL cor0.col0 + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
164
44
56

query I rowsort
SELECT + + 83 FROM tab2 GROUP BY tab2.col2
----
83
83
83

query I rowsort
SELECT ALL - 69 FROM tab2 GROUP BY tab2.col1
----
-69
-69
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 30 * - cor0.col2 FROM tab2 cor0 GROUP BY col2, cor0.col2
----
-1740
-2370
-2610

query I rowsort
SELECT DISTINCT - cor0.col2 - - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT cor0.col0 * + 7 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
182
301
581

query I rowsort
SELECT - 59 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-59
-59
-59

query I rowsort
SELECT DISTINCT - 27 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-27

query I rowsort
SELECT cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
6561

query I rowsort
SELECT DISTINCT - col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT + cor0.col2 + cor0.col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
159
159
20

query I rowsort
SELECT 53 FROM tab0 AS cor0 GROUP BY col1
----
53
53

query I rowsort
SELECT DISTINCT + 11 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
11

query I rowsort
SELECT ( - 7 ) AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
-7
-7
-7

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + 23 AS col0 FROM tab0 GROUP BY tab0.col1
----
23

query I rowsort
SELECT ALL 69 FROM tab0 AS cor0 GROUP BY col1
----
69
69

query I rowsort
SELECT DISTINCT + 30 FROM tab1 GROUP BY tab1.col2
----
30

query I rowsort
SELECT ALL - 23 FROM tab1 GROUP BY tab1.col0
----
-23
-23
-23

query I rowsort
SELECT 7 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
13
51
64

query I rowsort
SELECT DISTINCT + 76 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
76

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1757
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1757
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT 0 AS col1 FROM tab2, tab1 cor0, tab1 AS cor1 GROUP BY cor1.col0
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-1759
SELECT ALL - CAST( col2 AS SIGNED ) DIV col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1759
SELECT ALL - CAST ( col2 AS INTEGER ) / col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL 85 FROM tab0 AS cor0 GROUP BY cor0.col1
----
85
85

query I rowsort
SELECT - cor1.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 25 col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-25
-25
-25

query I rowsort
SELECT DISTINCT 26 FROM tab1 AS cor0 GROUP BY cor0.col2
----
26

query I rowsort
SELECT - - 65 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
110
136
73

query I rowsort
SELECT 54 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
54
54
54

query I rowsort
SELECT - col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, col1
----
-58
-79
-87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1767
SELECT ALL CAST( NULL AS SIGNED ) col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1767
SELECT ALL CAST ( NULL AS INTEGER ) col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT 51 FROM tab0 AS cor0 GROUP BY cor0.col0
----
51
51
51

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT 6 - 60 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-54

query I rowsort
SELECT cor0.col0 + + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
164
44
56

query I rowsort
SELECT DISTINCT - col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT + cor0.col0 + + cor0.col0 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - 47 + + cor0.col2 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3317
6194
7522

query I rowsort
SELECT DISTINCT + - 28 FROM tab2 GROUP BY tab2.col0
----
-28

query I rowsort
SELECT - 54 + - cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
-1990
-3303
-90

query I rowsort
SELECT - cor0.col2 * + cor0.col2 + + ( cor0.col1 ) * cor0.col1 * - 27 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1444
-177723
-6241

query I rowsort
SELECT ALL col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT + 89 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 51 col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
51
51
51

query I rowsort
SELECT 40 * - 69 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2760
-2760
-2760

onlyif mysql # DIV for integer division: 
query I rowsort label-1784
SELECT DISTINCT + tab1.col2 DIV tab1.col2 col1 FROM tab1 GROUP BY col2
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1784
SELECT DISTINCT + tab1.col2 / tab1.col2 col1 FROM tab1 GROUP BY col2
----
1

query I rowsort
SELECT cor0.col2 + col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT + 41 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
2419
2501

query I rowsort
SELECT ALL - ( + col1 ) + 76 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-5
76

query I rowsort
SELECT cor0.col0 * - cor0.col0 * 73 FROM tab0 cor0 GROUP BY col0
----
-134977
-49348
-502897

query I rowsort
SELECT ALL 44 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING ( NULL ) = NULL
----

query I rowsort
SELECT ALL - 38 AS col0 FROM tab0 GROUP BY tab0.col0
----
-38
-38
-38

query I rowsort
SELECT DISTINCT + ( col0 ) FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT + col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-1794
SELECT - cor0.col1 * + 26 + cor0.col1 DIV - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col1, cor0.col2
----
-2109
0
0

skipif mysql # not compatible
query I rowsort label-1794
SELECT - cor0.col1 * + 26 + cor0.col1 / - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col1, cor0.col2
----
-2109
0
0

query I rowsort
SELECT - 54 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-54
-54
-54

query I rowsort
SELECT DISTINCT - + 52 FROM tab0, tab2 AS cor0, tab2 AS cor1 GROUP BY tab0.col2
----
-52

query I rowsort
SELECT 4 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
4
4
4

query I rowsort
SELECT DISTINCT + cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor0.col1
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * - 76 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1976
-3268
-6308

query I rowsort
SELECT DISTINCT 46 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
46

query I rowsort
SELECT ALL ( + 50 ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
50
50
50

query III rowsort
SELECT * FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT DISTINCT tab0.col2 * + ( tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

onlyif mysql # DIV for integer division: 
query I rowsort label-1804
SELECT ALL - 94 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-3
-4

skipif mysql # not compatible
query I rowsort label-1804
SELECT ALL - 94 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-3
-4

query I rowsort
SELECT 80 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
1200
7280
7360

query I rowsort
SELECT + + ( + 27 ) AS col2 FROM tab2, tab0 cor0 GROUP BY cor0.col0
----
27
27
27

query I rowsort
SELECT ALL - 71 FROM tab1 GROUP BY tab1.col0
----
-71
-71
-71

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1808
SELECT ALL + CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1808
SELECT ALL + CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( - cor0.col0 + 54 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-29
11
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col0 ) * col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
1032
2054
3154

query I rowsort
SELECT + tab2.col1 * tab2.col1 * tab2.col1 FROM tab2 GROUP BY col1
----
205379
226981
68921

query I rowsort
SELECT + 25 FROM tab1 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT ( cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL - + 39 AS col0 FROM tab2 GROUP BY tab2.col1
----
-39
-39
-39

query I rowsort
SELECT DISTINCT - 74 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-31
-48
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 99 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
99

query I rowsort
SELECT DISTINCT + 49 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
49

query I rowsort
SELECT ALL ( - 84 ) * cor0.col0 * cor0.col0 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-18900
-695604
-710976

query I rowsort
SELECT - 61 + cor0.col2 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-3
18
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1822
SELECT DISTINCT CAST( NULL AS SIGNED ) * cor0.col0 + col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1822
SELECT DISTINCT CAST ( NULL AS INTEGER ) * cor0.col0 + col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
NULL

query I rowsort
SELECT ALL + 42 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
42
42

query I rowsort
SELECT ALL 63 * + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
2583
3717
3843

query I rowsort
SELECT ALL - 19 * 24 * + col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-26448
-36024
-39672

query I rowsort
SELECT DISTINCT 5 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
5

query I rowsort
SELECT - cor0.col2 + 20 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-38
-59
-67

query I rowsort
SELECT ALL - 10 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-10
-10
-10

query I rowsort
SELECT ALL ( - cor0.col0 ) * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL 16 FROM tab1 AS cor0 GROUP BY cor0.col2
----
16
16
16

query I rowsort
SELECT - cor0.col2 + + cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - 60 AS col2 FROM tab2, tab1 cor0 GROUP BY tab2.col0
----
-60
-60
-60

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT col1 * - ( - 82 ) + + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
3454
4929
5017

query I rowsort
SELECT DISTINCT - cor0.col0 * 82 FROM tab1 cor0 GROUP BY cor0.col0
----
-1804
-2296
-6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 col2 FROM tab1 WHERE NOT col1 * col2 = ( + col1 ) GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT tab1.col2 * - col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT 60 FROM tab2 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT DISTINCT - 22 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-22

query I rowsort
SELECT ALL 60 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
60
60
60

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1841
SELECT cor0.col0 * CAST( - cor0.col0 * cor0.col0 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-10648
-21952
-551368

skipif mysql # not compatible
query I rowsort label-1841
SELECT cor0.col0 * CAST ( - cor0.col0 * cor0.col0 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-10648
-21952
-551368

query I rowsort
SELECT tab0.col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY col1, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + 28 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
28

query I rowsort
SELECT cor1.col0 AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT ALL 22 FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor1.col1
----
22
22
22

query I rowsort
SELECT DISTINCT cor0.col1 * - col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT 7 FROM tab0 cor0 GROUP BY cor0.col1
----
7
7

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
26
43
83

query I rowsort
SELECT - 9 + - col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-9
-90

query I rowsort
SELECT ALL - 91 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-91
-91
-91

query I rowsort
SELECT DISTINCT 21 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor1.col1
----
21

query I rowsort
SELECT ALL ( + 71 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
71
71
71

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT DISTINCT 39 AS col1 FROM tab2 AS cor0 GROUP BY col0, col2
----
39

query I rowsort
SELECT DISTINCT 0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1857
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1857
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT DISTINCT col0 + - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + 67 FROM tab0 AS cor0 GROUP BY cor0.col1
----
67
67

query I rowsort
SELECT ALL + 47 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
47
47

query I rowsort
SELECT ALL + cor0.col2 FROM tab2, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + cor1.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 53 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col1
----
53

query I rowsort
SELECT ALL - 40 AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1 GROUP BY tab1.col2
----
-40
-40
-40

query I rowsort
SELECT ALL col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1868
SELECT + - CAST( NULL AS SIGNED ) * 99 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1868
SELECT + - CAST ( NULL AS INTEGER ) * 99 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT + 65 - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
24
4
6

query I rowsort
SELECT - cor0.col2 * cor0.col0 + col0 * 92 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2924
338
4482

query I rowsort
SELECT DISTINCT 40 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
40

query I rowsort
SELECT DISTINCT + 62 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
62

query I rowsort
SELECT + cor0.col1 * + 56 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4536

query I rowsort
SELECT ALL col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - - 62 FROM tab1 GROUP BY tab1.col2
----
62

query I rowsort
SELECT + 87 FROM tab2 cor0 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 * - cor0.col0 * 14 FROM tab2 cor0 GROUP BY cor0.col0
----
116025
118588
3165

query I rowsort
SELECT - ( 6 ) * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-246
-354
-366

query I rowsort
SELECT cor0.col0 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
133
150
76

query I rowsort
SELECT DISTINCT ( + cor0.col2 * + cor0.col0 + cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1075
2080
3237

query I rowsort
SELECT ALL - + 26 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-26
-26
-26

query I rowsort
SELECT + 35 FROM tab2 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT DISTINCT ( 92 ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
92

onlyif mysql # DIV for integer division: 
query I rowsort label-1886
SELECT 81 DIV + 33 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
2
2
2

skipif mysql # not compatible
query I rowsort label-1886
SELECT 81 / + 33 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
2
2
2

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1887
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1887
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
NULL
NULL

query I rowsort
SELECT ALL + 73 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL - cor0.col0 * 84 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2184
-3612
-6972

query I rowsort
SELECT DISTINCT tab2.col1 * - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT + 10 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
10

query III rowsort
SELECT ALL * FROM tab2 AS cor0 GROUP BY col2, cor0.col0, cor0.col1
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

query I rowsort
SELECT ALL - cor0.col1 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab1, tab1 cor0, tab0 cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 27 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - cor0.col0 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - 48 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-48
-48
-48

query I rowsort
SELECT + 93 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3813
5487
5673

query I rowsort
SELECT 45 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
102
51
89

query I rowsort
SELECT cor0.col0 + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT - cor0.col0 + 73 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-9
45
51

query I rowsort
SELECT ALL + 25 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT ALL ( + 84 ) FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
84
84

query I rowsort
SELECT + 90 FROM tab1 AS cor0 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT - 19 - + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-110
-111
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 24 col2 FROM tab2 cor0 GROUP BY cor0.col2
----
24

query I rowsort
SELECT DISTINCT cor0.col1 + + 99 FROM tab0 cor0 GROUP BY cor0.col1
----
180
99

query I rowsort
SELECT ALL 75 FROM tab1 AS cor0 GROUP BY cor0.col1
----
75
75
75

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1912
SELECT ALL cor0.col2 + - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1912
SELECT ALL cor0.col2 + - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 82 - + 9 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-91

query I rowsort
SELECT ALL + + cor0.col0 + 37 FROM tab2, tab1 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
119
59
65

onlyif mysql # DIV for integer division: 
query I rowsort label-1915
SELECT 65 * cor0.col2 DIV - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-65
-65
-65

skipif mysql # not compatible
query I rowsort label-1915
SELECT 65 * cor0.col2 / - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-65
-65
-65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + cor0.col1 ) * cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, col0
----
-3772
-5369
-915

query I rowsort
SELECT DISTINCT ( - ( cor0.col0 ) + - 3 ) FROM tab1 AS cor0 GROUP BY col0, cor0.col1, cor0.col1
----
-25
-31
-85

onlyif mysql # DIV for integer division: 
query I rowsort label-1918
SELECT ALL - + cor0.col1 DIV 93 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1918
SELECT ALL - + cor0.col1 / 93 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT cor0.col1 * - 28 FROM tab0 cor0 GROUP BY cor0.col1
----
-2268
0

query I rowsort
SELECT DISTINCT cor0.col0 * col1 + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
138
1653
3652

query I rowsort
SELECT DISTINCT + - 40 FROM tab2 GROUP BY tab2.col2
----
-40

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
490
6768
841

query I rowsort
SELECT + 7 + 10 FROM tab2 AS cor0 GROUP BY cor0.col1
----
17
17
17

query I rowsort
SELECT cor0.col2 * cor0.col2 + cor0.col0 * col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1608
4598
8295

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + - col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1928
SELECT - CAST( NULL AS SIGNED ) + - 71 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1928
SELECT - CAST ( NULL AS INTEGER ) + - 71 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 98 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
98

query I rowsort
SELECT ALL 23 FROM tab0 GROUP BY tab0.col1
----
23
23

query I rowsort
SELECT + 22 FROM tab1 AS cor0 GROUP BY col1
----
22
22
22

query I rowsort
SELECT + 21 FROM tab0 AS cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT DISTINCT - 50 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-50

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - - tab1.col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT 28 + 88 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
116
116
116

query I rowsort
SELECT 11 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
11
11
11

onlyif mysql # DIV for integer division: 
query I rowsort label-1939
SELECT + cor0.col2 * - col0 + - cor0.col2 DIV 41 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-1032
-2055
-3154

skipif mysql # not compatible
query I rowsort label-1939
SELECT + cor0.col2 * - col0 + - cor0.col2 / 41 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-1032
-2055
-3154

onlyif mysql # DIV for integer division: 
query I rowsort label-1940
SELECT DISTINCT + cor0.col2 DIV - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-1940
SELECT DISTINCT + cor0.col2 / - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1

query I rowsort
SELECT DISTINCT 78 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
78

query I rowsort
SELECT DISTINCT 33 + - cor0.col0 * cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-1816
-643
-6856

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 79 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
79

query I rowsort
SELECT ALL + 52 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
52
52
52

query I rowsort
SELECT + ( - 85 ) AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-85
-85
-85

query I rowsort
SELECT 9 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
9
9
9

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1948
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2 cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1948
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2 cor0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT 85 FROM tab1 AS cor0 GROUP BY cor0.col1
----
85
85
85

query I rowsort
SELECT + ( tab0.col2 ) - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 * + col1 + 49 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
137973
368268
461758

query I rowsort
SELECT ALL - ( + cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - cor0.col0 * cor0.col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL 43 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2494
3397
3741

query I rowsort
SELECT cor0.col0 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
3772
5369
915

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT DISTINCT + 22 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
22

query I rowsort
SELECT - 44 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-44
-44
-44

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1960
SELECT DISTINCT CAST( 57 AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
57

skipif mysql # not compatible
query I rowsort label-1960
SELECT DISTINCT CAST ( 57 AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT + 36 FROM tab2 AS cor0 GROUP BY col1
----
36
36
36

query I rowsort
SELECT ALL cor0.col2 * 63 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2, cor1.col0
----
9 values hashing to 9297ec81de4b8c6e4a481919a0d9504a

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col1 * 60 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-2558
-338
-3392

query I rowsort
SELECT + + 78 FROM tab2, tab0 cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT - 79 FROM tab0, tab2 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
-79
-79
-79

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, col1
----
24
38
79

query I rowsort
SELECT DISTINCT - 42 * cor0.col1 + col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1777
-2349
-244

query I rowsort
SELECT col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab0, tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT 45 * - col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-4095
-4140
-675

query I rowsort
SELECT ALL ( cor0.col1 ) + 94 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
100
138
151

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor1.col0
----
9 values hashing to 4fe903723f7427a19598c1293ff90703

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT 17 FROM tab0 AS cor0 GROUP BY cor0.col2
----
17

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1978
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1978
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ( cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT 14 * 19 - - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
324
345
353

onlyif mysql # DIV for integer division: 
query I rowsort label-1981
SELECT DISTINCT 78 DIV 57 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-1981
SELECT DISTINCT 78 / 57 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT - 83 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-83
-83
-83

query I rowsort
SELECT DISTINCT 83 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
83

query I rowsort
SELECT ALL 43 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3913
3956
645

query I rowsort
SELECT - cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT 44 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
44
44
44

query I rowsort
SELECT + 35 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT 64 FROM tab1 cor0 GROUP BY cor0.col1
----
64
64
64

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 38 col0 FROM tab1 AS cor0 GROUP BY col1
----
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-1994
SELECT ALL + col0 DIV - 28 - 11 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-11
-12
-13

skipif mysql # not compatible
query I rowsort label-1994
SELECT ALL + col0 / - 28 - 11 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-11
-12
-13

query I rowsort
SELECT ALL - cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY col1, col1
----
0
6561

query I rowsort
SELECT 53 FROM tab2 AS cor0 GROUP BY cor0.col0
----
53
53
53

query I rowsort
SELECT + 88 * + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1936
2464
7216

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT - 57 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, col2, cor0.col2
----
-2565
-4047
-456

query I rowsort
SELECT cor0.col1 * + ( + 47 ) + cor0.col1 * + 60 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
8667

query I rowsort
SELECT 39 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
39
39
39

query I rowsort
SELECT DISTINCT - ( + cor0.col0 ) FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2, cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 42 FROM tab1 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT - col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - cor0.col2 * - 82 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
4756
6478
7134

query I rowsort
SELECT ALL - 34 FROM tab1 AS cor0 GROUP BY col0
----
-34
-34
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 19 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
19

query I rowsort
SELECT ALL - 56 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
-56
-56
-56

query I rowsort
SELECT ALL col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + cor0.col0 * cor0.col0 * ( 18 ) AS col1 FROM tab2 cor0 GROUP BY col0, col1, cor0.col1
----
149058
152352
4050

query I rowsort
SELECT 85 FROM tab1 AS cor0 GROUP BY cor0.col0
----
85
85
85

query I rowsort
SELECT ALL 5 FROM tab0 AS cor0 GROUP BY cor0.col0
----
5
5
5

query I rowsort
SELECT DISTINCT - col2 * - ( + cor0.col2 ) * 98 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
198450
494018
6272

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT 59 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
59
59
59

query I rowsort
SELECT 37 + 57 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
94
94

query I rowsort
SELECT - + cor0.col2 AS col0 FROM tab1, tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + 82 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - tab1.col0 + - tab1.col0 * col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-506
-6806
-812

query I rowsort
SELECT 50 FROM tab0 AS cor0 GROUP BY cor0.col1
----
50
50

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2027
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-2027
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT cor0.col2 * ( - 88 ) * cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-114840
-469568
-632632

query I rowsort
SELECT - ( 22 * cor0.col1 ) - + 15 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1313
-1357
-917

query I rowsort
SELECT DISTINCT - 9 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-9

query I rowsort
SELECT ALL + 72 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
72
72
72

query I rowsort
SELECT DISTINCT + cor0.col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT - ( - cor0.col1 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT - 83 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-83
-83
-83

query I rowsort
SELECT DISTINCT col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT tab2.col0 FROM tab2, tab1 cor0 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col2 + 14 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
22
59
85

query I rowsort
SELECT ALL - cor0.col2 * cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT - - 27 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
27
27
27

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT ALL + 63 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
63
63
63

query I rowsort
SELECT 80 FROM tab2 AS cor0 GROUP BY cor0.col0
----
80
80
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 93 * cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4185
-6603
-744

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL col1 * cor0.col1 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
14
1854
3221

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2047
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2047
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 5 FROM tab2 GROUP BY col0
----
5
5
5

query I rowsort
SELECT + cor0.col1 * col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL + col0 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2052
SELECT - CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2052
SELECT - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT ALL 34 * - 24 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-733
-773
-790

query I rowsort
SELECT 52 FROM tab2 cor0 GROUP BY cor0.col2
----
52
52
52

query I rowsort
SELECT + col2 * 44 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1980
3124
352

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2056
SELECT DISTINCT - CAST( + 35 AS SIGNED ) + + cor0.col1 * 70 FROM tab2 AS cor0 GROUP BY col1
----
2835
4095
4235

skipif mysql # not compatible
query I rowsort label-2056
SELECT DISTINCT - CAST ( + 35 AS INTEGER ) + + cor0.col1 * 70 FROM tab2 AS cor0 GROUP BY col1
----
2835
4095
4235

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2057
SELECT ALL - CAST( NULL AS DECIMAL ) AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2057
SELECT ALL - CAST ( NULL AS REAL ) AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT + tab0.col1 + col1 AS col2 FROM tab0 GROUP BY col1
----
0
162

query I rowsort
SELECT + cor0.col2 + - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 75 FROM tab1 AS cor0 GROUP BY cor0.col0
----
75

query I rowsort
SELECT DISTINCT 93 FROM tab2 GROUP BY col1
----
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 76 col0 FROM tab1 GROUP BY tab1.col1
----
-76
-76
-76

query I rowsort
SELECT + 45 FROM tab0, tab2 AS cor0, tab2 AS cor1 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT ALL + 48 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
48
48
48

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2065
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2065
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT ALL + 8 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
8
8
8

query I rowsort
SELECT DISTINCT - col2 * col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-2025
-5041
-64

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2069
SELECT DISTINCT - CAST( NULL AS SIGNED ) * - 66 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2069
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * - 66 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT ALL - 88 * ( + cor0.col1 ) + 60 + - 9 FROM tab2 AS cor0 GROUP BY col1
----
-3557
-5141
-5317

onlyif mysql # DIV for integer division: 
query I rowsort label-2071
SELECT - 88 * cor0.col2 DIV 15 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-340
-463
-510

skipif mysql # not compatible
query I rowsort label-2071
SELECT - 88 * cor0.col2 / 15 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-340
-463
-510

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, col1
----
45
71
8

query I rowsort
SELECT ALL - - 58 + + 37 AS col1 FROM tab2 GROUP BY tab2.col0
----
95
95
95

query I rowsort
SELECT DISTINCT 89 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
89

query III rowsort
SELECT ALL * FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT + cor0.col2 + - col2 AS col0 FROM tab0 cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT - 57 * - cor0.col0 + cor0.col2 * 77 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
4299
7565
7657

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT ALL 98 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
98
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 - + ( 72 * + col1 ) col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-3010
-4327
-4479

query I rowsort
SELECT - 44 * 1 FROM tab2 GROUP BY col0
----
-44
-44
-44

query I rowsort
SELECT + cor0.col1 + 30 FROM tab1 AS cor0 GROUP BY cor0.col1
----
36
74
87

query I rowsort
SELECT ( 21 ) * + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1722
462
588

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2084
SELECT + - CAST( NULL AS DECIMAL ) + - 56 AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2084
SELECT + - CAST ( NULL AS REAL ) + - 56 AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT + ( + 28 * + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
2548
2576
420

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
1444
576
6241

query I rowsort
SELECT - + 18 AS col2 FROM tab0 GROUP BY tab0.col2
----
-18
-18
-18

query I rowsort
SELECT - col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + - 85 col0 FROM tab0 cor0 GROUP BY col1
----
-4
-85

query I rowsort
SELECT DISTINCT - tab1.col1 + + col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT ALL 27 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
106
51
65

query I rowsort
SELECT DISTINCT + 65 AS col2 FROM tab0 GROUP BY tab0.col2
----
65

query I rowsort
SELECT ALL - 28 * col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1232
-1596
-168

query I rowsort
SELECT - 28 + - col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, col0
----
-3392
-6269
-7597

query I rowsort
SELECT DISTINCT ( 43 ) FROM tab0 cor0 GROUP BY col2
----
43

query I rowsort
SELECT + - ( + tab1.col1 ) - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + 90 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
47
64
7

query I rowsort
SELECT DISTINCT 20 * 85 AS col1 FROM tab2 GROUP BY tab2.col1
----
1700

query I rowsort
SELECT - + 76 FROM tab1 GROUP BY tab1.col1
----
-76
-76
-76

query I rowsort
SELECT DISTINCT - 47 FROM tab1 GROUP BY tab1.col0
----
-47

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab0 cor0 GROUP BY col0
----
-26
-43
-83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2104
SELECT cor0.col1 * - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2104
SELECT cor0.col1 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT ALL + + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT 42 * 15 AS col2 FROM tab1 GROUP BY tab1.col0
----
630
630
630

query I rowsort
SELECT col2 + + 27 * 38 AS col1 FROM tab1 GROUP BY tab1.col2
----
1034
1071
1097

query I rowsort
SELECT DISTINCT + NULLIF ( + cor0.col0, 1 ) FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
15
91
92

query I rowsort
SELECT DISTINCT + ( - 68 ) FROM tab0 GROUP BY tab0.col0
----
-68

query I rowsort
SELECT DISTINCT + + 14 AS col0 FROM tab1 GROUP BY tab1.col2
----
14

query I rowsort
SELECT DISTINCT - ( + 86 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-86

query I rowsort
SELECT DISTINCT + 55 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1210
1540
4510

query I rowsort
SELECT DISTINCT ( + 51 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
51

query I rowsort
SELECT DISTINCT ( cor0.col0 ) - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT + + 53 FROM tab2 GROUP BY tab2.col1
----
53
53
53

query I rowsort
SELECT DISTINCT + 78 FROM tab0 AS cor0 GROUP BY col2
----
78

query I rowsort
SELECT - 38 FROM tab0 GROUP BY tab0.col2
----
-38
-38
-38

query I rowsort
SELECT + + 87 FROM tab0 GROUP BY tab0.col2
----
87
87
87

query I rowsort
SELECT + 30 * + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1290
2490
780

query I rowsort
SELECT 69 * - tab0.col2 + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1632
-2584
-5372

query I rowsort
SELECT DISTINCT - cor0.col0 * 35 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3185
-3220
-525

query I rowsort
SELECT DISTINCT tab1.col2 AS col1 FROM tab1, tab1 AS cor0 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT cor0.col2 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2124
SELECT cor0.col2 + - col2 DIV cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
44
7
70

skipif mysql # not compatible
query I rowsort label-2124
SELECT cor0.col2 + - col2 / cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
44
7
70

query I rowsort
SELECT - 10 FROM tab1 GROUP BY tab1.col1
----
-10
-10
-10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 65 col1 FROM tab0 GROUP BY tab0.col1
----
65
65

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - 54, + cor0.col1 * + NULLIF ( + cor0.col1, cor0.col0 ), - cor0.col1 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT 0 AS col1 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT - - tab2.col0 * 80 AS col0 FROM tab2 GROUP BY tab2.col0
----
1200
7280
7360

query I rowsort
SELECT DISTINCT col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0, cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab2.col1 * - 69 col1 FROM tab2 GROUP BY tab2.col1
----
2829
4071
4209

query I rowsort
SELECT ALL - cor0.col2 * + COALESCE ( cor0.col2 * cor0.col1, + cor0.col1 ) + + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-137883
-368160
-461648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 50 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-50
-50
-50

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT 42 AS col1 FROM tab0 GROUP BY tab0.col2
----
42
42
42

query I rowsort
SELECT DISTINCT + 16 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
16

query I rowsort
SELECT ALL - col1 AS col0 FROM tab0 GROUP BY tab0.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL - col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT - tab1.col2 + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL col0 FROM tab1 WHERE NULL NOT IN ( col1 * tab1.col0 ) GROUP BY tab1.col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 45 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT cor0.col1 * cor0.col1 + - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
1865
28
3204

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
58
79
87

query I rowsort
SELECT 51 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor1.col2
----
51
51
51

query I rowsort
SELECT DISTINCT col2 + 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
111
48
85

query I rowsort
SELECT ALL cor0.col0 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT ALL + 13 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
13
13
13

query I rowsort
SELECT DISTINCT + tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 21 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-21
-21
-21

query I rowsort
SELECT DISTINCT - 72 FROM tab1 GROUP BY tab1.col2
----
-72

onlyif mysql # DIV for integer division: 
query I rowsort label-2152
SELECT ALL + cor0.col0 - cor0.col0 DIV ( + 50 + 42 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

skipif mysql # not compatible
query I rowsort label-2152
SELECT ALL + cor0.col0 - cor0.col0 / ( + 50 + 42 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + + col1 * tab0.col1 + + 25 AS col0 FROM tab0 GROUP BY tab0.col1
----
25
6586

query I rowsort
SELECT DISTINCT + 67 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
67

query I rowsort
SELECT - 5 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-5
-5
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 + - tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2157
SELECT + cor0.col0 * + CAST( NULL AS SIGNED ) + 23 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2157
SELECT + cor0.col0 * + CAST ( NULL AS INTEGER ) + 23 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + 27 FROM tab0 GROUP BY tab0.col0
----
27
27
27

query I rowsort
SELECT + 22 AS col2 FROM tab2 GROUP BY tab2.col0
----
22
22
22

query I rowsort
SELECT DISTINCT - 97 + + 93 AS col0 FROM tab1 GROUP BY tab1.col0
----
-4

query I rowsort
SELECT DISTINCT - 75 FROM tab1 GROUP BY tab1.col0
----
-75

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 46 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
46
46

query I rowsort
SELECT 21 - cor0.col2 * 9 FROM tab0 AS cor0 GROUP BY col2
----
-195
-321
-690

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2165
SELECT + + tab0.col0 + CAST( NULL AS SIGNED ) * 34 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2165
SELECT + + tab0.col0 + CAST ( NULL AS INTEGER ) * 34 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT tab0.col0 + 93 AS col1 FROM tab0 GROUP BY tab0.col0
----
119
136
176

query I rowsort
SELECT ALL cor0.col1 + 5 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
46
64
66

query I rowsort
SELECT cor0.col0 * col0 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + 45 FROM tab1 GROUP BY tab1.col2
----
45

query I rowsort
SELECT - - 74 + col2 AS col1 FROM tab0 GROUP BY col2
----
112
153
98

onlyif mysql # DIV for integer division: 
query I rowsort label-2171
SELECT DISTINCT - tab2.col0 * + NULLIF ( - tab2.col0 + tab2.col0 DIV tab2.col0, 74 * - tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
210
8190
8372

skipif mysql # not compatible
query I rowsort label-2171
SELECT DISTINCT - tab2.col0 * + NULLIF ( - tab2.col0 + tab2.col0 / tab2.col0, 74 * - tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
210
8190
8372

query I rowsort
SELECT DISTINCT - col1 + + 52 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-2173
-3127
-3233

query I rowsort
SELECT 1 FROM tab2 AS cor0 GROUP BY col0
----
1
1
1

query I rowsort
SELECT - 53 FROM tab1 GROUP BY tab1.col0
----
-53
-53
-53

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
1944

query I rowsort
SELECT ALL - 14 FROM tab0 GROUP BY tab0.col2
----
-14
-14
-14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 8 AS col2 FROM tab0 GROUP BY tab0.col2
----
8

query I rowsort
SELECT DISTINCT - + 3 FROM tab2 GROUP BY col1
----
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 75 + col2 col1 FROM tab0 GROUP BY tab0.col2
----
113
154
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 19 col2 FROM tab0 GROUP BY col0
----
-19

query I rowsort
SELECT 8 FROM tab2 cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT cor0.col0 + + 64 FROM tab0 cor0 GROUP BY cor0.col0
----
107
147
90

query I rowsort
SELECT - COALESCE ( tab2.col2, col2 ) FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + 78 FROM tab1 GROUP BY tab1.col2
----
78
78
78

onlyif mysql # DIV for integer division: 
query I rowsort label-2186
SELECT cor0.col0 + cor0.col0 DIV - 57 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
82

skipif mysql # not compatible
query I rowsort label-2186
SELECT cor0.col0 + cor0.col0 / - 57 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
82

query I rowsort
SELECT DISTINCT + + tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL - 34 FROM tab2 cor0 GROUP BY cor0.col2
----
-34
-34
-34

query I rowsort
SELECT + 1 + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
45
58
7

query I rowsort
SELECT 63 FROM tab1 GROUP BY tab1.col1
----
63
63
63

query I rowsort
SELECT DISTINCT - cor0.col1 + 85 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
28
41
79

query I rowsort
SELECT ALL + 13 FROM tab1 GROUP BY tab1.col1
----
13
13
13

query I rowsort
SELECT DISTINCT + 63 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
63

query I rowsort
SELECT + 12 FROM tab1 GROUP BY tab1.col2
----
12
12
12

query I rowsort
SELECT ALL - tab2.col2 * + tab2.col2 - 43 AS col0 FROM tab2 GROUP BY tab2.col2
----
-3407
-6284
-7612

query I rowsort
SELECT - 23 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-23
-23
-23

query I rowsort
SELECT DISTINCT + tab1.col1 * - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT + 63 FROM tab1 GROUP BY tab1.col0
----
63
63
63

query I rowsort
SELECT DISTINCT - - 15 FROM tab0 GROUP BY tab0.col0
----
15

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2200
SELECT DISTINCT + cor0.col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-2200
SELECT DISTINCT + cor0.col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-2201
SELECT - col1 DIV 27 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-2
-2

skipif mysql # not compatible
query I rowsort label-2201
SELECT - col1 / 27 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-2
-2

query I rowsort
SELECT ALL 43 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT - 60 FROM tab2 GROUP BY tab2.col1
----
-60
-60
-60

query I rowsort
SELECT - 15 * tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-660
-855
-90

query I rowsort
SELECT - 52 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-52
-52
-52

query I rowsort
SELECT + - 11 AS col0 FROM tab0 GROUP BY tab0.col1
----
-11
-11

onlyif mysql # DIV for integer division: 
query I rowsort label-2207
SELECT + NULLIF ( - COALESCE ( - cor0.col2, cor0.col1 ), 79 ) DIV cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
NULL

skipif mysql # not compatible
query I rowsort label-2207
SELECT + NULLIF ( - COALESCE ( - cor0.col2, cor0.col1 ), 79 ) / cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
NULL

query I rowsort
SELECT 22 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
22
22

onlyif mysql # DIV for integer division: 
query I rowsort label-2209
SELECT + 1 DIV 11 + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

skipif mysql # not compatible
query I rowsort label-2209
SELECT + 1 / 11 + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT 28 + + col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
119
120
43

query I rowsort
SELECT 68 FROM tab2 GROUP BY tab2.col2
----
68
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 48 * - 78 col2 FROM tab1 GROUP BY col1
----
-3744

query I rowsort
SELECT DISTINCT - tab0.col0 * + 99 AS col0 FROM tab0 GROUP BY tab0.col0
----
-2574
-4257
-8217

query I rowsort
SELECT - col2 + 2 * col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT + 70 FROM tab1 AS cor0 GROUP BY cor0.col0
----
70
70
70

query I rowsort
SELECT ALL + + tab1.col2 + 18 AS col2 FROM tab1 GROUP BY tab1.col2
----
26
63
89

query I rowsort
SELECT ( + 92 ) FROM tab0 GROUP BY tab0.col0
----
92
92
92

query I rowsort
SELECT ALL 29 + + 0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT cor1.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 10 FROM tab2 GROUP BY col2
----
10

query I rowsort
SELECT DISTINCT + - 91 FROM tab1 GROUP BY col2
----
-91

onlyif mysql # DIV for integer division: 
query I rowsort label-2222
SELECT - tab0.col1 DIV + 39 AS col0 FROM tab0 GROUP BY tab0.col1
----
-2
0

skipif mysql # not compatible
query I rowsort label-2222
SELECT - tab0.col1 / + 39 AS col0 FROM tab0 GROUP BY tab0.col1
----
-2
0

query I rowsort
SELECT ALL + + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT col0 AS col2 FROM tab2 WHERE ( NULL ) >= NULL GROUP BY tab2.col0
----

query I rowsort
SELECT DISTINCT 17 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
17
98

query I rowsort
SELECT DISTINCT + - tab1.col2 * 15 FROM tab1 GROUP BY tab1.col2
----
-1065
-120
-675

query I rowsort
SELECT DISTINCT - + 77 AS col0 FROM tab2 GROUP BY tab2.col2
----
-77

query I rowsort
SELECT + 67 FROM tab0 GROUP BY tab0.col1
----
67
67

query I rowsort
SELECT ALL + 39 + + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
130
131
54

query I rowsort
SELECT ALL + - 49 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1274
-2107
-4067

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 50 col1 FROM tab2 GROUP BY col0
----
50
50
50

query I rowsort
SELECT DISTINCT - col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL - - 43 FROM tab1 GROUP BY tab1.col1
----
43
43
43

query I rowsort
SELECT ALL - 65 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-65
-65
-65

query I rowsort
SELECT DISTINCT ( 31 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
31

query I rowsort
SELECT DISTINCT 47 FROM tab1 GROUP BY tab1.col0
----
47

query I rowsort
SELECT ALL + + col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-2239
SELECT DISTINCT + cor0.col0 DIV col0 - cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-44
-7
-70

skipif mysql # not compatible
query I rowsort label-2239
SELECT DISTINCT + cor0.col0 / col0 - cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-44
-7
-70

query I rowsort
SELECT + 18 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT DISTINCT + tab1.col2 * col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT ALL 61 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
61
61
61

query I rowsort
SELECT + ( + cor0.col1 ) + - cor0.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor1.col2
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT + COALESCE ( + cor0.col1, cor0.col1 - 88 ) * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3483

query I rowsort
SELECT + 63 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
63
63
63

query I rowsort
SELECT ALL col0 + tab0.col0 * - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1806
-650
-6806

query I rowsort
SELECT - 47 AS col1 FROM tab2 GROUP BY tab2.col2
----
-47
-47
-47

query I rowsort
SELECT + 48 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
48
48
48

query I rowsort
SELECT + 83 AS col2 FROM tab0 GROUP BY tab0.col2
----
83
83
83

query I rowsort
SELECT DISTINCT + - 17 FROM tab2 GROUP BY tab2.col1
----
-17

query I rowsort
SELECT + 70 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
70
70
70

query I rowsort
SELECT DISTINCT + 55 FROM tab2 AS cor0 GROUP BY cor0.col0
----
55

query I rowsort
SELECT - tab1.col0 + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT + 75 FROM tab0 AS cor0 GROUP BY cor0.col2
----
75
75
75

query I rowsort
SELECT DISTINCT + - tab0.col0 - + tab0.col0 * + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1892
-6972
-702

query I rowsort
SELECT DISTINCT - tab0.col2 * col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT + 61 FROM tab2 GROUP BY tab2.col0
----
61
61
61

query I rowsort
SELECT - ( - tab2.col0 ) * tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT 69 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
69
69
69

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2260
SELECT ALL + cor1.col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2, cor1.col1, cor1.col2
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2260
SELECT ALL + cor1.col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2, cor1.col1, cor1.col2
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL 33 AS col0 FROM tab2 GROUP BY tab2.col1
----
33
33
33

query I rowsort
SELECT cor0.col2 - col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT cor0.col2 * + cor0.col2 + col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2070
5112
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + col1 col2 FROM tab0 cor0 GROUP BY col1
----
0
162

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 69, tab0.col0 + tab0.col1 ) FROM tab0 GROUP BY tab0.col2
----
69
69
69

query I rowsort
SELECT 76 AS col0 FROM tab0 GROUP BY tab0.col2
----
76
76
76

query I rowsort
SELECT cor0.col0 * - cor0.col0 + cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-210
-8190
-8372

query I rowsort
SELECT DISTINCT + ( - tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + 19 AS col0 FROM tab0 GROUP BY tab0.col0
----
19

query I rowsort
SELECT DISTINCT - 15 FROM tab0 GROUP BY tab0.col1
----
-15

query I rowsort
SELECT + 75 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
75
75
75

query I rowsort
SELECT 41 * 32 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
1312
1312
1312

query I rowsort
SELECT ALL ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-2276
SELECT DISTINCT col2 DIV - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-2276
SELECT DISTINCT col2 / - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0 cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT - col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT 34 FROM tab0 GROUP BY tab0.col0
----
34
34
34

query I rowsort
SELECT 17 AS col2 FROM tab0 GROUP BY tab0.col0
----
17
17
17

query I rowsort
SELECT - NULLIF ( - 14, tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
14
14
14

query I rowsort
SELECT DISTINCT 21 AS col2 FROM tab0 cor0 GROUP BY col0
----
21

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT - cor0.col0 * 86 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, col1
----
-2236
-3698
-7138

query I rowsort
SELECT - 67 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-67
-67
-67

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + + 18 - tab1.col2 * 34 AS col2 FROM tab1 GROUP BY col2
----
-1512
-2396
-254

query I rowsort
SELECT DISTINCT 24 FROM tab2 cor0 GROUP BY cor0.col2
----
24

query I rowsort
SELECT DISTINCT tab0.col0 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT 2 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
2
2
2

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2291
SELECT + CAST( NULL AS SIGNED ) * tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2291
SELECT + CAST ( NULL AS INTEGER ) * tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - NULLIF ( tab2.col1, tab2.col1 * col1 + + tab2.col1 ) col2 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT 24 * - 46 FROM tab2 AS cor0 GROUP BY col0
----
-1104
-1104
-1104

query I rowsort
SELECT 0 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT - 11 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-11
-11
-11

query I rowsort
SELECT 78 + - ( col0 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
-5
35
52

query I rowsort
SELECT + 91 AS col2 FROM tab1 GROUP BY tab1.col0
----
91
91
91

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0, col0
----
-26
-43
-83

query I rowsort
SELECT ALL + - tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL + 52 - - 38 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1, cor0.col2
----
90
90
90

query I rowsort
SELECT ALL + - 64 FROM tab2 GROUP BY col1
----
-64
-64
-64

query I rowsort
SELECT DISTINCT - 84 * 55 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-4620

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2303
SELECT DISTINCT cor0.col2 * + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2303
SELECT DISTINCT cor0.col2 * + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY col2
----
NULL

query I rowsort
SELECT DISTINCT - tab1.col1 * 35 FROM tab1 GROUP BY tab1.col1
----
-1540
-1995
-210

query I rowsort
SELECT ALL tab0.col2 - tab0.col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1406
-552
-6162

query I rowsort
SELECT + 41 AS col1 FROM tab1 GROUP BY tab1.col2
----
41
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - NULLIF ( - tab1.col0, tab1.col0 ) col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + 57 FROM tab2 GROUP BY tab2.col0
----
57

onlyif mysql # DIV for integer division: 
query I rowsort label-2309
SELECT DISTINCT ( 49 ) DIV + 12 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
4

skipif mysql # not compatible
query I rowsort label-2309
SELECT DISTINCT ( 49 ) / + 12 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 27 * + 98 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
2646
2646

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 67 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-67
-67

query I rowsort
SELECT + cor0.col0 * cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
1892
6972
702

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - cor0.col1 * cor0.col1 + - 11 FROM tab2 cor0 GROUP BY col1
----
-1692
-3492
-3732

onlyif mysql # DIV for integer division: 
query I rowsort label-2315
SELECT - 87 DIV col0 + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
10
91
92

skipif mysql # not compatible
query I rowsort label-2315
SELECT - 87 / col0 + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
10
91
92

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2317
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2317
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 98 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
98

query I rowsort
SELECT DISTINCT + 42 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
42

query I rowsort
SELECT DISTINCT - 24 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-24

onlyif mysql # DIV for integer division: 
query I rowsort label-2321
SELECT ALL + ( + cor0.col0 ) DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2321
SELECT ALL + ( + cor0.col0 ) / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT + 40 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
40
40
40

query I rowsort
SELECT DISTINCT - tab0.col1 * + 80 AS col0 FROM tab0 GROUP BY tab0.col1
----
-6480
0

query I rowsort
SELECT cor0.col2 + 94 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
102
139
165

query I rowsort
SELECT ALL cor0.col2 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 68 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
68
68
68

query I rowsort
SELECT 91 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2, col0
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - 40 + - 91 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-131
-131
-131

onlyif mysql # DIV for integer division: 
query I rowsort label-2330
SELECT ALL cor0.col1 + + cor0.col1 DIV - col1 col0 FROM tab1 AS cor0 GROUP BY col1
----
43
5
56

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2330
SELECT ALL cor0.col1 + + cor0.col1 / - col1 col0 FROM tab1 AS cor0 GROUP BY col1
----
43
5
56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2331
SELECT CAST( 79 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
79
79
79

skipif mysql # not compatible
query I rowsort label-2331
SELECT CAST ( 79 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT + 7 FROM tab1 AS cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT + 51 AS col1 FROM tab1 GROUP BY tab1.col0
----
51
51
51

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL + - 56 FROM tab1 GROUP BY tab1.col0
----
-56
-56
-56

query I rowsort
SELECT ALL 12 FROM tab1 GROUP BY tab1.col0
----
12
12
12

query I rowsort
SELECT + ( + 56 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
56
56

query I rowsort
SELECT ALL 12 AS col0 FROM tab1 GROUP BY tab1.col2
----
12
12
12

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
2025
5041
64

query I rowsort
SELECT - + 5 FROM tab1 GROUP BY col1
----
-5
-5
-5

query I rowsort
SELECT DISTINCT 55 * + col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1430
2365
4565

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-484
-6724
-784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT tab1.col0 - 32 AS col0 FROM tab1 GROUP BY col0
----
-10
-4
50

query I rowsort
SELECT + 85 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
126
144
146

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 col1 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NULL
----
-45
-71
-8

query I rowsort
SELECT ALL tab1.col1 + tab1.col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1980
3306
42

query I rowsort
SELECT DISTINCT cor0.col2 * - 60 FROM tab0 AS cor0 GROUP BY col2
----
-1440
-2280
-4740

query I rowsort
SELECT DISTINCT + 97 AS col0 FROM tab1 GROUP BY tab1.col0
----
97

query I rowsort
SELECT DISTINCT + 97 + - tab1.col0 * + ( tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
-387
-6627
-687

query I rowsort
SELECT + 52 FROM tab0 GROUP BY tab0.col2
----
52
52
52

query I rowsort
SELECT col2 * + 12 - + 42 FROM tab2 GROUP BY col2
----
1002
654
906

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 47 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
47

onlyif mysql # DIV for integer division: 
query I rowsort label-2354
SELECT + tab1.col0 DIV tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2354
SELECT + tab1.col0 / tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT - 57 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-42
34
35

query I rowsort
SELECT 41 FROM tab0 AS cor0 GROUP BY col1
----
41
41

query I rowsort
SELECT DISTINCT + + 39 AS col0 FROM tab2 GROUP BY tab2.col0
----
39

query I rowsort
SELECT - 45 FROM tab1 GROUP BY col0
----
-45
-45
-45

query I rowsort
SELECT + tab2.col1 + 32 AS col0 FROM tab2 GROUP BY tab2.col1
----
73
91
93

query I rowsort
SELECT DISTINCT 27 FROM tab2 GROUP BY tab2.col2
----
27

query I rowsort
SELECT + + tab1.col1 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT + - tab2.col0 + + tab2.col0 * tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
210
8190
8372

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 84 + - 0 col1 FROM tab2 GROUP BY tab2.col2
----
84
84
84

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2364
SELECT ALL + CAST( 8 AS SIGNED ) col2 FROM tab1 GROUP BY tab1.col2
----
8
8
8

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2364
SELECT ALL + CAST ( 8 AS INTEGER ) col2 FROM tab1 GROUP BY tab1.col2
----
8
8
8

query I rowsort
SELECT DISTINCT + - 24 FROM tab0 GROUP BY tab0.col0
----
-24

query I rowsort
SELECT - 75 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-1125
-6825
-6900

onlyif mysql # DIV for integer division: 
query I rowsort label-2367
SELECT + cor0.col2 DIV - cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
22
27
82

skipif mysql # not compatible
query I rowsort label-2367
SELECT + cor0.col2 / - cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
22
27
82

onlyif mysql # DIV for integer division: 
query I rowsort label-2368
SELECT ALL col0 DIV + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2368
SELECT ALL col0 / + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 + 12 * - tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
-104
-585
-923

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2370
SELECT ALL - CAST( NULL AS SIGNED ) + 34 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2370
SELECT ALL - CAST ( NULL AS INTEGER ) + 34 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + ( col1 ) AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL + 8 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT ( + col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL col1 AS col2 FROM tab2 GROUP BY col1 HAVING NOT NULL <= col2
----

query I rowsort
SELECT DISTINCT tab0.col0 FROM tab0 WHERE NOT NULL IN ( - tab0.col0 * col2 ) GROUP BY tab0.col0
----

query I rowsort
SELECT - tab0.col1 * col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NULL
----
-6561
0

query I rowsort
SELECT ALL - tab1.col2 * 99 AS col2 FROM tab1 GROUP BY tab1.col2
----
-4455
-7029
-792

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( + 75, + col1, + ( tab0.col1 ) ) AS col1 FROM tab0 GROUP BY tab0.col0
----
-75
-75
-75

query I rowsort
SELECT tab0.col1 * 64 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
5184

query I rowsort
SELECT + 98 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
98
98
98

query I rowsort
SELECT ALL + ( tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col2 + - col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT ALL + - 19 AS col0 FROM tab1 GROUP BY tab1.col2
----
-19
-19
-19

query I rowsort
SELECT ALL + 14 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
14
14
14

query I rowsort
SELECT - - 41 AS col1 FROM tab2, tab0 AS cor0 GROUP BY tab2.col1
----
41
41
41

query I rowsort
SELECT ALL + tab2.col0 * 44 FROM tab2 GROUP BY tab2.col0
----
4004
4048
660

query I rowsort
SELECT tab1.col0 + - 63 FROM tab1 GROUP BY tab1.col0
----
-35
-41
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * 21 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1701

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 31 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 18 col2 FROM tab1 GROUP BY tab1.col0
----
18
18
18

query I rowsort
SELECT + - 99 FROM tab2 GROUP BY col0
----
-99
-99
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 38 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
38
38
38

query I rowsort
SELECT cor0.col0 * cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
132
1596
3608

query I rowsort
SELECT - col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-2397
SELECT DISTINCT 92 DIV 37 FROM tab1 GROUP BY tab1.col1
----
2

skipif mysql # not compatible
query I rowsort label-2397
SELECT DISTINCT 92 / 37 FROM tab1 GROUP BY tab1.col1
----
2

query I rowsort
SELECT DISTINCT + tab0.col2 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - tab1.col0 + + col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT 15 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
21
59
72

query I rowsort
SELECT + tab1.col2 + 48 FROM tab1 GROUP BY col2
----
119
56
93

query I rowsort
SELECT ALL tab0.col0 + + 31 FROM tab0 GROUP BY col0
----
114
57
74

query I rowsort
SELECT - 45 FROM tab0 GROUP BY tab0.col1
----
-45
-45

query I rowsort
SELECT DISTINCT 88 AS col2 FROM tab1 GROUP BY tab1.col1
----
88

query I rowsort
SELECT ALL + - tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL - - tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT cor0.col0 + 52 FROM tab1 AS cor0 GROUP BY cor0.col0
----
134
74
80

query I rowsort
SELECT 59 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
59
59
59

query I rowsort
SELECT ALL 76 + 74 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
150
150
150

query I rowsort
SELECT ALL + 1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT + + tab0.col1 + + 64 AS col0 FROM tab0 GROUP BY tab0.col1
----
145
64

query I rowsort
SELECT ALL ( - 79 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-79
-79
-79

query I rowsort
SELECT + + 51 * - col0 FROM tab2 GROUP BY tab2.col0
----
-4641
-4692
-765

query I rowsort
SELECT 3 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
29
46
86

query I rowsort
SELECT DISTINCT - ( + 76 ) * + 61 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-4636

query I rowsort
SELECT ALL + 80 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
19
21
39

query I rowsort
SELECT - 4 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
2
40
53

onlyif mysql # DIV for integer division: 
query I rowsort label-2418
SELECT cor0.col1 DIV cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2418
SELECT cor0.col1 / cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col1
----
1
1
1

query I rowsort
SELECT - 29 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-29
-29
-29

query I rowsort
SELECT DISTINCT - + tab1.col0 * tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
-484
-6724
-784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col2 + col2 col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 51 * 25 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1275
-1275
-1275

query I rowsort
SELECT 74 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
102
156
96

query I rowsort
SELECT 40 + + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
119
64
78

query I rowsort
SELECT 68 AS col0 FROM tab1 GROUP BY tab1.col1
----
68
68
68

query I rowsort
SELECT ALL + 46 * + col1 + + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1927
2773
2867

query I rowsort
SELECT ALL - + 25 - tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1706
-3506
-3746

query I rowsort
SELECT ALL + 46 - - COALESCE ( - tab1.col1, + ( - 46 ) ) FROM tab1 GROUP BY tab1.col1
----
-11
2
40

query I rowsort
SELECT DISTINCT - + 79 FROM tab1 GROUP BY tab1.col1
----
-79

query I rowsort
SELECT 19 FROM tab0 AS cor0 GROUP BY cor0.col1
----
19
19

query I rowsort
SELECT ALL + 81 FROM tab0 GROUP BY tab0.col0
----
81
81
81

query I rowsort
SELECT ALL col2 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT + + ( - 37 ) * col0 FROM tab0 GROUP BY tab0.col0
----
-1591
-3071
-962

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - col1 col0 FROM tab0 GROUP BY col1
----
-162
0

query I rowsort
SELECT DISTINCT + 72 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
72

query I rowsort
SELECT ALL + tab2.col1 * - tab2.col1 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT - 72 AS col2 FROM tab0 GROUP BY tab0.col0
----
-72
-72
-72

query I rowsort
SELECT col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT + 45 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
45
45

query I rowsort
SELECT - 6 AS col2 FROM tab0 GROUP BY tab0.col0
----
-6
-6
-6

query I rowsort
SELECT ALL cor0.col2 + + 53 FROM tab2 AS cor0 GROUP BY col2
----
111
132
140

query I rowsort
SELECT ALL + 41 AS col2 FROM tab2 GROUP BY tab2.col2
----
41
41
41

query I rowsort
SELECT + - 39 * - 59 + - 71 FROM tab2 GROUP BY tab2.col1
----
2230
2230
2230

query I rowsort
SELECT DISTINCT + cor0.col0 * CASE cor0.col0 WHEN cor0.col0 THEN cor0.col2 END AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1305
5336
7189

query I rowsort
SELECT ALL + 82 AS col2 FROM tab0 GROUP BY tab0.col1
----
82
82

query I rowsort
SELECT NULLIF ( + cor0.col2, col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2
-27
12

query I rowsort
SELECT DISTINCT + - COALESCE ( + tab1.col0, tab1.col0 + - tab1.col0 * 43 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col1 - - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
162

query I rowsort
SELECT ALL col0 + + 10 AS col2 FROM tab1 GROUP BY tab1.col0
----
32
38
92

query I rowsort
SELECT - cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT + 91 FROM tab0 GROUP BY tab0.col2
----
91
91
91

query I rowsort
SELECT DISTINCT - tab1.col2 * - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT col1 + - 97 AS col0 FROM tab0 GROUP BY tab0.col1
----
-16
-97

query I rowsort
SELECT DISTINCT - 15 FROM tab2 GROUP BY col2
----
-15

query I rowsort
SELECT - ( tab0.col1 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT 20 FROM tab2 GROUP BY tab2.col1
----
20
20
20

query I rowsort
SELECT ALL - tab1.col0 * + 55 FROM tab1 GROUP BY tab1.col0
----
-1210
-1540
-4510

query I rowsort
SELECT tab0.col0 + + 33 FROM tab0 GROUP BY tab0.col0
----
116
59
76

query I rowsort
SELECT + cor1.col0 + - cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 14 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
22
59
85

query I rowsort
SELECT DISTINCT + - 66 FROM tab0 GROUP BY tab0.col2
----
-66

query I rowsort
SELECT DISTINCT - 56 * - 50 AS col1 FROM tab0 GROUP BY tab0.col1
----
2800

query I rowsort
SELECT DISTINCT col2 + tab1.col2 * 43 AS col2 FROM tab1 GROUP BY tab1.col2
----
1980
3124
352

query I rowsort
SELECT ALL + 78 AS col0 FROM tab2 GROUP BY tab2.col2
----
78
78
78

query I rowsort
SELECT DISTINCT 90 + 71 FROM tab0 AS cor0 GROUP BY cor0.col1
----
161

query I rowsort
SELECT ALL col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col2 col1 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + tab1.col1 - + tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT tab1.col1 + - tab1.col1 NOT BETWEEN + tab1.col1 AND ( NULL )
----

query I rowsort
SELECT ALL - 72 FROM tab2 GROUP BY tab2.col1
----
-72
-72
-72

query I rowsort
SELECT DISTINCT - 74 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-74

onlyif mysql # DIV for integer division: 
query I rowsort label-2473
SELECT - 62 DIV 70 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2473
SELECT - 62 / 70 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2474
SELECT tab1.col0 * COALESCE ( + 78, col1 - - tab1.col1, tab1.col0 DIV tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
1716
2184
6396

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2474
SELECT tab1.col0 * COALESCE ( + 78, col1 - - tab1.col1, tab1.col0 / tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
1716
2184
6396

query I rowsort
SELECT 62 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
62
62
62

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
1681
3481
3721

onlyif mysql # DIV for integer division: 
query I rowsort label-2477
SELECT ALL + cor0.col0 DIV col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2477
SELECT ALL + cor0.col0 / col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
1
1
1

query I rowsort
SELECT + col1 - - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT ALL - + tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

onlyif mysql # DIV for integer division: 
query I rowsort label-2480
SELECT ALL + cor0.col0 DIV 37 FROM tab2 AS cor0 GROUP BY col0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-2480
SELECT ALL + cor0.col0 / 37 FROM tab2 AS cor0 GROUP BY col0
----
0
2
2

query I rowsort
SELECT 39 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
39
39
39

query I rowsort
SELECT + col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 73 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
73
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT + 0 AS col0 FROM tab1 GROUP BY col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - ( tab1.col1 ) + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL 59 * - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5369
-5428
-885

query I rowsort
SELECT ALL + 84 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
84
84
84

query I rowsort
SELECT + 45 FROM tab2 cor0 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT ALL + 6 AS col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
6
6
6

query I rowsort
SELECT - 75 FROM tab2 GROUP BY tab2.col0
----
-75
-75
-75

query I rowsort
SELECT + tab2.col2 + - 93 AS col0 FROM tab2 GROUP BY col2
----
-14
-35
-6

query I rowsort
SELECT + + 51 * 75 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3883
3904
3912

query I rowsort
SELECT ALL 38 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
38
38
38

query I rowsort
SELECT ALL - ( + 95 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-95
-95
-95

query I rowsort
SELECT DISTINCT 7 FROM tab1 GROUP BY tab1.col1
----
7

onlyif mysql # DIV for integer division: 
query I rowsort label-2499
SELECT DISTINCT COALESCE ( 85, + col0 + ( - cor0.col0 ), + cor0.col0 DIV - cor0.col2 + - 45 ) + - 79 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2499
SELECT DISTINCT COALESCE ( 85, + col0 + ( - cor0.col0 ), + cor0.col0 / - cor0.col2 + - 45 ) + - 79 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6

query I rowsort
SELECT DISTINCT 23 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
23

query I rowsort
SELECT - 50 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-50
-50
-50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 3 col2 FROM tab2 GROUP BY tab2.col2
----
3

query I rowsort
SELECT ALL 73 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
73
73
73

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 58 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
58
58
58

query I rowsort
SELECT ALL - col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 95 AS col0 FROM tab1 GROUP BY tab1.col1
----
95
95
95

query I rowsort
SELECT + - 30 AS col1 FROM tab2 GROUP BY tab2.col0
----
-30
-30
-30

query I rowsort
SELECT + 0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - 53 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-53

query I rowsort
SELECT DISTINCT + col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT cor0.col0 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1260
176
5822

query I rowsort
SELECT DISTINCT + 72 FROM tab2 GROUP BY tab2.col2
----
72

onlyif mysql # DIV for integer division: 
query I rowsort label-2515
SELECT DISTINCT COALESCE ( - 67, + cor0.col2 DIV cor0.col0 ) DIV cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2515
SELECT DISTINCT COALESCE ( - 67, + cor0.col2 / cor0.col0 ) / cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1

query I rowsort
SELECT DISTINCT 24 FROM tab0 GROUP BY tab0.col2
----
24

query I rowsort
SELECT ALL + 80 FROM tab1 GROUP BY col0
----
80
80
80

query I rowsort
SELECT DISTINCT - 39 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-39

query I rowsort
SELECT + 15 FROM tab1 GROUP BY tab1.col2
----
15
15
15

query I rowsort
SELECT 80 + - cor0.col0 * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
564
6804
864

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( - 13, + tab1.col0 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
13

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT DISTINCT - + 87 AS col1 FROM tab2 GROUP BY tab2.col0
----
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 62 * tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
-2790
-4402
-496

query I rowsort
SELECT DISTINCT 20 + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
107
78
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + tab2.col2 * - tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 70 + cor0.col1 * cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
1751
3551
3791

query I rowsort
SELECT - cor0.col2 * cor0.col1 + + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
-2508
-3080
-42

query I rowsort
SELECT ALL 77 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT - 30 * cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-1140
-2370
-720

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT - col2 + + col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL 19 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1083
114
836

query I rowsort
SELECT DISTINCT - - 67 AS col0 FROM tab1 GROUP BY tab1.col0
----
67

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2535
SELECT ALL + CAST( + tab2.col0 AS SIGNED ) FROM tab2 GROUP BY col0
----
15
91
92

skipif mysql # not compatible
query I rowsort label-2535
SELECT ALL + CAST ( + tab2.col0 AS INTEGER ) FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT cor0.col1 + cor0.col0 * + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
1366
5377
7248

onlyif mysql # DIV for integer division: 
query I rowsort label-2537
SELECT ALL - - tab1.col0 DIV 24 AS col1 FROM tab1 GROUP BY col0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-2537
SELECT ALL - - tab1.col0 / 24 AS col1 FROM tab1 GROUP BY col0
----
0
1
3

onlyif mysql # DIV for integer division: 
query I rowsort label-2538
SELECT ALL - col1 * - tab1.col1 + - 45 DIV tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1935
29
3249

skipif mysql # not compatible
query I rowsort label-2538
SELECT ALL - col1 * - tab1.col1 + - 45 / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1935
29
3249

query I rowsort
SELECT ALL - 29 FROM tab1 GROUP BY col0
----
-29
-29
-29

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-2541
SELECT ALL - 31 DIV col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-2541
SELECT ALL - 31 / col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

query I rowsort
SELECT DISTINCT + + 3 + 14 * + 78 FROM tab1 GROUP BY tab1.col1
----
1095

query I rowsort
SELECT ALL cor0.col0 * - col2 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-1218
-5278
-7110

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + tab1.col0 * - tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
-462
-6642
-756

query I rowsort
SELECT ALL - + 94 AS col0 FROM tab2 GROUP BY tab2.col1
----
-94
-94
-94

query I rowsort
SELECT ALL cor0.col0 + + 33 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
116
59
76

query I rowsort
SELECT + cor0.col1 + + 18 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
59
77
79

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT - 69 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-69
-69
-69

onlyif mysql # DIV for integer division: 
query I rowsort label-2551
SELECT DISTINCT + cor0.col2 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-2551
SELECT DISTINCT + cor0.col2 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1

query I rowsort
SELECT DISTINCT + 63 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
63

query I rowsort
SELECT 61 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1586
2623
5063

query I rowsort
SELECT - cor0.col0 + - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-164
-44
-56

query I rowsort
SELECT tab1.col2 * col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 7 * tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
-308
-399
-42

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2557
SELECT ALL CAST( 80 AS SIGNED ) * - 39 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3120
-3120
-3120

skipif mysql # not compatible
query I rowsort label-2557
SELECT ALL CAST ( 80 AS INTEGER ) * - 39 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3120
-3120
-3120

query I rowsort
SELECT DISTINCT + 76 AS col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 39 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 53 FROM tab2 GROUP BY tab2.col1
----
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 38 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
38

query I rowsort
SELECT + cor0.col0 * 97 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
2522
4171
8051

query I rowsort
SELECT ALL ( + 96 ) - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
14
68
74

query I rowsort
SELECT tab1.col1 - + 8 * 48 FROM tab1 GROUP BY tab1.col1
----
-327
-340
-378

query I rowsort
SELECT cor0.col0 * - 96 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
-2112
-2688
-7872

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT 70 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
70

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + + tab2.col0 * - 48 + + 19 FROM tab2 GROUP BY col0
----
-4349
-4397
-701

query I rowsort
SELECT - 62 + col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-4
17
25

query I rowsort
SELECT + tab1.col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT 89 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
89
89
89

query I rowsort
SELECT + 51 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
51
51
51

query I rowsort
SELECT DISTINCT 61 + - 74 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-13

query I rowsort
SELECT DISTINCT + tab2.col0 + col0 * 30 AS col2 FROM tab2 GROUP BY tab2.col0
----
2821
2852
465

query I rowsort
SELECT DISTINCT cor0.col0 - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT ALL - 94 * NULLIF ( + tab1.col2, - tab1.col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
-4230
-6674
-752

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2580
SELECT CAST( NULL AS SIGNED ) * + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2580
SELECT CAST ( NULL AS INTEGER ) * + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 64 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
64
64
64

query I rowsort
SELECT DISTINCT cor0.col0 * + ( + 24 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2184
2208
360

query I rowsort
SELECT ALL 45 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
1260
3690
990

query I rowsort
SELECT DISTINCT - 98 AS col2 FROM tab2 GROUP BY tab2.col2
----
-98

query I rowsort
SELECT + 65 FROM tab1 GROUP BY tab1.col0
----
65
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 64 + cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-23
-3
-5

query I rowsort
SELECT + 29 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1189
1711
1769

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 98 col2 FROM tab2 GROUP BY tab2.col0
----
-98

query I rowsort
SELECT 61 FROM tab1 AS cor0 GROUP BY col2
----
61
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0
0
81

query I rowsort
SELECT DISTINCT + col0 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1849
676
6889

onlyif mysql # DIV for integer division: 
query I rowsort label-2592
SELECT - 52 DIV cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-2592
SELECT - 52 / cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-2
0

query I rowsort
SELECT 68 AS col0 FROM tab0 GROUP BY tab0.col2
----
68
68
68

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab0 cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT - COALESCE ( + col2, + cor0.col1, - ( - 2 ) ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - NULLIF ( cor0.col2, + cor0.col2 ) * 92 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT - + 43 * col2 FROM tab2 GROUP BY tab2.col2
----
-2494
-3397
-3741

query I rowsort
SELECT DISTINCT - + 66 FROM tab0 GROUP BY tab0.col2
----
-66

query I rowsort
SELECT ALL 84 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2, cor0.col2
----
44
57
6

query I rowsort
SELECT + 68 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
68
68
68

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
15
91
92

query I rowsort
SELECT + - col0 * 2 AS col1 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT ALL + + 13 FROM tab1 GROUP BY tab1.col0
----
13
13
13

query I rowsort
SELECT + col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
116
158
174

query I rowsort
SELECT DISTINCT + cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, col2
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT 16 AS col2 FROM tab1 GROUP BY tab1.col2
----
16

query I rowsort
SELECT + + 79 * tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
3239
4661
4819

query I rowsort
SELECT DISTINCT - tab1.col1 * 6 FROM tab1 GROUP BY tab1.col1
----
-264
-342
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-2610
SELECT DISTINCT - 49 DIV 69 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif mysql # not compatible
query I rowsort label-2610
SELECT DISTINCT - 49 / 69 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT - + 42 * + 66 FROM tab0 GROUP BY tab0.col0
----
-2772
-2772
-2772

query I rowsort
SELECT DISTINCT 14 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
14

query I rowsort
SELECT ALL - 29 AS col2 FROM tab0 GROUP BY tab0.col2
----
-29
-29
-29

query I rowsort
SELECT DISTINCT + 76 FROM tab2 GROUP BY tab2.col2
----
76

query I rowsort
SELECT DISTINCT - 30 FROM tab0 GROUP BY col0
----
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 98 col0 FROM tab0 GROUP BY tab0.col0
----
98
98
98

query I rowsort
SELECT 81 AS col1 FROM tab0 GROUP BY tab0.col0
----
81
81
81

query I rowsort
SELECT + 55 - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
113
134
142

query I rowsort
SELECT 34 AS col0 FROM tab2 cor0 GROUP BY col1
----
34
34
34

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
-44
-57
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2621
SELECT - CAST( NULL AS SIGNED ) + ( + tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2621
SELECT - CAST ( NULL AS INTEGER ) + ( + tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + + 78 * tab0.col1 - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6237

onlyif mysql # DIV for integer division: 
query I rowsort label-2623
SELECT DISTINCT + cor0.col1 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-2623
SELECT DISTINCT + cor0.col1 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT DISTINCT cor0.col2 - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT 12 FROM tab1 AS cor0 GROUP BY cor0.col1
----
12

query I rowsort
SELECT + ( 33 ) * 11 AS col1 FROM tab0 GROUP BY tab0.col2
----
363
363
363

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2627
SELECT DISTINCT + tab0.col2 + - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2627
SELECT DISTINCT + tab0.col2 + - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
NULL

query I rowsort
SELECT DISTINCT cor0.col0 * 46 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1196
1978
3818

query I rowsort
SELECT + - 46 AS col0 FROM tab0 GROUP BY tab0.col2
----
-46
-46
-46

query I rowsort
SELECT DISTINCT tab2.col2 + tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT ALL 2 * - col0 FROM tab2 GROUP BY col0
----
-182
-184
-30

onlyif mysql # DIV for integer division: 
query I rowsort label-2632
SELECT - 97 * col1 + tab1.col1 DIV 44 FROM tab1 GROUP BY tab1.col1
----
-4267
-5528
-582

skipif mysql # not compatible
query I rowsort label-2632
SELECT - 97 * col1 + tab1.col1 / 44 FROM tab1 GROUP BY tab1.col1
----
-4267
-5528
-582

query I rowsort
SELECT ALL - 82 * 46 FROM tab1 GROUP BY tab1.col0
----
-3772
-3772
-3772

query I rowsort
SELECT ALL 2 FROM tab2 GROUP BY tab2.col0
----
2
2
2

query I rowsort
SELECT + col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-2636
SELECT ALL - + 25 DIV 16 + + tab1.col2 FROM tab1 GROUP BY col2
----
44
7
70

skipif mysql # not compatible
query I rowsort label-2636
SELECT ALL - + 25 / 16 + + tab1.col2 FROM tab1 GROUP BY col2
----
44
7
70

query I rowsort
SELECT - - ( tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT 65 FROM tab2 AS cor0 GROUP BY col1, col0
----
65
65
65

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0, col2
----
24
38
79

query I rowsort
SELECT ALL + 30 FROM tab1 AS cor0 GROUP BY cor0.col0
----
30
30
30

onlyif mysql # DIV for integer division: 
query I rowsort label-2641
SELECT DISTINCT COALESCE ( + 32, + tab1.col1 DIV - tab1.col1 ) FROM tab1 GROUP BY col0
----
32

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2641
SELECT DISTINCT COALESCE ( + 32, + tab1.col1 / - tab1.col1 ) FROM tab1 GROUP BY col0
----
32

query I rowsort
SELECT cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING col2 NOT IN ( cor0.col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NOT NULL
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 col1 FROM tab2 WHERE + tab2.col2 IS NOT NULL GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL - cor0.col2 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col1 * + 16 FROM tab2 AS cor0 GROUP BY cor0.col1
----
656
944
976

query I rowsort
SELECT 86 FROM tab0 GROUP BY col0
----
86
86
86

onlyif mysql # DIV for integer division: 
query I rowsort label-2649
SELECT ALL 3 DIV + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2649
SELECT ALL 3 / + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
41
59
61

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-22
-28
-82

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + tab1.col0 * + COALESCE ( + 87, - tab1.col1 * tab1.col0 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
1914
2436
7134

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
142
16
90

query I rowsort
SELECT + 4 AS col2 FROM tab0 GROUP BY tab0.col1
----
4
4

query I rowsort
SELECT DISTINCT 23 FROM tab2 GROUP BY col1
----
23

query I rowsort
SELECT DISTINCT 89 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
89

query I rowsort
SELECT ALL - - tab2.col0 + + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT cor0.col2 * + 61 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
3538
4819
5307

query I rowsort
SELECT + 41 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT ALL + 60 AS col0 FROM tab1 GROUP BY tab1.col0
----
60
60
60

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - ( + col1 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + 79 * + 0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT - tab2.col1 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + 56 FROM tab2 GROUP BY tab2.col0
----
56
56
56

query I rowsort
SELECT DISTINCT + ( - 30 ) AS col1 FROM tab2 cor0 GROUP BY col2
----
-30

query I rowsort
SELECT ALL - ( - cor0.col1 ) + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
114
12
88

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT + 64 AS col1 FROM tab1 GROUP BY tab1.col1
----
64
64
64

query I rowsort
SELECT DISTINCT - 69 AS col0 FROM tab2 GROUP BY col1
----
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 25 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-25

query I rowsort
SELECT + 82 FROM tab2 AS cor0 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT ALL - 59 * - tab1.col1 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
2640
3420
360

onlyif mysql # DIV for integer division: 
query I rowsort label-2677
SELECT - + tab0.col2 + - tab0.col2 DIV 67 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-80

skipif mysql # not compatible
query I rowsort label-2677
SELECT - + tab0.col2 + - tab0.col2 / 67 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-80

query I rowsort
SELECT ALL - 9 AS col0 FROM tab1 GROUP BY col1
----
-9
-9
-9

query I rowsort
SELECT ALL col2 - + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2681
SELECT + tab0.col1 DIV - 19 + + 7 FROM tab0 GROUP BY tab0.col1
----
3
7

skipif mysql # not compatible
query I rowsort label-2681
SELECT + tab0.col1 / - 19 + + 7 FROM tab0 GROUP BY tab0.col1
----
3
7

query I rowsort
SELECT - tab1.col1 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT 35 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
126
127
50

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 60 col1 FROM tab2 AS cor0 GROUP BY col0
----
-60
-60
-60

query I rowsort
SELECT ALL 60 AS col1 FROM tab1 GROUP BY tab1.col0
----
60
60
60

query I rowsort
SELECT cor0.col1 + + 35 FROM tab0 AS cor0 GROUP BY cor0.col1
----
116
35

query I rowsort
SELECT col1 * 59 + + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2460
3540
3660

query I rowsort
SELECT - col1 * 5 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-405
0

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL + tab0.col2 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT cor0.col0 * - col0 - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1892
-6972
-702

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT - ( - tab0.col1 ) * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT + 64 AS col2 FROM tab1 GROUP BY tab1.col1
----
64
64
64

query I rowsort
SELECT + 47 * 88 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
4136
4136
4136

query I rowsort
SELECT DISTINCT + 58 FROM tab1 AS cor0 GROUP BY col0
----
58

onlyif mysql # DIV for integer division: 
query I rowsort label-2698
SELECT ALL + cor0.col0 DIV - col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2698
SELECT ALL + cor0.col0 / - col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-1
-1

query I rowsort
SELECT - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + - tab0.col0 * + tab0.col0 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT tab0.col1 FROM tab0 GROUP BY col1 HAVING NULL = + col1 / tab0.col1
----

query I rowsort
SELECT + col0 * - 48 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1248
-2064
-3984

query I rowsort
SELECT - 27 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-27
-27
-27

query I rowsort
SELECT ALL + 23 FROM tab2 GROUP BY tab2.col2
----
23
23
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 91 col1 FROM tab1 cor0 GROUP BY col0
----
91
91
91

query I rowsort
SELECT 22 AS col1 FROM tab1 AS cor0 GROUP BY col0, col1
----
22
22
22

query I rowsort
SELECT + - 96 FROM tab1 GROUP BY tab1.col1
----
-96
-96
-96

query I rowsort
SELECT DISTINCT 37 AS col0 FROM tab1 GROUP BY tab1.col1
----
37

query I rowsort
SELECT + tab1.col0 * ( tab1.col0 ) - - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
506
6806
812

query I rowsort
SELECT - tab0.col2 + 63 AS col1 FROM tab0 GROUP BY tab0.col2
----
-16
25
39

query I rowsort
SELECT DISTINCT 63 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
63

query I rowsort
SELECT DISTINCT 94 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
94

query I rowsort
SELECT + + 39 FROM tab2 GROUP BY col1
----
39
39
39

query I rowsort
SELECT - cor0.col0 + - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
-182
-184
-30

query I rowsort
SELECT DISTINCT + 97 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
97

query I rowsort
SELECT ALL - 59 + - 64 AS col0 FROM tab2 GROUP BY tab2.col2
----
-123
-123
-123

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * - cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT cor0.col2 + + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT - 86 AS col0 FROM tab1 GROUP BY tab1.col1
----
-86

query I rowsort
SELECT ALL + 62 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
62
62
62

query I rowsort
SELECT tab0.col2 + 29 AS col0 FROM tab0 GROUP BY tab0.col2
----
108
53
67

query I rowsort
SELECT + 94 FROM tab2 AS cor0 GROUP BY cor0.col2
----
94
94
94

query I rowsort
SELECT DISTINCT - 29 + + 66 AS col2 FROM tab0 GROUP BY tab0.col0
----
37

query I rowsort
SELECT - 62 * 3 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-186
-186
-186

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
118
122
82

query I rowsort
SELECT cor1.col2 + - cor0.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col2
----
9 values hashing to 1438a26501865d4c832560cb0eaa912c

query I rowsort
SELECT - 72 AS col0 FROM tab0 GROUP BY tab0.col0
----
-72
-72
-72

query I rowsort
SELECT - 55 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, col2
----
-55
-55
-55

query I rowsort
SELECT col2 * ( - 36 ) AS col2 FROM tab1 GROUP BY col2
----
-1620
-2556
-288

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

onlyif mysql # DIV for integer division: 
query I rowsort label-2731
SELECT cor0.col0 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2731
SELECT cor0.col0 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
1
1

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col2 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2, cor0.col0
----
2508
3080
42

query I rowsort
SELECT 23 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT col2 * + col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1849
676
6889

onlyif mysql # DIV for integer division: 
query I rowsort label-2736
SELECT + tab0.col1 + tab0.col1 DIV - 25 FROM tab0 GROUP BY tab0.col1
----
0
78

skipif mysql # not compatible
query I rowsort label-2736
SELECT + tab0.col1 + tab0.col1 / - 25 FROM tab0 GROUP BY tab0.col1
----
0
78

query I rowsort
SELECT DISTINCT 13 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
533
767
793

query I rowsort
SELECT DISTINCT - 84 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-84

query I rowsort
SELECT DISTINCT tab1.col0 * tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT cor0.col2 - + 80 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-35
-72
-9

query I rowsort
SELECT - 70 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-70
-70

query I rowsort
SELECT 54 AS col1 FROM tab0 GROUP BY tab0.col2
----
54
54
54

query I rowsort
SELECT - tab2.col0 * + col0 FROM tab2 GROUP BY col0
----
-225
-8281
-8464

onlyif mysql # DIV for integer division: 
query I rowsort label-2744
SELECT DISTINCT - COALESCE ( - 10, + cor0.col1, - cor0.col1 DIV - COALESCE ( + cor0.col0 * + cor0.col2, - 31 ) ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
10

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2744
SELECT DISTINCT - COALESCE ( - 10, + cor0.col1, - cor0.col1 / - COALESCE ( + cor0.col0 * + cor0.col2, - 31 ) ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
10

query I rowsort
SELECT + + col1 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
118
122
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2746
SELECT - CAST( 45 AS SIGNED ) FROM tab1 GROUP BY col2
----
-45
-45
-45

skipif mysql # not compatible
query I rowsort label-2746
SELECT - CAST ( 45 AS INTEGER ) FROM tab1 GROUP BY col2
----
-45
-45
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col1 + + tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 97 col2 FROM tab1 GROUP BY tab1.col1
----
97

query I rowsort
SELECT DISTINCT + + 50 FROM tab2 GROUP BY col1
----
50

query I rowsort
SELECT DISTINCT + tab0.col2 + + 84 AS col1 FROM tab0 GROUP BY tab0.col2
----
108
122
163

query I rowsort
SELECT - col0 FROM tab0 WHERE NOT ( NULL ) IS NULL GROUP BY tab0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT cor0.col1 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 + + cor0.col1 * + 74 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3300
4275
450

query I rowsort
SELECT - cor0.col0 * - cor0.col0 + - NULLIF ( + 14, cor0.col0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
211
8267
8450

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
0

query I rowsort
SELECT ALL 25 FROM tab1 GROUP BY tab1.col0
----
25
25
25

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 33 FROM tab1 AS cor0 GROUP BY cor0.col1, col1, col1
----
-33

query I rowsort
SELECT - 9 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-9
-9
-9

query I rowsort
SELECT DISTINCT - 75 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-37
-51
4

query I rowsort
SELECT ALL COALESCE ( - 76, - cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-76
-76
-76

query I rowsort
SELECT DISTINCT tab0.col0 - 73 FROM tab0 GROUP BY col0
----
-30
-47
10

query I rowsort
SELECT ALL - 52 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-52
-52
-52

query I rowsort
SELECT DISTINCT 53 FROM tab0 GROUP BY tab0.col1
----
53

query I rowsort
SELECT DISTINCT + 46 FROM tab1 AS cor0 GROUP BY cor0.col2
----
46

query I rowsort
SELECT 55 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
55
55
55

query I rowsort
SELECT ALL + col2 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1944

query I rowsort
SELECT cor0.col1 * 27 + - 21 AS col2 FROM tab1 cor0 GROUP BY col1
----
1167
141
1518

query I rowsort
SELECT ALL + tab2.col1 + 29 AS col2 FROM tab2 GROUP BY tab2.col1
----
70
88
90

query I rowsort
SELECT ALL CASE 0 WHEN + tab1.col0 * tab1.col0 THEN tab1.col0 ELSE NULL END + + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + + tab0.col2 * + 21 FROM tab0 GROUP BY tab0.col2
----
1659
504
798

query I rowsort
SELECT - 50 * + tab1.col2 - tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-4275
-464
-8591

query I rowsort
SELECT - 64 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-23
-3
-5

query I rowsort
SELECT + - 31 + col2 * tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3333
6210
7538

query I rowsort
SELECT ALL - 67 * cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-3886
-5293
-5829

query I rowsort
SELECT - 69 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-69
-69

query I rowsort
SELECT + 91 AS col2 FROM tab0 GROUP BY tab0.col2
----
91
91
91

query I rowsort
SELECT 97 AS col0 FROM tab0 GROUP BY tab0.col0
----
97
97
97

query I rowsort
SELECT DISTINCT + + col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT + cor0.col1 * - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
-2565
-3124
-48

query I rowsort
SELECT ALL + + tab1.col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT tab2.col1 - - 35 FROM tab2 GROUP BY tab2.col1
----
76
94
96

query I rowsort
SELECT + cor0.col1 * cor0.col1 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-38
-79
6537

query I rowsort
SELECT - + 25 AS col0 FROM tab1 GROUP BY tab1.col2
----
-25
-25
-25

query I rowsort
SELECT ALL tab0.col0 - + ( ( + col0 ) ) AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + + tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + tab0.col0 - + tab0.col0 col0 FROM tab0 GROUP BY col0
----
-166
-52
-86

query I rowsort
SELECT - ( 16 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
-16
-16
-16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 88 col2 FROM tab1 GROUP BY tab1.col2
----
-88
-88
-88

onlyif mysql # DIV for integer division: 
query I rowsort label-2792
SELECT COALESCE ( + 50, tab2.col2 ) * + tab2.col1 - + COALESCE ( 51, + tab2.col2 DIV - 50 ) AS col1 FROM tab2 GROUP BY tab2.col1
----
1999
2899
2999

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2792
SELECT COALESCE ( + 50, tab2.col2 ) * + tab2.col1 - + COALESCE ( 51, + tab2.col2 / - 50 ) AS col1 FROM tab2 GROUP BY tab2.col1
----
1999
2899
2999

query I rowsort
SELECT DISTINCT + 55 AS col0 FROM tab0 GROUP BY tab0.col1
----
55

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2794
SELECT CAST( NULL AS SIGNED ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2794
SELECT CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 78 AS col0 FROM tab0 GROUP BY tab0.col1
----
78
78

query I rowsort
SELECT DISTINCT - - col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + - tab0.col2 * tab0.col2 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1406
-552
-6162

query I rowsort
SELECT 95 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
95
95
95

query I rowsort
SELECT + col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT DISTINCT + - 92 * 58 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-5275
-5277
-5295

query I rowsort
SELECT + 10 FROM tab0 AS cor0 GROUP BY cor0.col2
----
10
10
10

query I rowsort
SELECT 33 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
33
33
33

query I rowsort
SELECT - tab2.col2 * + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 49 AS col1 FROM tab0 GROUP BY tab0.col1
----
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 91 col0 FROM tab2 GROUP BY tab2.col0
----
-91
-91
-91

onlyif mysql # DIV for integer division: 
query I rowsort label-2807
SELECT + - 10 DIV + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2807
SELECT + - 10 / + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT + NULLIF ( - cor0.col1, + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - 1 FROM tab2 cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - 62 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
-62
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab0.col1 * tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT - 98 FROM tab1 AS cor0 GROUP BY col2
----
-98

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 - - tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT col0 - + col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col1 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT - tab0.col1 * ( tab0.col1 + + tab0.col1 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
-13122
0

query I rowsort
SELECT - 9 * 68 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-612
-612
-612

query I rowsort
SELECT ALL - 57 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-12
-49
14

query I rowsort
SELECT + 64 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
64
64
64

query I rowsort
SELECT ALL 3 AS col2 FROM tab1 GROUP BY tab1.col0
----
3
3
3

query I rowsort
SELECT DISTINCT + 5 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
5

query I rowsort
SELECT - cor0.col1 + + 32 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1271
1829
1891

query I rowsort
SELECT 39 FROM tab1 GROUP BY col2
----
39
39
39

query I rowsort
SELECT tab0.col1 * - tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT DISTINCT 57 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
57

onlyif mysql # DIV for integer division: 
query I rowsort label-2828
SELECT 37 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
0
0
6

skipif mysql # not compatible
query I rowsort label-2828
SELECT 37 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
0
0
6

query I rowsort
SELECT 73 AS col0 FROM tab2 GROUP BY tab2.col2
----
73
73
73

query I rowsort
SELECT - 90 * - cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
5220
7110
7830

query I rowsort
SELECT + 14 AS col2 FROM tab0 GROUP BY tab0.col0
----
14
14
14

query I rowsort
SELECT + 26 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1066
1534
1586

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL 53 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
53
53
53

query I rowsort
SELECT + 80 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
80
80
80

query I rowsort
SELECT ALL + tab0.col0 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT 13 + 24 FROM tab1 AS cor0 GROUP BY cor0.col2
----
37
37
37

query I rowsort
SELECT ALL + 85 AS col2 FROM tab2 cor0 GROUP BY col1
----
85
85
85

query I rowsort
SELECT + 78 AS col1 FROM tab0 GROUP BY tab0.col1
----
78
78

query I rowsort
SELECT - tab1.col1 * + tab1.col1 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1892
-30
-3192

query I rowsort
SELECT ALL + tab1.col0 * 8 - - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
198
252
738

query I rowsort
SELECT + 83 FROM tab1 GROUP BY tab1.col1
----
83
83
83

onlyif mysql # DIV for integer division: 
query I rowsort label-2843
SELECT cor0.col0 DIV + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2843
SELECT cor0.col0 / + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
0
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-2844
SELECT - col2 DIV - 80 + - 4 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3
-4
-4

skipif mysql # not compatible
query I rowsort label-2844
SELECT - col2 / - 80 + - 4 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3
-4
-4

query I rowsort
SELECT + 47 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
47
47
47

query I rowsort
SELECT 29 FROM tab1 GROUP BY tab1.col2
----
29
29
29

query I rowsort
SELECT DISTINCT 13 + - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-28
-46
-48

query I rowsort
SELECT + 84 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
3444
4956
5124

query I rowsort
SELECT ALL - + 11 FROM tab1 GROUP BY tab1.col2
----
-11
-11
-11

query I rowsort
SELECT DISTINCT + tab1.col0 + 53 FROM tab1 GROUP BY col0
----
135
75
81

query I rowsort
SELECT DISTINCT - - 17 - + col0 FROM tab2 GROUP BY col0
----
-74
-75
2

query I rowsort
SELECT 98 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
98
98

query I rowsort
SELECT ALL - 48 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-3888
0

query I rowsort
SELECT + 91 FROM tab1 AS cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT DISTINCT - COALESCE ( tab2.col0, + tab2.col0 * + tab2.col0 + + tab2.col0 * - col0 ) + - col0 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT DISTINCT - 55 FROM tab1 GROUP BY tab1.col1
----
-55

query I rowsort
SELECT col2 * 97 AS col2 FROM tab1 GROUP BY tab1.col2
----
4365
6887
776

query I rowsort
SELECT + 75 FROM tab0 AS cor0 GROUP BY cor0.col0
----
75
75
75

query I rowsort
SELECT ALL - + 12 FROM tab1 GROUP BY tab1.col1
----
-12
-12
-12

query I rowsort
SELECT ( tab1.col2 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 73 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
3212
4161
438

query I rowsort
SELECT + 99 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT cor0.col2 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, cor0.col1
----
153
30
73

query I rowsort
SELECT + ( 89 ) FROM tab1 GROUP BY tab1.col1
----
89
89
89

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - 23 AS col1 FROM tab2 GROUP BY tab2.col2
----
-23
-23
-23

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, col2
----
15
91
92

query I rowsort
SELECT + 26 FROM tab2 AS cor0 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT ALL 75 AS col1 FROM tab1 GROUP BY col2
----
75
75
75

query I rowsort
SELECT ALL - 69 + + 6 FROM tab1 GROUP BY tab1.col1
----
-63
-63
-63

query I rowsort
SELECT ALL + 15 + - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-11
-28
-68

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 14, - cor0.col1, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
14
14
14

query I rowsort
SELECT ALL + 68 + cor0.col2 * - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3296
-6173
-7501

query I rowsort
SELECT ALL + 1 AS col1 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT + - tab0.col0 * 3 FROM tab0 GROUP BY tab0.col0
----
-129
-249
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 * 37 + + 36 col1 FROM tab1 GROUP BY tab1.col1
----
-1592
-186
-2073

query I rowsort
SELECT cor0.col2 * 90 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2160
3420
7110

onlyif mysql # DIV for integer division: 
query I rowsort label-2878
SELECT 98 DIV 76 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2878
SELECT 98 / 76 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - - tab2.col2 * 81 FROM tab2 GROUP BY col2
----
4698
6399
7047

query I rowsort
SELECT DISTINCT cor0.col2 - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT - 7 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-7

query I rowsort
SELECT DISTINCT 29 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 77 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT + 66 FROM tab2 GROUP BY tab2.col1
----
66
66
66

onlyif mysql # DIV for integer division: 
query I rowsort label-2886
SELECT + ( col1 ) DIV - 99 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2886
SELECT + ( col1 ) / - 99 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT DISTINCT tab0.col1 * + 86 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
6966

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + tab0.col0 * 2 FROM tab0 GROUP BY col0
----
166
52
86

onlyif mysql # DIV for integer division: 
query I rowsort label-2891
SELECT ALL - cor0.col1 DIV + 55 + - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-58
-6

skipif mysql # not compatible
query I rowsort label-2891
SELECT ALL - cor0.col1 / + 55 + - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-58
-6

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-2893
SELECT + tab0.col1 DIV 53 FROM tab0 GROUP BY tab0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-2893
SELECT + tab0.col1 / 53 FROM tab0 GROUP BY tab0.col1
----
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-2894
SELECT - + col1 + - ( + 71 ) DIV 51 AS col2 FROM tab2 GROUP BY tab2.col1
----
-42
-60
-62

skipif mysql # not compatible
query I rowsort label-2894
SELECT - + col1 + - ( + 71 ) / 51 AS col2 FROM tab2 GROUP BY tab2.col1
----
-42
-60
-62

query I rowsort
SELECT + 52 FROM tab2 cor0 GROUP BY col2
----
52
52
52

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2896
SELECT ALL - CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2896
SELECT ALL - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT tab1.col2 AS col1 FROM tab1 WHERE NOT - col2 IN ( tab1.col0 * - col1 ) GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT - - 43 - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-36
19
5

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2899
SELECT DISTINCT CAST( NULL AS SIGNED ) * + cor0.col1 + + col0 * CAST( NULL AS SIGNED ) col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2899
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + cor0.col1 + + col0 * CAST ( NULL AS INTEGER ) col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL

query I rowsort
SELECT + 94 FROM tab1 GROUP BY tab1.col0
----
94
94
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col1 + - COALESCE ( - 99, tab2.col1 * - tab2.col2 ) col1 FROM tab2 GROUP BY tab2.col1
----
140
158
160

query I rowsort
SELECT - cor0.col2 * + cor0.col2 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3422
-6320
-7656

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 39 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
39
39
39

query I rowsort
SELECT DISTINCT 22 AS col0 FROM tab2 GROUP BY tab2.col0
----
22

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col0, col1
----
0
81

query I rowsort
SELECT ALL - cor0.col1 * + 64 + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-2583
-3717
-3843

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 27 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
27
27
27

query I rowsort
SELECT ALL - 25 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-25
-25
-25

query I rowsort
SELECT DISTINCT - + tab2.col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + 50 FROM tab1 GROUP BY tab1.col2
----
50

query I rowsort
SELECT - cor0.col2 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-105
-38
-79

query I rowsort
SELECT ALL - 21 FROM tab1 GROUP BY tab1.col0
----
-21
-21
-21

onlyif mysql # DIV for integer division: 
query I rowsort label-2914
SELECT 63 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
10

skipif mysql # not compatible
query I rowsort label-2914
SELECT 63 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
10

query I rowsort
SELECT 87 FROM tab2 AS cor0 GROUP BY cor0.col1
----
87
87
87

query I rowsort
SELECT + 85 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
85
85
85

query I rowsort
SELECT DISTINCT cor0.col0 * 85 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1870
2380
6970

query I rowsort
SELECT + 82 AS col2 FROM tab0 GROUP BY tab0.col1
----
82
82

query I rowsort
SELECT - 73 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-5913
0

query I rowsort
SELECT DISTINCT tab2.col1 * + tab2.col1 + + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1722
3540
3782

query I rowsort
SELECT DISTINCT - tab2.col0 FROM tab2 WHERE - col1 IS NOT NULL GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT 20 AS col0 FROM tab1 GROUP BY col1
----
20
20
20

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( - 33, + tab2.col2 ) FROM tab2 GROUP BY tab2.col0
----
-33
-33
-33

query I rowsort
SELECT DISTINCT 87 FROM tab1 GROUP BY col1
----
87

query I rowsort
SELECT - ( col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 32, tab1.col1 + + 87, + CASE tab1.col1 WHEN ( + col1 ) THEN tab1.col2 WHEN - tab1.col1 THEN 38 ELSE NULL END + tab1.col0 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
32
32
32

query I rowsort
SELECT ALL 76 FROM tab2 GROUP BY col2
----
76
76
76

query I rowsort
SELECT 40 AS col1 FROM tab0 GROUP BY col0
----
40
40
40

query I rowsort
SELECT - 57 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2565
-4047
-456

query I rowsort
SELECT ALL + 11 FROM tab0 GROUP BY tab0.col2
----
11
11
11

onlyif mysql # DIV for integer division: 
query I rowsort label-2931
SELECT + ( - 94 ) DIV tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1
-3
-4

skipif mysql # not compatible
query I rowsort label-2931
SELECT + ( - 94 ) / tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1
-3
-4

query I rowsort
SELECT ALL + 90 FROM tab1 GROUP BY tab1.col1
----
90
90
90

query I rowsort
SELECT DISTINCT + 92 AS col1 FROM tab1 GROUP BY tab1.col0
----
92

query I rowsort
SELECT DISTINCT - 99 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-99

onlyif mysql # DIV for integer division: 
query I rowsort label-2935
SELECT DISTINCT - cor0.col1 DIV + 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2
0

skipif mysql # not compatible
query I rowsort label-2935
SELECT DISTINCT - cor0.col1 / + 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2
0

query I rowsort
SELECT + col0 + - 18 FROM tab0 GROUP BY col0
----
25
65
8

query I rowsort
SELECT ALL - - 45 * - 74 + 43 FROM tab1 GROUP BY col2
----
-3287
-3287
-3287

query I rowsort
SELECT + 85 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
85
85
85

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( 45, + tab1.col2 ) FROM tab1 GROUP BY tab1.col0
----
-45

query I rowsort
SELECT - + 20 - + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-111
-112
-35

query I rowsort
SELECT + - 96 FROM tab0 GROUP BY tab0.col0
----
-96
-96
-96

query I rowsort
SELECT ALL - 83 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-83
-83
-83

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT - - 33 FROM tab0 GROUP BY tab0.col0
----
33

query I rowsort
SELECT 26 AS col0 FROM tab2 GROUP BY tab2.col2
----
26
26
26

query I rowsort
SELECT + col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT + 29 + + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
108
53
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 74 + + tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
118
131
80

query I rowsort
SELECT - 69 FROM tab0 AS cor0 GROUP BY col2
----
-69
-69
-69

query I rowsort
SELECT 68 FROM tab1 GROUP BY col1
----
68
68
68

query I rowsort
SELECT ( + cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 92 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-92

query I rowsort
SELECT ALL + 72 + - 42 FROM tab2 AS cor0 GROUP BY cor0.col0
----
30
30
30

query I rowsort
SELECT DISTINCT - tab2.col1 * - 50 AS col1 FROM tab2 GROUP BY tab2.col1
----
2050
2950
3050

onlyif mysql # DIV for integer division: 
query I rowsort label-2956
SELECT + col0 DIV + cor0.col0 col2 FROM tab1 cor0 GROUP BY col0, cor0.col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2956
SELECT + col0 / + cor0.col0 col2 FROM tab1 cor0 GROUP BY col0, cor0.col1
----
1
1
1

query I rowsort
SELECT ALL - + tab0.col1 * + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-6561
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2958
SELECT - COALESCE ( 96, 25 DIV - tab0.col1, - col2 DIV tab0.col1 ) FROM tab0 GROUP BY tab0.col0
----
-96
-96
-96

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2958
SELECT - COALESCE ( 96, 25 / - tab0.col1, - col2 / tab0.col1 ) FROM tab0 GROUP BY tab0.col0
----
-96
-96
-96

query I rowsort
SELECT ALL + 21 FROM tab1 AS cor0 GROUP BY cor0.col2
----
21
21
21

query I rowsort
SELECT ALL + 69 FROM tab0 cor0 GROUP BY cor0.col1
----
69
69

query I rowsort
SELECT - NULLIF ( 36, - tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
-36
-36
-36

query I rowsort
SELECT + 93 AS col0 FROM tab0 GROUP BY tab0.col1
----
93
93

query I rowsort
SELECT - 72 + - 98 FROM tab2 GROUP BY tab2.col1
----
-170
-170
-170

query I rowsort
SELECT DISTINCT + ( tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT tab0.col1 * tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT tab2.col0 * + 54 AS col0 FROM tab2 GROUP BY tab2.col0
----
4914
4968
810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + cor0.col2 col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
17
20
26

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
81

query I rowsort
SELECT - tab2.col2 * + 34 FROM tab2 GROUP BY tab2.col2
----
-1972
-2686
-2958

query I rowsort
SELECT ALL + 13 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
13
13
13

onlyif mysql # DIV for integer division: 
query I rowsort label-2972
SELECT cor0.col0 DIV 64 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2972
SELECT cor0.col0 / 64 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT DISTINCT - - col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - COALESCE ( + cor0.col2, - cor0.col2, cor0.col1 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT - 87 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-87
-87
-87

query I rowsort
SELECT + 5 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
225
355
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * + col2 + - col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3405
-6300
-7630

onlyif mysql # DIV for integer division: 
query I rowsort label-2979
SELECT ALL - cor0.col1 DIV - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2979
SELECT ALL - cor0.col1 / - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 66 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
66
66
66

query I rowsort
SELECT ALL - - tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 + + tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT ALL - + tab2.col0 * tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT ( NULL ) IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT - 0 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - 37 + + col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-11
46
6

query I rowsort
SELECT DISTINCT + 38 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
38

query I rowsort
SELECT - cor0.col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-2991
SELECT - 32 DIV + 25 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2991
SELECT - 32 / + 25 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

query I rowsort
SELECT 96 FROM tab1 GROUP BY tab1.col1
----
96
96
96

onlyif mysql # DIV for integer division: 
query I rowsort label-2993
SELECT + - COALESCE ( - tab1.col1, + tab1.col1, col1 DIV + 82 ) + - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2993
SELECT + - COALESCE ( - tab1.col1, + tab1.col1, col1 / + 82 ) + - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT + cor0.col2 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

query I rowsort
SELECT - 65 + - 18 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-83
-83
-83

query I rowsort
SELECT DISTINCT 3 + col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
29
46
86

onlyif mysql # DIV for integer division: 
query I rowsort label-2997
SELECT + cor0.col1 DIV 63 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-2997
SELECT + cor0.col1 / 63 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1

query I rowsort
SELECT ALL - 90 AS col1 FROM tab0 GROUP BY tab0.col0
----
-90
-90
-90

query I rowsort
SELECT - 48 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
-48
-48
-48

query I rowsort
SELECT - 4 AS col1 FROM tab1 GROUP BY tab1.col2
----
-4
-4
-4

query I rowsort
SELECT ALL 73 AS col0 FROM tab1 GROUP BY tab1.col0
----
73
73
73

query I rowsort
SELECT 54 FROM tab1 GROUP BY tab1.col0
----
54
54
54

query I rowsort
SELECT - - col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT 42 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
42
42

query I rowsort
SELECT ALL - 21 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-21
-21

query I rowsort
SELECT DISTINCT 48 FROM tab0 GROUP BY tab0.col0
----
48

query I rowsort
SELECT DISTINCT 74 AS col2 FROM tab0 GROUP BY tab0.col1
----
74

query I rowsort
SELECT COALESCE ( tab2.col0, tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT COALESCE ( cor0.col2, - cor0.col2 ) * col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - 95 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-13
-67
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 70 col0 FROM tab1 AS cor0 GROUP BY col0
----
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * + 93 col1 FROM tab0 AS cor0 GROUP BY col0
----
-2418
-3999
-7719

query I rowsort
SELECT - col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL >= ( col1 )
----

query I rowsort
SELECT ALL + col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT ALL cor0.col2 * 84 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
4872
6636
7308

query I rowsort
SELECT - 54 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3132
-4266
-4698

query I rowsort
SELECT ALL 18 AS col0 FROM tab2 GROUP BY col1
----
18
18
18

query I rowsort
SELECT + col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT ALL + 12 AS col0 FROM tab0 GROUP BY tab0.col2
----
12
12
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 83 FROM tab1 AS cor0 GROUP BY col1
----
83

query I rowsort
SELECT DISTINCT 23 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3024
SELECT CAST( 99 AS SIGNED ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
99
99
99

skipif mysql # not compatible
query I rowsort label-3024
SELECT CAST ( 99 AS INTEGER ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
99
99
99

query I rowsort
SELECT ALL - 31 + col1 FROM tab0 AS cor0 GROUP BY col1
----
-31
50

query I rowsort
SELECT DISTINCT - 33 + + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
25
46
54

query I rowsort
SELECT DISTINCT + + 53 FROM tab2 GROUP BY col0
----
53

query I rowsort
SELECT 44 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 4 * cor0.col0 col0 FROM tab1 cor0 GROUP BY cor0.col0
----
112
328
88

query I rowsort
SELECT cor0.col0 + cor0.col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT ALL tab0.col2 * tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

onlyif mysql # DIV for integer division: 
query I rowsort label-3032
SELECT + tab2.col1 + - 81 DIV - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
42
60
62

skipif mysql # not compatible
query I rowsort label-3032
SELECT + tab2.col1 + - 81 / - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
42
60
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + COALESCE ( 1, + cor0.col1 + ( col0 ) * cor0.col1 ) col0 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 49 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-8
43
5

query I rowsort
SELECT - + 31 FROM tab2 GROUP BY tab2.col2
----
-31
-31
-31

query I rowsort
SELECT ALL + + tab1.col0 * COALESCE ( + tab1.col0 * + 83 + tab1.col0, + col0 + tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
40656
564816
65856

query I rowsort
SELECT ALL - 30 FROM tab0 GROUP BY col0
----
-30
-30
-30

query I rowsort
SELECT DISTINCT + - 77 - 62 AS col2 FROM tab2 GROUP BY tab2.col2
----
-139

query I rowsort
SELECT ALL + + ( - NULLIF ( + 44, - tab1.col2 ) ) AS col1 FROM tab1 GROUP BY tab1.col2
----
-44
-44
-44

query I rowsort
SELECT - 8 - - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-2
36
49

onlyif mysql # DIV for integer division: 
query I rowsort label-3041
SELECT DISTINCT COALESCE ( 79, cor0.col1 + - CASE 20 WHEN + cor0.col2 THEN NULL ELSE + cor0.col0 + ( 94 + cor0.col1 DIV cor0.col1 ) END * cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY col2
----
79

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3041
SELECT DISTINCT COALESCE ( 79, cor0.col1 + - CASE 20 WHEN + cor0.col2 THEN NULL ELSE + cor0.col0 + ( 94 + cor0.col1 / cor0.col1 ) END * cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY col2
----
79

query I rowsort
SELECT col2 + 74 FROM tab2 AS cor0 GROUP BY cor0.col2
----
132
153
161

query I rowsort
SELECT + tab1.col0 - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col2 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL + tab1.col0 + 26 FROM tab1 GROUP BY tab1.col0
----
108
48
54

query I rowsort
SELECT ALL + - 20 AS col0 FROM tab2 GROUP BY tab2.col0
----
-20
-20
-20

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3047
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3047
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 58 * + col2 FROM tab2 GROUP BY col2
----
3364
4582
5046

query I rowsort
SELECT DISTINCT - 90 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-19
-45
-82

query I rowsort
SELECT DISTINCT + + 61 FROM tab0 GROUP BY tab0.col2
----
61

query I rowsort
SELECT + - 65 FROM tab0 GROUP BY tab0.col2
----
-65
-65
-65

query I rowsort
SELECT DISTINCT 12 + 34 AS col1 FROM tab2 GROUP BY tab2.col2
----
46

query I rowsort
SELECT - 92 FROM tab2 GROUP BY tab2.col1
----
-92
-92
-92

query I rowsort
SELECT - 15 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-1215
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3055
SELECT ALL cor0.col2 DIV col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3055
SELECT ALL cor0.col2 / col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL + 93 FROM tab2 cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
44
57
6

query I rowsort
SELECT - 2 AS col0 FROM tab2 GROUP BY tab2.col0
----
-2
-2
-2

query I rowsort
SELECT - 30 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-24
14
27

query I rowsort
SELECT ALL - 85 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-85
-85
-85

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - 93 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-22
-48
-85

query I rowsort
SELECT - cor0.col0 - 4 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-30
-47
-87

query I rowsort
SELECT ALL + ( tab2.col2 ) AS col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT ( - 99 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
-99

query I rowsort
SELECT 13 * tab2.col2 FROM tab2 GROUP BY col2
----
1027
1131
754

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT + 71 FROM tab2 GROUP BY col0
----
71
71
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab2.col1 * + 16 col0 FROM tab2 GROUP BY tab2.col1
----
-656
-944
-976

query I rowsort
SELECT COALESCE ( + tab0.col0, tab0.col0 ) + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 64 col1 FROM tab1 AS cor0 GROUP BY col0
----
64

onlyif mysql # DIV for integer division: 
query I rowsort label-3072
SELECT cor0.col1 DIV - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3072
SELECT cor0.col1 / - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT tab1.col2 * 10 FROM tab1 GROUP BY tab1.col2
----
450
710
80

query I rowsort
SELECT 29 - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-53
1
7

query I rowsort
SELECT + 36 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT cor0.col1 + - ( 38 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
21
23
3

query I rowsort
SELECT DISTINCT - ( - 26 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
26

query I rowsort
SELECT - 82 AS col0 FROM tab0 GROUP BY col2
----
-82
-82
-82

query I rowsort
SELECT - cor0.col0 + + 45 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-46
-47
30

query I rowsort
SELECT + + 94 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
94
94

query I rowsort
SELECT DISTINCT - 3 FROM tab1 GROUP BY tab1.col2
----
-3

query I rowsort
SELECT DISTINCT + 45 FROM tab0 GROUP BY col1
----
45

query I rowsort
SELECT + 39 * - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-1716
-2223
-234

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + cor0.col0 * cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1288
198
5904

query I rowsort
SELECT col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IN ( + col2 )
----

query I rowsort
SELECT ALL + + tab2.col0 - 9 AS col2 FROM tab2 GROUP BY col0
----
6
82
83

query I rowsort
SELECT - 80 AS col1 FROM tab1 GROUP BY tab1.col0
----
-80
-80
-80

query I rowsort
SELECT ALL cor0.col1 * col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT 78 + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
104
121
161

query I rowsort
SELECT 72 FROM tab2 cor0 GROUP BY cor0.col0
----
72
72
72

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT - 2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-116
-158
-174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 56 col1 FROM tab1 GROUP BY tab1.col0
----
-56

onlyif mysql # DIV for integer division: 
query I rowsort label-3096
SELECT 5 * cor0.col2 + 94 DIV cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
227
356
51

skipif mysql # not compatible
query I rowsort label-3096
SELECT 5 * cor0.col2 + 94 / cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
227
356
51

query I rowsort
SELECT ALL 76 FROM tab1 cor0 GROUP BY cor0.col0
----
76
76
76

query I rowsort
SELECT - 23 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-23
-23
-23

query I rowsort
SELECT ALL - ( 89 ) FROM tab2 AS cor0 GROUP BY col1
----
-89
-89
-89

query I rowsort
SELECT - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT tab0.col1 FROM tab0 WHERE NOT ( NULL ) IS NOT NULL GROUP BY tab0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 col1 FROM tab2 GROUP BY tab2.col0 HAVING NOT ( NULL ) IS NOT NULL
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 35 - 41 col2 FROM tab2 GROUP BY tab2.col2
----
-6
-6
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-3104
SELECT cor0.col1 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3104
SELECT cor0.col1 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT ALL - + 67 * tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1474
-1876
-5494

query I rowsort
SELECT DISTINCT 78 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
78

onlyif mysql # DIV for integer division: 
query I rowsort label-3108
SELECT tab2.col0 DIV tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3108
SELECT tab2.col0 / tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT - 20 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
23
6
63

query I rowsort
SELECT ALL + 51 FROM tab0 AS cor0 GROUP BY cor0.col1
----
51
51

query I rowsort
SELECT DISTINCT - tab0.col0 - 84 FROM tab0 GROUP BY col0
----
-110
-127
-167

query I rowsort
SELECT + 90 FROM tab1 cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
90
90
90

query I rowsort
SELECT DISTINCT + 47 FROM tab0 cor0 GROUP BY cor0.col0
----
47

query I rowsort
SELECT + + 42 AS col1 FROM tab2 GROUP BY tab2.col1
----
42
42
42

query I rowsort
SELECT ALL 22 * + 93 AS col1 FROM tab2 GROUP BY tab2.col0
----
2046
2046
2046

query I rowsort
SELECT ALL - tab0.col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-3118
SELECT ALL + tab2.col1 + tab2.col1 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
42
60
62

skipif mysql # not compatible
query I rowsort label-3118
SELECT ALL + tab2.col1 + tab2.col1 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
42
60
62

query I rowsort
SELECT DISTINCT + 63 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
63

query I rowsort
SELECT DISTINCT + 42 FROM tab0 GROUP BY tab0.col0
----
42

query I rowsort
SELECT ALL 53 * - 92 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4876
-4876
-4876

onlyif mysql # DIV for integer division: 
query I rowsort label-3122
SELECT + tab2.col1 DIV - 7 FROM tab2 GROUP BY col1
----
-5
-8
-8

skipif mysql # not compatible
query I rowsort label-3122
SELECT + tab2.col1 / - 7 FROM tab2 GROUP BY col1
----
-5
-8
-8

query I rowsort
SELECT + 3 + tab2.col2 FROM tab2 GROUP BY col2
----
61
82
90

query I rowsort
SELECT ALL - 14 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1162
364
602

query I rowsort
SELECT DISTINCT 25 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
25

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3126
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3126
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 7 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
7
7
7

query I rowsort
SELECT cor0.col2 + 69 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
114
140
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col1 * tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT ALL col0 * + 95 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2470
4085
7885

query I rowsort
SELECT DISTINCT - + 22 FROM tab1 GROUP BY tab1.col1
----
-22

query I rowsort
SELECT DISTINCT - - tab1.col1 * + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL 56 FROM tab1 GROUP BY tab1.col1
----
56
56
56

query I rowsort
SELECT - col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT - cor0.col2 * + cor0.col1 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1920
38
79

query I rowsort
SELECT + 85 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
85
85
85

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT 40 + tab1.col0 * + 96 AS col1 FROM tab1 GROUP BY col0
----
2152
2728
7912

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3139
SELECT - CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3139
SELECT - CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-3140
SELECT ALL COALESCE ( 15, + 45 + + cor0.col0 DIV 98 ) AS col0 FROM tab0 cor0 GROUP BY col1
----
15
15

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3140
SELECT ALL COALESCE ( 15, + 45 + + cor0.col0 / 98 ) AS col0 FROM tab0 cor0 GROUP BY col1
----
15
15

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + + tab0.col1 * - 29 FROM tab0 GROUP BY tab0.col1
----
-2349
0

query I rowsort
SELECT tab2.col1 * - 50 + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-2009
-2891
-2989

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3145
SELECT DISTINCT cor0.col1 + + CAST( NULL AS SIGNED ) * + 12 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-3145
SELECT DISTINCT cor0.col1 + + CAST ( NULL AS INTEGER ) * + 12 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

query I rowsort
SELECT ALL col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
44
57
6

query I rowsort
SELECT 32 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 47 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
47
47
47

query I rowsort
SELECT 97 FROM tab2 AS cor0 GROUP BY col0
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 col1 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT 60 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( tab2.col0 ) col1 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL 72 AS col2 FROM tab0 GROUP BY tab0.col1
----
72
72

query I rowsort
SELECT ALL + + col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - + tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT + 91 + - 14 FROM tab1 GROUP BY tab1.col2
----
77

query I rowsort
SELECT ALL - - 29 FROM tab0 GROUP BY tab0.col2
----
29
29
29

query I rowsort
SELECT DISTINCT + COALESCE ( 36, + tab0.col1 * - tab0.col1 + 97 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
36

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3159
SELECT ALL cor0.col1 - CAST( NULL AS SIGNED ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3159
SELECT ALL cor0.col1 - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col1 - 63 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-144
-63

query I rowsort
SELECT - 41 + 90 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
49
49
49

query I rowsort
SELECT cor0.col1 + cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2082
5085
70

query I rowsort
SELECT - col0 AS col1 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - + 10 AS col1 FROM tab1 GROUP BY tab1.col2
----
-10

query I rowsort
SELECT ALL - cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3166
SELECT - 30 DIV + 1 FROM tab1 AS cor0 GROUP BY col1
----
-30
-30
-30

skipif mysql # not compatible
query I rowsort label-3166
SELECT - 30 / + 1 FROM tab1 AS cor0 GROUP BY col1
----
-30
-30
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 + 78 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
100
106
160

query I rowsort
SELECT + - 89 FROM tab2 GROUP BY tab2.col0
----
-89
-89
-89

query I rowsort
SELECT DISTINCT - 51 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-51

query I rowsort
SELECT ALL + cor0.col1 * 80 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6480

query I rowsort
SELECT + + tab0.col0 * 1 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-3172
SELECT DISTINCT + COALESCE ( + tab2.col2, - tab2.col2 DIV tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

skipif mysql # not compatible
query I rowsort label-3172
SELECT DISTINCT + COALESCE ( + tab2.col2, - tab2.col2 / tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2, col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col0 + + COALESCE ( 4, - 61 ) FROM tab2 cor0 GROUP BY cor0.col0
----
19
95
96

query I rowsort
SELECT 5 AS col1 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
5
5

query I rowsort
SELECT DISTINCT cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT 63 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT + 85 AS col1 FROM tab0 GROUP BY tab0.col1
----
85
85

query I rowsort
SELECT DISTINCT + - 77 FROM tab0 GROUP BY tab0.col0
----
-77

query I rowsort
SELECT DISTINCT - 87 * - 99 AS col1 FROM tab2 GROUP BY tab2.col0
----
8613

query I rowsort
SELECT DISTINCT - + 70 AS col0 FROM tab2 GROUP BY tab2.col0
----
-70

query I rowsort
SELECT 50 + - cor0.col2 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2515
-3074
2

query I rowsort
SELECT DISTINCT 43 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
43

query I rowsort
SELECT ALL - 91 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-91
-91
-91

query I rowsort
SELECT ALL - tab2.col1 * + 70 FROM tab2 GROUP BY tab2.col1
----
-2870
-4130
-4270

onlyif mysql # DIV for integer division: 
query I rowsort label-3186
SELECT DISTINCT ( cor0.col1 ) + - cor0.col1 DIV 26 FROM tab1 cor0 GROUP BY cor0.col1
----
43
55
6

skipif mysql # not compatible
query I rowsort label-3186
SELECT DISTINCT ( cor0.col1 ) + - cor0.col1 / 26 FROM tab1 cor0 GROUP BY cor0.col1
----
43
55
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0
0

query I rowsort
SELECT 43 FROM tab2 cor0 GROUP BY cor0.col1
----
43
43
43

onlyif mysql # DIV for integer division: 
query I rowsort label-3189
SELECT tab1.col0 DIV col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3189
SELECT tab1.col0 / col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT col0 + 38 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
120
60
66

query I rowsort
SELECT + + 17 AS col2 FROM tab1 GROUP BY tab1.col0
----
17
17
17

query I rowsort
SELECT 10 FROM tab0 GROUP BY tab0.col0
----
10
10
10

query I rowsort
SELECT + tab2.col0 * 24 FROM tab2 GROUP BY tab2.col0
----
2184
2208
360

query I rowsort
SELECT DISTINCT 5 * 51 FROM tab0 cor0 GROUP BY cor0.col1
----
255

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( 55, cor0.col1 + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-55

onlyif mysql # DIV for integer division: 
query I rowsort label-3196
SELECT DISTINCT + 80 DIV + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
13

skipif mysql # not compatible
query I rowsort label-3196
SELECT DISTINCT + 80 / + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
13

query I rowsort
SELECT - 66 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-66
-66
-66

query I rowsort
SELECT DISTINCT + cor0.col0 * + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + - 3 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-44
-62
-64

query I rowsort
SELECT - 45 * + 20 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-900
-900
-900

query I rowsort
SELECT ALL + 80 AS col2 FROM tab1 GROUP BY tab1.col0
----
80
80
80

query I rowsort
SELECT + cor0.col2 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1944

query I rowsort
SELECT ALL + 76 AS col0 FROM tab2 GROUP BY col1
----
76
76
76

query I rowsort
SELECT ALL - cor0.col0 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-12
-34
72

query I rowsort
SELECT + tab0.col2 + tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT + tab2.col1 - tab2.col1 FROM tab2 GROUP BY col1
----
0
0
0

query I rowsort
SELECT DISTINCT 13 AS col2 FROM tab2 GROUP BY tab2.col2
----
13

query I rowsort
SELECT ALL 87 FROM tab0 GROUP BY tab0.col2
----
87
87
87

query I rowsort
SELECT DISTINCT - 28 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
13
31
33

query I rowsort
SELECT ALL - + ( 90 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
-90
-90
-90

query I rowsort
SELECT DISTINCT - 9 FROM tab0 AS cor0 GROUP BY col1
----
-9

query I rowsort
SELECT DISTINCT + tab2.col1 + + 44 AS col2 FROM tab2 GROUP BY tab2.col1
----
103
105
85

query I rowsort
SELECT DISTINCT cor0.col1 * - 26 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2106
0

query I rowsort
SELECT ALL tab0.col2 - - col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT - 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-5
-5
-5

query I rowsort
SELECT 71 * - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1846
-3053
-5893

query I rowsort
SELECT ALL tab0.col1 FROM tab0 WHERE tab0.col2 IS NOT NULL GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT tab0.col0 IS NULL
----
26
43
83

query I rowsort
SELECT ALL tab0.col2 FROM tab0 WHERE ( - tab0.col2 * col2 ) IS NOT NULL GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL - 67 FROM tab0 AS cor0 GROUP BY col1
----
-67
-67

query I rowsort
SELECT + 9 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
9
9
9

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - 73 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-73

query I rowsort
SELECT - 95 + tab2.col0 FROM tab2 GROUP BY col0
----
-3
-4
-80

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL + tab1.col2 * 2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT ALL tab2.col2 * 40 FROM tab2 GROUP BY tab2.col2
----
2320
3160
3480

onlyif mysql # DIV for integer division: 
query I rowsort label-3228
SELECT DISTINCT - + tab1.col2 DIV - 51 FROM tab1 GROUP BY tab1.col2
----
0
1

skipif mysql # not compatible
query I rowsort label-3228
SELECT DISTINCT - + tab1.col2 / - 51 FROM tab1 GROUP BY tab1.col2
----
0
1

query I rowsort
SELECT DISTINCT - cor0.col2 * + 72 + NULLIF ( + cor0.col2, cor0.col2 ) / - 90 FROM tab1 AS cor0 GROUP BY col2
----
NULL

query I rowsort
SELECT ALL 6 FROM tab1 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT ALL + 49 AS col1 FROM tab2 GROUP BY tab2.col1
----
49
49
49

query I rowsort
SELECT ALL - - 24 FROM tab0 GROUP BY tab0.col1
----
24
24

query I rowsort
SELECT - 13 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1027
-312
-494

query I rowsort
SELECT + 83 FROM tab0 GROUP BY tab0.col1
----
83
83

query I rowsort
SELECT ALL - 74 AS col1 FROM tab1 GROUP BY tab1.col0
----
-74
-74
-74

query I rowsort
SELECT ALL + 69 AS col1 FROM tab1 GROUP BY tab1.col1
----
69
69
69

query I rowsort
SELECT 4 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
4
4
4

query I rowsort
SELECT ALL 13 FROM tab0 AS cor0 GROUP BY col0
----
13
13
13

query I rowsort
SELECT 40 * + col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
1520
3160
960

onlyif mysql # DIV for integer division: 
query I rowsort label-3240
SELECT ALL cor0.col2 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, col1, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3240
SELECT ALL cor0.col2 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, col1, cor0.col2
----
1
1
1

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
15
91
92

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + - cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 36 AS col2 FROM tab2 GROUP BY tab2.col0
----
36
36
36

query I rowsort
SELECT DISTINCT 82 * 37 FROM tab2 GROUP BY col1
----
3034

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 53 + - tab0.col0 col2 FROM tab0 GROUP BY col0
----
-136
-79
-96

query I rowsort
SELECT + cor0.col1 * 63 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2583
3717
3843

query I rowsort
SELECT ALL 55 FROM tab2 AS cor0 GROUP BY cor0.col1
----
55
55
55

query I rowsort
SELECT 90 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
90
90
90

query I rowsort
SELECT - - 35 FROM tab0 GROUP BY tab0.col2
----
35
35
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 11 col0 FROM tab0 GROUP BY tab0.col1
----
-11
-11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 33 col0 FROM tab1 GROUP BY tab1.col0
----
-33
-33
-33

query I rowsort
SELECT ALL + 73 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
73
73
73

query I rowsort
SELECT 25 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 8 col0 FROM tab2 GROUP BY tab2.col2
----
-8
-8
-8

query I rowsort
SELECT - + 36 AS col2 FROM tab1 GROUP BY tab1.col2
----
-36
-36
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-3257
SELECT + - ( 20 ) DIV - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3257
SELECT + - ( 20 ) / - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - 42 AS col1 FROM tab0 GROUP BY tab0.col0
----
-42

query I rowsort
SELECT ALL cor0.col2 - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-57
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab2.col1 col0 FROM tab2 GROUP BY col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-3261
SELECT - 50 DIV + tab2.col2 + - tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
-58
-79
-87

skipif mysql # not compatible
query I rowsort label-3261
SELECT - 50 / + tab2.col2 + - tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-3262
SELECT ALL 65 DIV cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
1
1
10

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3262
SELECT ALL 65 / cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
1
1
10

query I rowsort
SELECT DISTINCT + ( - 20 ) AS col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-20

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + - 5 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
19
33
74

query I rowsort
SELECT DISTINCT 61 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
61

onlyif mysql # DIV for integer division: 
query I rowsort label-3267
SELECT ( cor0.col2 ) DIV col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3267
SELECT ( cor0.col2 ) / col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
1
1
1

query I rowsort
SELECT - cor0.col2 * - col1 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
0
0
1944

query I rowsort
SELECT DISTINCT - 24 - + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-65
-83
-85

query I rowsort
SELECT + col1 - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + + 70 FROM tab2 GROUP BY tab2.col0
----
70

query I rowsort
SELECT DISTINCT ( col2 ) + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT DISTINCT + + 63 AS col2 FROM tab1 GROUP BY tab1.col2
----
63

query I rowsort
SELECT - + 9 + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
6
82
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 81 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
81
81

query I rowsort
SELECT ALL + 36 - + col1 FROM tab1 GROUP BY col1
----
-21
-8
30

query I rowsort
SELECT DISTINCT cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2, cor1.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 38 - 46 FROM tab2 GROUP BY tab2.col1
----
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT - cor0.col2 * - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
1944

query I rowsort
SELECT - 25 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-25
-25
-25

query I rowsort
SELECT 86 AS col1 FROM tab1 GROUP BY tab1.col1
----
86
86
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 66 col0 FROM tab0 GROUP BY tab0.col1
----
66
66

query I rowsort
SELECT DISTINCT - + col0 * + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + 14 col2 FROM tab0 AS cor0 GROUP BY col0
----
40
57
97

query I rowsort
SELECT DISTINCT 94 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
94

query I rowsort
SELECT - 37 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-37
-37

query I rowsort
SELECT DISTINCT - cor0.col1 + - col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-162
0

query I rowsort
SELECT col1 + - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3291
SELECT DISTINCT cor0.col2 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
5

skipif mysql # not compatible
query I rowsort label-3291
SELECT DISTINCT cor0.col2 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
5

query I rowsort
SELECT + - 19 AS col1 FROM tab1 GROUP BY tab1.col1
----
-19
-19
-19

query I rowsort
SELECT DISTINCT 29 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 15 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
15

query I rowsort
SELECT - 97 FROM tab1 GROUP BY tab1.col2
----
-97
-97
-97

query I rowsort
SELECT - 4 + + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
4
41
67

query I rowsort
SELECT DISTINCT ( tab0.col1 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT col2 * col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT - tab0.col1 + - 94 FROM tab0 GROUP BY tab0.col1
----
-175
-94

query I rowsort
SELECT - 71 * - col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
3124
4047
426

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, col1
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-3302
SELECT + + tab1.col0 DIV + 27 AS col1 FROM tab1 GROUP BY tab1.col0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-3302
SELECT + + tab1.col0 / + 27 AS col1 FROM tab1 GROUP BY tab1.col0
----
0
1
3

query I rowsort
SELECT - tab1.col2 * + 20 FROM tab1 GROUP BY tab1.col2
----
-1420
-160
-900

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT tab2.col0 + + COALESCE ( 70, + tab2.col2 * 26 ) FROM tab2 GROUP BY col0
----
161
162
85

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3305
SELECT ALL - - CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3305
SELECT ALL - - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT - - 48 FROM tab0 GROUP BY col2
----
48
48
48

query I rowsort
SELECT + col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT - 71 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-71
-71
-71

query I rowsort
SELECT DISTINCT - - tab2.col0 + + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT 44 FROM tab0 GROUP BY col2
----
44
44
44

query I rowsort
SELECT DISTINCT 37 - - tab0.col0 * - 34 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1425
-2785
-847

query I rowsort
SELECT DISTINCT + 55 AS col1 FROM tab0 GROUP BY tab0.col0
----
55

query I rowsort
SELECT ALL + 73 AS col1 FROM tab0 GROUP BY tab0.col0
----
73
73
73

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-17
-20
-26

query I rowsort
SELECT ALL 62 * cor0.col2 - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3555
4839
5333

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + - cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-164
-44
-56

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col2 - col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-11
-14
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col1 + tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL tab2.col0 * col0 + tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL IS NULL
----
240
8372
8556

query I rowsort
SELECT DISTINCT 8 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
8

query I rowsort
SELECT - 33 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-33
-33
-33

query I rowsort
SELECT ALL 6 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
6
6
6

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + CASE + 78 WHEN - 9 THEN + cor0.col0 END FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 30 * tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1140
2370
720

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3327
SELECT + CAST( NULL AS SIGNED ) - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3327
SELECT + CAST ( NULL AS INTEGER ) - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - 23 FROM tab0 GROUP BY tab0.col0
----
-23

query I rowsort
SELECT ALL 85 FROM tab2 GROUP BY tab2.col0
----
85
85
85

query I rowsort
SELECT - + 50 AS col0 FROM tab2 GROUP BY tab2.col1
----
-50
-50
-50

query I rowsort
SELECT + 44 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
44
44
44

query I rowsort
SELECT DISTINCT - NULLIF ( cor0.col0, - cor0.col0 * cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 48 FROM tab0 GROUP BY tab0.col1
----
48

query I rowsort
SELECT + 3 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
3
3
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + cor0.col2 * - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL - 30 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-30
-30
-30

query I rowsort
SELECT ALL 39 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
39
39
39

query I rowsort
SELECT DISTINCT + - tab0.col2 + - tab0.col2 * + ( NULLIF ( - 95, tab0.col2 ) ) AS col0 FROM tab0 GROUP BY tab0.col2
----
2256
3572
7426

query I rowsort
SELECT DISTINCT 29 AS col1 FROM tab1 GROUP BY tab1.col1
----
29

query I rowsort
SELECT DISTINCT - col0 + 6 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-16
-22
-76

query I rowsort
SELECT ALL + tab1.col1 * - 50 FROM tab1 GROUP BY tab1.col1
----
-2200
-2850
-300

onlyif mysql # DIV for integer division: 
query I rowsort label-3343
SELECT + cor0.col2 + + 47 DIV + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
13
46
71

skipif mysql # not compatible
query I rowsort label-3343
SELECT + cor0.col2 + + 47 / + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
13
46
71

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3344
SELECT DISTINCT + CAST( NULL AS SIGNED ) col0 FROM tab0 cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3344
SELECT DISTINCT + CAST ( NULL AS INTEGER ) col0 FROM tab0 cor0 GROUP BY cor0.col1
----
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3345
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3345
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col0
----
NULL

query I rowsort
SELECT CASE - tab1.col2 WHEN - tab1.col2 THEN - col2 + + 62 END + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
62
62
62

query I rowsort
SELECT 77 + - 94 FROM tab2 GROUP BY tab2.col2
----
-17
-17
-17

query I rowsort
SELECT 88 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
1936
2464
7216

query I rowsort
SELECT 27 * + 13 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
351
351

query I rowsort
SELECT ALL cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
58
79
87

query I rowsort
SELECT DISTINCT - tab1.col1 * 19 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1083
-114
-836

query I rowsort
SELECT 37 AS col0 FROM tab2 GROUP BY tab2.col1
----
37
37
37

onlyif mysql # DIV for integer division: 
query I rowsort label-3353
SELECT DISTINCT COALESCE ( + 25, + tab2.col1 - + tab2.col1, tab2.col1 DIV - 33 ) FROM tab2 GROUP BY col0
----
25

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3353
SELECT DISTINCT COALESCE ( + 25, + tab2.col1 - + tab2.col1, tab2.col1 / - 33 ) FROM tab2 GROUP BY col0
----
25

query I rowsort
SELECT ALL - + NULLIF ( - 60, + tab0.col2 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
60
60
60

query I rowsort
SELECT 48 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT ALL + - tab0.col0 * - 23 FROM tab0 GROUP BY tab0.col0
----
1909
598
989

query I rowsort
SELECT DISTINCT - + 22 + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
21
4
61

query I rowsort
SELECT DISTINCT - 41 + 55 * + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
2379
289
3094

query I rowsort
SELECT ALL + cor0.col1 * col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1944

query I rowsort
SELECT - 47 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-47
-47
-47

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-26
-43
-83

query I rowsort
SELECT ALL tab1.col2 + - 65 FROM tab1 GROUP BY tab1.col2
----
-20
-57
6

query I rowsort
SELECT - ( cor0.col2 ) * + col2 - ( cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-1444
-6241
-657

query I rowsort
SELECT ALL - 33 FROM tab2 GROUP BY tab2.col2
----
-33
-33
-33

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 65, tab1.col1 * + tab1.col1 + + tab1.col2 * tab1.col0 ) * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2925
4615
520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * 19 + + 22 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1561
22
22

query I rowsort
SELECT ALL 99 * 59 AS col0 FROM tab1 GROUP BY tab1.col0
----
5841
5841
5841

query I rowsort
SELECT DISTINCT - 83 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-83

query I rowsort
SELECT ALL - 22 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
36
57
65

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) * - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT ALL + 48 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
3888

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + - 51 AS col2 FROM tab2 GROUP BY col0
----
-51
-51
-51

query I rowsort
SELECT DISTINCT 3 * - col1 + - col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-164
-236
-244

query I rowsort
SELECT - 66 FROM tab2 AS cor0 GROUP BY col1, col2
----
-66
-66
-66

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + 9 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
9

query I rowsort
SELECT cor0.col0 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
182
184
30

query I rowsort
SELECT - cor0.col2 + col2 * - 10 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-264
-418
-869

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * cor0.col2 col1 FROM tab2 cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL 92 FROM tab2 AS cor0 GROUP BY cor0.col2
----
92
92
92

onlyif mysql # DIV for integer division: 
query I rowsort label-3382
SELECT ALL + cor0.col1 + - cor0.col1 DIV 82 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

skipif mysql # not compatible
query I rowsort label-3382
SELECT ALL + cor0.col1 + - cor0.col1 / 82 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
1640
3422
3660

query I rowsort
SELECT - cor0.col1 + 45 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-14
-16
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + 22 * tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1298
1342
902

query I rowsort
SELECT - + 1 * + 29 FROM tab2 GROUP BY tab2.col2
----
-29
-29
-29

query I rowsort
SELECT + 50 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
2900
3950
4350

query I rowsort
SELECT ALL - tab0.col2 * - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab0 GROUP BY col2 HAVING ( - col2 ) IS NOT NULL
----
24
38
79

query I rowsort
SELECT ALL tab0.col2 * - col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT 36 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT ALL 21 FROM tab0 GROUP BY col2
----
21
21
21

query I rowsort
SELECT - - 26 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-12
-53
2

query I rowsort
SELECT - 29 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1247
-2407
-754

query I rowsort
SELECT ALL - cor0.col0 * + ( + cor0.col0 ) + - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1892
-6972
-702

query I rowsort
SELECT 43 FROM tab1 cor0 GROUP BY col0
----
43
43
43

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT ALL tab1.col1 + 76 AS col0 FROM tab1 GROUP BY tab1.col1
----
120
133
82

query I rowsort
SELECT + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-3402
SELECT - cor0.col0 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3402
SELECT - cor0.col0 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL 66 - + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-17
23
40

query I rowsort
SELECT ALL + 50 AS col0 FROM tab2 GROUP BY tab2.col0
----
50
50
50

onlyif mysql # DIV for integer division: 
query I rowsort label-3405
SELECT DISTINCT 34 DIV cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-3405
SELECT DISTINCT 34 / cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0

query I rowsort
SELECT + cor0.col1 - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT + 2 AS col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor1.col2
----
2
2
2
2
2
2

query I rowsort
SELECT 0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT - 98 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-98
-98
-98

query I rowsort
SELECT DISTINCT - cor0.col2 * 47 FROM tab0 cor0 GROUP BY cor0.col2, col2
----
-1128
-1786
-3713

query I rowsort
SELECT + 65 - - 82 FROM tab2 GROUP BY tab2.col0
----
147
147
147

query I rowsort
SELECT DISTINCT col2 * - 96 FROM tab2 AS cor0 GROUP BY col2
----
-5568
-7584
-8352

query I rowsort
SELECT cor1.col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-3414
SELECT - col1 DIV - cor0.col1 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-43
-5
-56

skipif mysql # not compatible
query I rowsort label-3414
SELECT - col1 / - cor0.col1 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-43
-5
-56

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2, cor0.col1
----
-81
0

query I rowsort
SELECT 89 * + 0 + + col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-81
0
0

query I rowsort
SELECT - cor0.col2 + 76 FROM tab1 AS cor0 GROUP BY col2
----
31
5
68

query I rowsort
SELECT ALL + 66 FROM tab1 GROUP BY tab1.col0
----
66
66
66

query I rowsort
SELECT + col0 * 2 FROM tab0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT DISTINCT 82 AS col1 FROM tab2 GROUP BY tab2.col1
----
82

query I rowsort
SELECT ALL 14 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
14
14
14

query I rowsort
SELECT DISTINCT col0 * + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL + - col2 + 22 FROM tab0 GROUP BY tab0.col2
----
-16
-2
-57

query I rowsort
SELECT ALL 41 FROM tab1 GROUP BY tab1.col2
----
41
41
41

query I rowsort
SELECT - ( + 70 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
-70
-70
-70

query I rowsort
SELECT ALL 31 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
31
31
31

query I rowsort
SELECT DISTINCT - 99 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-99

query I rowsort
SELECT + - 21 AS col0 FROM tab1 GROUP BY tab1.col1
----
-21
-21
-21

query I rowsort
SELECT ALL + 61 AS col0 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
61
61
61

query I rowsort
SELECT DISTINCT cor0.col0 + + 90 FROM tab0 AS cor0 GROUP BY cor0.col0
----
116
133
173

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3432
SELECT CAST( NULL AS SIGNED ) / - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3432
SELECT CAST ( NULL AS INTEGER ) / - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 57 AS col1 FROM tab1 GROUP BY tab1.col2
----
-57

query I rowsort
SELECT 88 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2, cor1.col2
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT - 91 FROM tab2 cor0 GROUP BY col2
----
-91
-91
-91

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
102
150
170

query I rowsort
SELECT 89 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT ALL 86 * 39 FROM tab2 GROUP BY tab2.col0
----
3354
3354
3354

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 11 col0 FROM tab1 GROUP BY tab1.col0
----
11
11
11

query I rowsort
SELECT + + 33 AS col2 FROM tab1 GROUP BY tab1.col0
----
33
33
33

query I rowsort
SELECT - ( - tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - - 94 AS col2 FROM tab0 GROUP BY tab0.col0
----
94
94
94

query I rowsort
SELECT ALL - 49 FROM tab1 GROUP BY col1
----
-49
-49
-49

query I rowsort
SELECT - tab2.col2 * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

onlyif mysql # DIV for integer division: 
query I rowsort label-3445
SELECT ALL cor0.col2 DIV col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3445
SELECT ALL cor0.col2 / col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, col0
----
1
1
1

query I rowsort
SELECT ALL + cor0.col0 - 14 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
14
68
8

query I rowsort
SELECT 85 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
85
85
85

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT + col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - - tab2.col1 * + 81 AS col1 FROM tab2 GROUP BY tab2.col1
----
3321
4779
4941

query I rowsort
SELECT DISTINCT + + tab1.col0 + 63 AS col1 FROM tab1 GROUP BY tab1.col0
----
145
85
91

query I rowsort
SELECT ALL + + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-3455
SELECT DISTINCT tab0.col0 DIV - 82 col0 FROM tab0 GROUP BY col0
----
-1
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3455
SELECT DISTINCT tab0.col0 / - 82 col0 FROM tab0 GROUP BY col0
----
-1
0

query I rowsort
SELECT ALL - col2 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 AS col1 FROM tab1 cor0 GROUP BY col0, cor0.col1
----
1936
3249
36

query I rowsort
SELECT + ( - col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + + tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT - 78 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-78

query I rowsort
SELECT tab0.col2 AS col0 FROM tab0 GROUP BY col2 HAVING NULL IS NULL
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 + 34 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
40
78
91

query I rowsort
SELECT ALL - + 17 + - tab1.col2 * + 75 AS col1 FROM tab1 GROUP BY col2
----
-3392
-5342
-617

query I rowsort
SELECT + 81 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
125
138
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * 52 + 47 col1 FROM tab0 GROUP BY tab0.col2
----
1295
2023
4155

query I rowsort
SELECT + col2 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT - + tab2.col2 * 17 + 18 FROM tab2 GROUP BY tab2.col2
----
-1325
-1461
-968

query I rowsort
SELECT + + 19 FROM tab0 GROUP BY tab0.col1
----
19
19

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT + 11 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
11
11

query I rowsort
SELECT ALL - + 20 FROM tab2 GROUP BY tab2.col2
----
-20
-20
-20

query I rowsort
SELECT DISTINCT col0 FROM tab2 cor0 GROUP BY cor0.col0, col0
----
15
91
92

query I rowsort
SELECT DISTINCT + 22 FROM tab0 AS cor0 GROUP BY col1
----
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * + col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
132
1596
3608

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3475
SELECT cor0.col0 + + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3475
SELECT cor0.col0 + + CAST ( NULL AS REAL ) FROM tab2 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-158
-48
-76

onlyif mysql # DIV for integer division: 
query I rowsort label-3477
SELECT cor0.col0 DIV 35 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
84

skipif mysql # not compatible
query I rowsort label-3477
SELECT cor0.col0 / 35 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
84

query I rowsort
SELECT 82 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
82
82
82

query I rowsort
SELECT DISTINCT + 17 FROM tab2 GROUP BY tab2.col0
----
17

query I rowsort
SELECT + tab0.col1 * 43 FROM tab0 GROUP BY tab0.col1
----
0
3483

query I rowsort
SELECT DISTINCT cor0.col2 + + 14 FROM tab1 AS cor0 GROUP BY cor0.col2
----
22
59
85

query I rowsort
SELECT ALL 89 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
89
89
89

query I rowsort
SELECT ALL + + 94 FROM tab0 GROUP BY tab0.col0
----
94
94
94

query I rowsort
SELECT ALL 84 AS col2 FROM tab1 GROUP BY tab1.col2
----
84
84
84

query I rowsort
SELECT 36 AS col2 FROM tab2 GROUP BY tab2.col2
----
36
36
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 6 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-6
-6
-6

query I rowsort
SELECT DISTINCT 97 AS col1 FROM tab0 GROUP BY tab0.col2
----
97

query I rowsort
SELECT DISTINCT + - 1 FROM tab1 GROUP BY tab1.col2
----
-1

query I rowsort
SELECT DISTINCT 46 * - 93 FROM tab2 GROUP BY tab2.col2
----
-4278

query I rowsort
SELECT 53 - - 19 * cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
1136
167
889

query I rowsort
SELECT DISTINCT - 97 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-97

query I rowsort
SELECT ALL + 3 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT ALL 68 FROM tab2 GROUP BY tab2.col1
----
68
68
68

query I rowsort
SELECT ALL col1 + - col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT cor0.col1 + - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-26
-83
38

query I rowsort
SELECT ( + 82 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
82
82

query I rowsort
SELECT col0 * - 35 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2870
-770
-980

query I rowsort
SELECT - cor0.col0 + + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT ALL 7 AS col0 FROM tab0 GROUP BY col1
----
7
7

query I rowsort
SELECT - cor0.col1 - - cor0.col1 * ( ( + cor0.col1 ) ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1640
3422
3660

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT 72 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
72
72
72

query I rowsort
SELECT DISTINCT - + 41 FROM tab0 GROUP BY tab0.col1
----
-41

onlyif mysql # DIV for integer division: 
query I rowsort label-3505
SELECT DISTINCT - - ( - 61 ) DIV tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
-1
-2
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3505
SELECT DISTINCT - - ( - 61 ) / tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
-1
-2
0

query I rowsort
SELECT DISTINCT + 46 FROM tab2 GROUP BY tab2.col1
----
46

query I rowsort
SELECT - cor0.col1 + cor0.col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY col1, col2
----
-1444
-6241
-657

query I rowsort
SELECT ALL - tab2.col0 * + tab2.col0 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-210
-8190
-8372

query I rowsort
SELECT DISTINCT - + 87 AS col2 FROM tab2 GROUP BY col0
----
-87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3510
SELECT ALL CAST( NULL AS SIGNED ) / + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3510
SELECT ALL CAST ( NULL AS INTEGER ) / + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
NULL
NULL
NULL

query I rowsort
SELECT 52 FROM tab0 GROUP BY tab0.col0
----
52
52
52

onlyif mysql # DIV for integer division: 
query I rowsort label-3512
SELECT ALL tab2.col0 DIV tab2.col0 FROM tab2 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3512
SELECT ALL tab2.col0 / tab2.col0 FROM tab2 GROUP BY col0
----
1
1
1

query I rowsort
SELECT DISTINCT + 46 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1012
1288
3772

query I rowsort
SELECT + col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
26
43
83

query I rowsort
SELECT 57 AS col1 FROM tab0 GROUP BY tab0.col0
----
57
57
57

query I rowsort
SELECT cor0.col1 + 33 FROM tab1 AS cor0 GROUP BY cor0.col1
----
39
77
90

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3517
SELECT - cor0.col1 / - CAST( NULL AS DECIMAL ) FROM tab1 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3517
SELECT - cor0.col1 / - CAST ( NULL AS REAL ) FROM tab1 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 66 FROM tab2 GROUP BY tab2.col0
----
66
66
66

query I rowsort
SELECT 49 FROM tab0 GROUP BY tab0.col0
----
49
49
49

query I rowsort
SELECT ALL - ( 57 ) AS col2 FROM tab0 GROUP BY col1
----
-57
-57

query I rowsort
SELECT + cor0.col1 * 1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 - 18 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1867
-6907
-694

query I rowsort
SELECT - 21 + + 20 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + + COALESCE ( + ( + 81 ), tab2.col0 * + tab2.col1 + + tab2.col1 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
158
48
76

onlyif mysql # DIV for integer division: 
query I rowsort label-3526
SELECT ALL 43 DIV 43 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3526
SELECT ALL 43 / 43 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-3527
SELECT - tab2.col2 + tab2.col2 DIV - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-59
-80
-88

skipif mysql # not compatible
query I rowsort label-3527
SELECT - tab2.col2 + tab2.col2 / - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-59
-80
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 + - cor0.col1 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL - - 95 AS col1 FROM tab0 GROUP BY tab0.col1
----
95
95

query I rowsort
SELECT + + tab0.col0 + - 15 FROM tab0 GROUP BY tab0.col0
----
11
28
68

query I rowsort
SELECT + ( 68 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
68
68
68

query I rowsort
SELECT 49 FROM tab0 AS cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT + 40 * - 34 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1360
-1360
-1360

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 49 col1 FROM tab1 cor0 GROUP BY cor0.col0
----
49

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT - 29 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-29
-29
-29

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
142
16
90

onlyif mysql # DIV for integer division: 
query I rowsort label-3540
SELECT tab1.col1 DIV - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3540
SELECT tab1.col1 / - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT - cor0.col2 * - 57 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1368
2166
4503

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL - - 49 FROM tab0 GROUP BY tab0.col1
----
49
49

query I rowsort
SELECT DISTINCT - cor1.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-45
-71
-8

query I rowsort
SELECT + - tab2.col0 - + tab2.col0 * tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
-240
-8372
-8556

query I rowsort
SELECT 22 + col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
101
109
80

query I rowsort
SELECT 78 - 7 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
71
71
71

onlyif mysql # DIV for integer division: 
query I rowsort label-3548
SELECT + 54 DIV cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-3548
SELECT + 54 / cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
2

query I rowsort
SELECT - 97 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-97
-97
-97

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
22
28
82

query I rowsort
SELECT + 62 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
62
62
62

query I rowsort
SELECT DISTINCT - + 68 AS col0 FROM tab0 GROUP BY tab0.col2
----
-68

query I rowsort
SELECT ALL 8 FROM tab1 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT DISTINCT - 32 FROM tab2 GROUP BY tab2.col1
----
-32

query I rowsort
SELECT ALL cor0.col0 - - cor0.col2 * + 53 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
3166
4278
4626

query I rowsort
SELECT DISTINCT 58 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
58

query I rowsort
SELECT + + tab0.col2 - + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3559
SELECT tab0.col2 + tab0.col2 DIV - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
23
37
78

skipif mysql # not compatible
query I rowsort label-3559
SELECT tab0.col2 + tab0.col2 / - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
23
37
78

query I rowsort
SELECT - 87 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-29
-8
0

query I rowsort
SELECT ALL - ( col2 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT - 53 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-53
-53
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 17 FROM tab2 cor0 GROUP BY col2
----
17

query I rowsort
SELECT ALL - 85 AS col0 FROM tab2 GROUP BY tab2.col1
----
-85
-85
-85

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
1944

query I rowsort
SELECT - 34 AS col1 FROM tab2 GROUP BY tab2.col0
----
-34
-34
-34

query I rowsort
SELECT ALL 1 FROM tab1 GROUP BY col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-3569
SELECT ALL - cor0.col0 - + cor0.col1 DIV ( - NULLIF ( - cor0.col0, cor0.col1 * cor0.col0 ) ) FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-44
-83

skipif mysql # not compatible
query I rowsort label-3569
SELECT ALL - cor0.col0 - + cor0.col1 / ( - NULLIF ( - cor0.col0, cor0.col1 * cor0.col0 ) ) FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-44
-83

query I rowsort
SELECT ALL - tab1.col2 * 1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
210
8190
8372

query I rowsort
SELECT tab1.col2 * 8 AS col1 FROM tab1 GROUP BY tab1.col2
----
360
568
64

query I rowsort
SELECT ( 36 ) + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
107
44
81

query I rowsort
SELECT DISTINCT 64 FROM tab0 GROUP BY tab0.col2
----
64

query I rowsort
SELECT ALL - 58 AS col2 FROM tab0 cor0 GROUP BY col1
----
-58
-58

query I rowsort
SELECT ALL 1 AS col0 FROM tab0 GROUP BY tab0.col0
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-3577
SELECT DISTINCT - cor0.col2 DIV 61 + cor0.col2 * - col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1260
-176
-5823

skipif mysql # not compatible
query I rowsort label-3577
SELECT DISTINCT - cor0.col2 / 61 + cor0.col2 * - col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1260
-176
-5823

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL + tab1.col0 * tab1.col0 FROM tab1 GROUP BY col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT DISTINCT tab1.col2 AS col0 FROM tab1 WHERE NOT - tab1.col0 IN ( - tab1.col2 ) GROUP BY tab1.col2 HAVING NOT - col2 IS NULL
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 47 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
47

query I rowsort
SELECT DISTINCT + - col1 * - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT + cor0.col2 - 83 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-25
-4
4

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + - tab2.col1 * ( 65 ) AS col1 FROM tab2 GROUP BY col1
----
-2665
-3835
-3965

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3586
SELECT DISTINCT - CAST( 74 AS SIGNED ) * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-1924
-3182
-6142

skipif mysql # not compatible
query I rowsort label-3586
SELECT DISTINCT - CAST ( 74 AS INTEGER ) * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-1924
-3182
-6142

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT + 7 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
7
7
7

query I rowsort
SELECT ALL - + ( tab1.col1 ) + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, col2
----
24
38
79

query I rowsort
SELECT 37 AS col2 FROM tab1 GROUP BY tab1.col2
----
37
37
37

query I rowsort
SELECT 20 FROM tab1 GROUP BY tab1.col2
----
20
20
20

query I rowsort
SELECT - ( 48 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
-48
-48
-48

query I rowsort
SELECT - + 22 * 97 FROM tab2 GROUP BY tab2.col1
----
-2134
-2134
-2134

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT 82 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT ALL 58 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
58
58
58

query I rowsort
SELECT ALL 75 AS col2 FROM tab2 GROUP BY tab2.col1
----
75
75
75

query I rowsort
SELECT + 76 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT DISTINCT 47 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
47

query I rowsort
SELECT DISTINCT + - ( 61 ) * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1586
-2623
-5063

query I rowsort
SELECT - - tab2.col0 * tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT + 77 FROM tab2 GROUP BY col0
----
77
77
77

query I rowsort
SELECT 82 AS col2 FROM tab1 GROUP BY tab1.col1
----
82
82
82

query I rowsort
SELECT DISTINCT + 58 AS col2 FROM tab0 GROUP BY tab0.col1
----
58

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3607
SELECT DISTINCT + + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3607
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 63 col1 FROM tab0 GROUP BY tab0.col2
----
63
63
63

query I rowsort
SELECT - + 33 FROM tab0 GROUP BY tab0.col2
----
-33
-33
-33

onlyif mysql # DIV for integer division: 
query I rowsort label-3610
SELECT 23 DIV 33 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

skipif mysql # not compatible
query I rowsort label-3610
SELECT 23 / 33 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT DISTINCT - + tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT 9 - + 17 FROM tab0 AS cor0 GROUP BY col0
----
-8
-8
-8

query I rowsort
SELECT ALL - 60 AS col1 FROM tab2 GROUP BY tab2.col0
----
-60
-60
-60

query I rowsort
SELECT 56 FROM tab0 GROUP BY col1
----
56
56

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( + 18, - cor0.col2 * + NULLIF ( + 36, + cor0.col1 + - cor0.col0 ) ) AS col1 FROM tab1 cor0 GROUP BY col1, cor0.col1
----
-18

query I rowsort
SELECT - 23 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
20
3
60

query I rowsort
SELECT DISTINCT - 28 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
-28

query I rowsort
SELECT 46 FROM tab2 AS cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT ALL - col0 + cor0.col0 * cor0.col0 FROM tab1 cor0 GROUP BY col0
----
462
6642
756

query I rowsort
SELECT + 91 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
91
91
91

query I rowsort
SELECT - ( 99 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-99
-99
-99

query I rowsort
SELECT ALL - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT 10 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, col0
----
10
10
10

query I rowsort
SELECT ALL - + col1 + + 84 FROM tab0 GROUP BY tab0.col1
----
3
84

query I rowsort
SELECT ALL - - tab2.col1 + 22 FROM tab2 GROUP BY tab2.col1
----
63
81
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * 21 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
-1239
-1281
-861

query I rowsort
SELECT col1 * - col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT - 65 FROM tab1 AS cor0 GROUP BY col0
----
-65
-65
-65

query I rowsort
SELECT DISTINCT 77 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
77

query I rowsort
SELECT DISTINCT 32 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
32

query I rowsort
SELECT ALL + 96 AS col1 FROM tab0 GROUP BY tab0.col2
----
96
96
96

query I rowsort
SELECT + - 10 FROM tab2 GROUP BY tab2.col0
----
-10
-10
-10

onlyif mysql # DIV for integer division: 
query I rowsort label-3635
SELECT + tab2.col0 DIV ( - 58 * tab2.col0 ) - + tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3635
SELECT + tab2.col0 / ( - 58 * tab2.col0 ) - + tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - 7 AS col1 FROM tab2 GROUP BY col0
----
-7
-7
-7

query I rowsort
SELECT 58 FROM tab2 GROUP BY col1
----
58
58
58

query I rowsort
SELECT + 67 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2948
3819
402

query I rowsort
SELECT ALL - cor0.col2 + col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3306
6162
7482

query I rowsort
SELECT DISTINCT tab0.col2 * + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT - - 1 AS col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT 67 AS col1 FROM tab2 GROUP BY col0
----
67

query I rowsort
SELECT + 47 FROM tab0 GROUP BY tab0.col2
----
47
47
47

query I rowsort
SELECT ALL cor0.col0 * + 36 FROM tab2 cor0 GROUP BY cor0.col0
----
3276
3312
540

query I rowsort
SELECT 57 FROM tab2 cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT - cor0.col0 * - col2 + - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
1215
168
5751

query I rowsort
SELECT ALL cor0.col0 - - 65 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
156
157
80

query I rowsort
SELECT ALL - + 55 FROM tab0 GROUP BY tab0.col1
----
-55
-55

query I rowsort
SELECT DISTINCT 2 * tab0.col1 + - COALESCE ( 36, + tab0.col1 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
-36
126

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col0 col0 FROM tab2 WHERE tab2.col0 IN ( + tab2.col0 + + tab2.col1 ) GROUP BY tab2.col0
----

query I rowsort
SELECT DISTINCT tab2.col2 + - col2 AS col0 FROM tab2 GROUP BY col2
----
0

query I rowsort
SELECT DISTINCT + 54 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
54

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT col1 * + tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT + 60 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
60

query I rowsort
SELECT 30 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT - 73 AS col2 FROM tab2 GROUP BY tab2.col0
----
-73
-73
-73

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3658
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor0.col0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3658
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor0.col0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - 20 + + 32 FROM tab2 AS cor0 GROUP BY col0
----
12
12
12

query I rowsort
SELECT ALL 3 FROM tab0 AS cor0 GROUP BY cor0.col2
----
3
3
3

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3661
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3661
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - 34, cor0.col2 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
34
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 + - 36 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
23
25
5

query I rowsort
SELECT DISTINCT - 2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2

query I rowsort
SELECT ALL 1 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT ALL + 25 FROM tab2 GROUP BY col2
----
25
25
25

query I rowsort
SELECT ALL - - 63 AS col0 FROM tab1 GROUP BY tab1.col1
----
63
63
63

query I rowsort
SELECT ALL + 94 FROM tab0 GROUP BY tab0.col0
----
94
94
94

query I rowsort
SELECT ALL - 63 FROM tab1 GROUP BY tab1.col1
----
-63
-63
-63

query I rowsort
SELECT + 49 FROM tab1 GROUP BY tab1.col1
----
49
49
49

query I rowsort
SELECT DISTINCT 95 FROM tab0 AS cor0 GROUP BY cor0.col2
----
95

query I rowsort
SELECT 50 + cor0.col2 * + 8 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
242
354
682

query I rowsort
SELECT ALL - 18 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-18
-18
-18

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - tab2.col0 * + tab2.col0 FROM tab2 WHERE tab2.col1 <= - col2 GROUP BY tab2.col0
----

query I rowsort
SELECT DISTINCT tab2.col1 * + tab2.col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + 68 col1 FROM tab1 AS cor0 GROUP BY col2
----
-3
23
60

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3678
SELECT DISTINCT - CAST( NULL AS DECIMAL ) * - 76 AS col1 FROM tab1 GROUP BY tab1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-3678
SELECT DISTINCT - CAST ( NULL AS REAL ) * - 76 AS col1 FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT ALL + 64 AS col1 FROM tab1 GROUP BY tab1.col2
----
64
64
64

query I rowsort
SELECT 83 AS col1 FROM tab1 GROUP BY tab1.col2
----
83
83
83

query I rowsort
SELECT DISTINCT - 76 AS col0 FROM tab1 GROUP BY tab1.col2
----
-76

query I rowsort
SELECT ALL 63 + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
107
120
69

query I rowsort
SELECT - - 47 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
106
108
88

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3684
SELECT ALL - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3684
SELECT ALL - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 54 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
54

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - 61 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-61
-61
-61

query I rowsort
SELECT ALL + col2 + + cor0.col2 * - ( - 90 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
5278
7189
7917

query I rowsort
SELECT DISTINCT COALESCE ( - cor0.col1, cor0.col1 ) * - 87 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7047

query I rowsort
SELECT DISTINCT - 57 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-57

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT cor0.col1 + 89 FROM tab1 AS cor0 GROUP BY col1
----
133
146
95

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 31 col1 FROM tab0 GROUP BY tab0.col0
----
31

query I rowsort
SELECT DISTINCT cor0.col1 + - ( CASE + cor0.col1 WHEN cor0.col1 THEN + cor0.col1 WHEN + cor0.col1 THEN NULL ELSE NULL END ) FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
0

query I rowsort
SELECT DISTINCT 72 FROM tab2 GROUP BY tab2.col0
----
72

query I rowsort
SELECT cor0.col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - cor0.col1 + - col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-118
-122
-82

query I rowsort
SELECT DISTINCT 55 + - 83 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1190
-7498
-7581

query I rowsort
SELECT - 38 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1634
-3154
-988

query I rowsort
SELECT DISTINCT - 35 FROM tab1 GROUP BY tab1.col2
----
-35

query I rowsort
SELECT ALL cor0.col2 + cor0.col2 FROM tab2 cor0 GROUP BY col2
----
116
158
174

onlyif mysql # DIV for integer division: 
query I rowsort label-3703
SELECT + 5 DIV cor0.col2 + - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
-22
-28
-82

skipif mysql # not compatible
query I rowsort label-3703
SELECT + 5 / cor0.col2 + - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + cor0.col2 - 46 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-38
25

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1444
576
6241

query I rowsort
SELECT + col1 * - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 76 col2 FROM tab2 GROUP BY tab2.col2
----
76
76
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 81 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT ALL - 96 AS col1 FROM tab2 GROUP BY tab2.col1
----
-96
-96
-96

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, col2
----
26
43
83

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - COALESCE ( cor0.col0, - cor0.col0 ) * + cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-132
-1596
-3608

query I rowsort
SELECT 55 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
55
55
55

query I rowsort
SELECT + tab2.col1 + + 34 FROM tab2 GROUP BY tab2.col1
----
75
93
95

query I rowsort
SELECT - 88 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-88
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 22 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-22
-22
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT 73 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
73
73
73

query I rowsort
SELECT DISTINCT + 41 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
41

query I rowsort
SELECT - cor0.col2 - 56 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-101
-127
-64

query I rowsort
SELECT DISTINCT - cor0.col1 * + ( + cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2565
-3124
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 63 col0 FROM tab0 GROUP BY col2
----
-63
-63
-63

onlyif mysql # DIV for integer division: 
query I rowsort label-3724
SELECT ALL + + 46 + + tab1.col0 DIV tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
47
47
47

skipif mysql # not compatible
query I rowsort label-3724
SELECT ALL + + 46 + + tab1.col0 / tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
47
47
47

query I rowsort
SELECT DISTINCT + 49 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4459
4508
735

query I rowsort
SELECT + - ( - tab2.col0 ) * tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT ALL cor0.col1 * 85 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3740
4845
510

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
44
57
6

query I rowsort
SELECT + cor0.col2 + 87 FROM tab2 cor0 GROUP BY cor0.col2
----
145
166
174

query I rowsort
SELECT - cor0.col1 + + 74 FROM tab2 AS cor0 GROUP BY cor0.col1
----
13
15
33

query I rowsort
SELECT + col2 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT + - 22 + + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
21
4
61

query I rowsort
SELECT - 82 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-82
-82
-82

query I rowsort
SELECT DISTINCT col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
26
43
83

query I rowsort
SELECT - 37 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-1406
-2923
-888

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT - 60 + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-2
19
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col1 col2 FROM tab0 GROUP BY tab0.col1 HAVING ( NULL ) NOT IN ( + tab0.col1 )
----

query I rowsort
SELECT DISTINCT + ( 51 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
51

query I rowsort
SELECT DISTINCT 89 FROM tab2 GROUP BY tab2.col0
----
89

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3742
SELECT DISTINCT - CAST( NULL AS SIGNED ) * 26 FROM tab1 GROUP BY tab1.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3742
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * 26 FROM tab1 GROUP BY tab1.col0
----
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3743
SELECT - CAST( - 30 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
30
30
30

skipif mysql # not compatible
query I rowsort label-3743
SELECT - CAST ( - 30 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
30
30
30

query I rowsort
SELECT DISTINCT + 15 AS col0 FROM tab2 GROUP BY tab2.col0
----
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 93 * tab1.col0 + - 37 col0 FROM tab1 GROUP BY tab1.col0
----
-2083
-2641
-7663

query I rowsort
SELECT DISTINCT + cor0.col2 * + 4 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
180
284
32

query I rowsort
SELECT ALL 8 AS col2 FROM tab2 GROUP BY tab2.col2
----
8
8
8

query I rowsort
SELECT 51 FROM tab2 GROUP BY tab2.col1
----
51
51
51

onlyif mysql # DIV for integer division: 
query I rowsort label-3749
SELECT + - tab0.col1 DIV + 21 FROM tab0 GROUP BY tab0.col1
----
-3
0

skipif mysql # not compatible
query I rowsort label-3749
SELECT + - tab0.col1 / + 21 FROM tab0 GROUP BY tab0.col1
----
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + 14 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
38
52
93

query I rowsort
SELECT ALL col2 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab0.col0 + 19 col2 FROM tab0 GROUP BY tab0.col0
----
-24
-64
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + 30 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2460
660
840

query I rowsort
SELECT - 80 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-80
-80
-80

query I rowsort
SELECT + 34 FROM tab0 AS cor0 GROUP BY cor0.col1
----
34
34

query I rowsort
SELECT 31 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col2 FROM tab1 cor0 GROUP BY cor0.col2 HAVING NOT NULL BETWEEN ( NULL ) AND ( NULL )
----

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 WHERE NOT NULL IS NULL GROUP BY cor0.col1 HAVING NOT - col1 IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 col1 FROM tab1 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL - 71 FROM tab0 GROUP BY tab0.col2
----
-71
-71
-71

onlyif mysql # DIV for integer division: 
query I rowsort label-3761
SELECT - CASE cor0.col1 WHEN cor0.col1 THEN cor0.col1 DIV + cor0.col0 ELSE cor0.col2 * col2 END * col1 + 15 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-99
15
15

skipif mysql # not compatible
query I rowsort label-3761
SELECT - CASE cor0.col1 WHEN cor0.col1 THEN cor0.col1 / + cor0.col0 ELSE cor0.col2 * col2 END * col1 + 15 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-99
15
15

query I rowsort
SELECT DISTINCT + 1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1

query I rowsort
SELECT - + ( + 56 ) + + 34 FROM tab2 GROUP BY tab2.col1
----
-22
-22
-22

query I rowsort
SELECT ALL - cor0.col1 + - 55 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-136
-55
-55

query I rowsort
SELECT - 74 AS col1 FROM tab0 GROUP BY tab0.col2
----
-74
-74
-74

query I rowsort
SELECT 88 + 21 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1747
592
886

query I rowsort
SELECT + ( ( - cor0.col0 ) ) AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - 62 FROM tab1 cor0 GROUP BY cor0.col2
----
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 92 col2 FROM tab1 GROUP BY tab1.col0
----
-92

query I rowsort
SELECT tab0.col0 * + ( + 73 ) + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1924
3182
6142

query I rowsort
SELECT DISTINCT + - ( tab0.col2 ) AS col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT + 86 FROM tab0 GROUP BY tab0.col2
----
86
86
86

query I rowsort
SELECT + cor0.col1 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3483

query I rowsort
SELECT ( + cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 27 FROM tab0 AS cor0 GROUP BY cor0.col2
----
27
27
27

query I rowsort
SELECT col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 14 FROM tab2 AS cor0 GROUP BY cor0.col1
----
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab1.col0 col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT 41 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
41
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ( 3 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT col2 * - 2 FROM tab0 GROUP BY tab0.col2
----
-158
-48
-76

query I rowsort
SELECT ( - tab1.col1 ) AS col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT - ( + 41 ) - - cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-17
-3
38

query I rowsort
SELECT - 15 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-15
-15
-15

query I rowsort
SELECT + 62 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
62
62
62

onlyif mysql # DIV for integer division: 
query I rowsort label-3787
SELECT DISTINCT + 86 DIV + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
1
2
3

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3787
SELECT DISTINCT + 86 / + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
1
2
3

query I rowsort
SELECT + 35 AS col2 FROM tab2 GROUP BY tab2.col0
----
35
35
35

query I rowsort
SELECT - 66 * + col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1716
-2838
-5478

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT + 76 AS col1 FROM tab1 cor0 GROUP BY col2, cor0.col2, cor0.col1
----
76
76
76

query I rowsort
SELECT DISTINCT cor0.col0 * + ( - cor0.col0 ) FROM tab2 AS cor0 GROUP BY col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col2 * + tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT 4 FROM tab1 cor0 GROUP BY cor0.col0
----
4
4
4

query I rowsort
SELECT tab0.col1 * tab0.col1 + 34 FROM tab0 GROUP BY tab0.col1
----
34
6595

query I rowsort
SELECT ALL col2 / - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 col1 FROM tab1 WHERE NOT ( tab1.col1 ) IS NULL GROUP BY tab1.col0 HAVING NULL IS NULL
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 col2 FROM tab2 GROUP BY tab2.col1
----
44
44
44

query I rowsort
SELECT DISTINCT 53 AS col0 FROM tab1 GROUP BY col0
----
53

onlyif mysql # DIV for integer division: 
query I rowsort label-3801
SELECT DISTINCT + 13 DIV tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0

skipif mysql # not compatible
query I rowsort label-3801
SELECT DISTINCT + 13 / tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 + - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-116
-158
-174

query I rowsort
SELECT 0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
41
59
61

query I rowsort
SELECT col2 * tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2 HAVING NULL IS NULL
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col0 col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL NOT IN ( + col0 )
----

query I rowsort
SELECT cor0.col1 + 67 FROM tab0 cor0 GROUP BY cor0.col1
----
148
67

query I rowsort
SELECT + - tab0.col2 + - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-158
-48
-76

query I rowsort
SELECT ( cor0.col0 ) * + 80 FROM tab0 AS cor0 GROUP BY col0
----
2080
3440
6640

query I rowsort
SELECT DISTINCT - 33 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-33

query I rowsort
SELECT + 79 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
79
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 37 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
37
37
37

query I rowsort
SELECT 43 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col2
----
9 values hashing to 199105619049271147956de52e7f5ed4

query I rowsort
SELECT DISTINCT + 38 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
38

query I rowsort
SELECT - - tab1.col0 + + 83 AS col1 FROM tab1 GROUP BY col0
----
105
111
165

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 56 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
56

query I rowsort
SELECT DISTINCT + 64 FROM tab1 AS cor0 GROUP BY cor0.col1
----
64

query I rowsort
SELECT 13 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
104
585
923

query I rowsort
SELECT 90 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
90
90
90

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT + cor0.col1 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
3483

query I rowsort
SELECT ALL + 47 * - 9 - col1 FROM tab1 GROUP BY tab1.col1
----
-429
-467
-480

query I rowsort
SELECT + ( 93 ) FROM tab1 GROUP BY tab1.col1
----
93
93
93

query I rowsort
SELECT DISTINCT + + tab0.col2 * - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL + 47 * - col0 FROM tab0 GROUP BY tab0.col0
----
-1222
-2021
-3901

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-1980
-4970
-56

query I rowsort
SELECT + tab0.col1 + - tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT tab0.col1 = NULL
----

query I rowsort
SELECT + col2 + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT DISTINCT - + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL + 77 AS col1 FROM tab0 GROUP BY tab0.col1
----
77
77

query I rowsort
SELECT DISTINCT - + 47 AS col0 FROM tab2 GROUP BY col1
----
-47

query I rowsort
SELECT DISTINCT 42 FROM tab1 GROUP BY tab1.col2
----
42

query I rowsort
SELECT DISTINCT + - 37 AS col0 FROM tab0 GROUP BY col1
----
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 11 col2 FROM tab1 GROUP BY tab1.col2
----
-11
-11
-11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 52 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-52

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3839
SELECT CAST( + col1 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

skipif mysql # not compatible
query I rowsort label-3839
SELECT CAST ( + col1 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL - 4 * + 79 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-316
-316
-316

query I rowsort
SELECT DISTINCT col1 FROM tab2 cor0 GROUP BY col1, cor0.col1
----
41
59
61

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 64 AS col0 FROM tab0 GROUP BY tab0.col0
----
64

query I rowsort
SELECT 9 + 26 FROM tab2 AS cor0 GROUP BY col0
----
35
35
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 col2 FROM tab2 cor0 GROUP BY cor0.col0
----
47
47
47

query I rowsort
SELECT DISTINCT + 21 AS col2 FROM tab2 cor0 GROUP BY col0
----
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - - 19 AS col1 FROM tab0 GROUP BY tab0.col2
----
19

query I rowsort
SELECT ALL 12 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
18
56
69

query I rowsort
SELECT DISTINCT - 24 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-24

onlyif mysql # DIV for integer division: 
query I rowsort label-3852
SELECT ALL + cor0.col1 + col1 DIV - 9 FROM tab0 AS cor0 GROUP BY col1
----
0
72

skipif mysql # not compatible
query I rowsort label-3852
SELECT ALL + cor0.col1 + col1 / - 9 FROM tab0 AS cor0 GROUP BY col1
----
0
72

query I rowsort
SELECT col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL + 54 * col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
2376
3078
324

query I rowsort
SELECT ALL - + 32 FROM tab2 GROUP BY tab2.col0
----
-32
-32
-32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 89 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT ALL - 42 + + cor0.col2 FROM tab0 cor0 GROUP BY col1, cor0.col2, col0
----
-18
-4
37

query I rowsort
SELECT cor0.col0 + + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

onlyif mysql # DIV for integer division: 
query I rowsort label-3859
SELECT + ( + 95 ) * + tab0.col0 + - tab0.col0 DIV - 16 FROM tab0 GROUP BY tab0.col0
----
2471
4087
7890

skipif mysql # not compatible
query I rowsort label-3859
SELECT + ( + 95 ) * + tab0.col0 + - tab0.col0 / - 16 FROM tab0 GROUP BY tab0.col0
----
2471
4087
7890

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 1 col2 FROM tab1 GROUP BY tab1.col0
----
1
1
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3861
SELECT ALL - CAST( NULL AS SIGNED ) + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3861
SELECT ALL - CAST ( NULL AS INTEGER ) + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 97 AS col0 FROM tab0 GROUP BY tab0.col0
----
-97

query I rowsort
SELECT ( - 41 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-41
-41
-41

query I rowsort
SELECT 73 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
73
73
73

query I rowsort
SELECT + 79 FROM tab0 cor0 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT ALL - tab2.col2 * + 10 + 51 FROM tab2 GROUP BY tab2.col2
----
-529
-739
-819

query I rowsort
SELECT cor0.col1 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT cor0.col1 * + 2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
118
122
82

query I rowsort
SELECT ALL - cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT 13 FROM tab0 cor0 GROUP BY cor0.col1
----
13
13

query I rowsort
SELECT ALL tab2.col2 + tab2.col2 * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
3422
6320
7656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 77 + tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
135
156
164

query I rowsort
SELECT + 62 + - 99 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-37
-37
-37

query I rowsort
SELECT + - tab0.col0 * + 56 FROM tab0 GROUP BY col0
----
-1456
-2408
-4648

query I rowsort
SELECT ALL + - 95 * tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
-2280
-3610
-7505

query I rowsort
SELECT col0 AS col0 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT 67 FROM tab2 GROUP BY tab2.col2
----
67
67
67

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + 98 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
106
143
169

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 89 col0 FROM tab0 GROUP BY tab0.col0
----
89
89
89

onlyif mysql # DIV for integer division: 
query I rowsort label-3882
SELECT ALL col0 DIV + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3882
SELECT ALL col0 / + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 21 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
21
21
21

query I rowsort
SELECT DISTINCT 91 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
91

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - 2 FROM tab2 GROUP BY col2
----
-2
-2
-2

query I rowsort
SELECT ALL - 7 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-7
-7
-7

query I rowsort
SELECT ALL 13 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
13
13
13

query I rowsort
SELECT DISTINCT - - 0 AS col0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT ALL + 78 + - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-1
40
54

query I rowsort
SELECT - 23 * + col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1886
-506
-644

query I rowsort
SELECT + 96 FROM tab1 GROUP BY tab1.col2
----
96
96
96

query I rowsort
SELECT ALL + 60 FROM tab0 GROUP BY col1
----
60
60

query I rowsort
SELECT DISTINCT + col0 FROM tab2 AS cor0 GROUP BY col0 HAVING NOT NULL IS NOT NULL
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col0 * + tab2.col0 col1 FROM tab2 GROUP BY tab2.col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + 95 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
95
95
95

query I rowsort
SELECT 83 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
83
83
83

query I rowsort
SELECT DISTINCT + tab2.col2 * + tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT 48 * col2 FROM tab0 GROUP BY tab0.col2
----
1152
1824
3792

query I rowsort
SELECT DISTINCT + - 53 AS col1 FROM tab1 GROUP BY tab1.col0
----
-53

query I rowsort
SELECT tab2.col2 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT + 96 AS col2 FROM tab2 GROUP BY tab2.col1
----
96
96
96

query I rowsort
SELECT DISTINCT tab0.col1 - - col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT DISTINCT 71 AS col1 FROM tab0 GROUP BY tab0.col0
----
71

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT - 68 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-68
-68
-68

query I rowsort
SELECT ALL + - 79 AS col2 FROM tab1 GROUP BY tab1.col0
----
-79
-79
-79

query I rowsort
SELECT DISTINCT 13 FROM tab1 cor0 GROUP BY cor0.col2
----
13

query I rowsort
SELECT ALL + + 46 AS col1 FROM tab1 GROUP BY tab1.col1
----
46
46
46

query I rowsort
SELECT 28 FROM tab1 AS cor0 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT - NULLIF ( cor0.col1, cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-3915
SELECT - tab2.col1 DIV tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3915
SELECT - tab2.col1 / tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
-1
-1
-1

query I rowsort
SELECT + - 12 AS col0 FROM tab0 GROUP BY col2
----
-12
-12
-12

query I rowsort
SELECT DISTINCT + - 5 FROM tab0 GROUP BY tab0.col0
----
-5

onlyif mysql # DIV for integer division: 
query I rowsort label-3918
SELECT DISTINCT 14 DIV cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
0

skipif mysql # not compatible
query I rowsort label-3918
SELECT DISTINCT 14 / cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT - 84 FROM tab1 cor0 GROUP BY cor0.col2
----
-84
-84
-84

query I rowsort
SELECT DISTINCT ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - tab0.col0 + - col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col0 * 11 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
248
365
946

query I rowsort
SELECT - - col0 AS col2 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 81 FROM tab0 GROUP BY tab0.col2
----
-81

query I rowsort
SELECT DISTINCT - 39 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-39

query I rowsort
SELECT ALL cor0.col2 * 10 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
240
380
790

query I rowsort
SELECT DISTINCT + + 60 FROM tab0 GROUP BY tab0.col2
----
60

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3928
SELECT - CAST( NULL AS SIGNED ) AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3928
SELECT - CAST ( NULL AS INTEGER ) AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-3929
SELECT - tab1.col1 DIV + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3929
SELECT - tab1.col1 / + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT - col0 AS col2 FROM tab0 WHERE NOT NULL IS NULL GROUP BY tab0.col0
----

query I rowsort
SELECT tab2.col1 * + tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1722
3540
3782

query I rowsort
SELECT + 80 * - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-1200
-7280
-7360

query I rowsort
SELECT DISTINCT + 52 FROM tab0 GROUP BY tab0.col0
----
52

query I rowsort
SELECT DISTINCT 66 * col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5346

query I rowsort
SELECT col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT - + 47 * - col0 FROM tab2 GROUP BY col0
----
4277
4324
705

query I rowsort
SELECT - 49 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-49
-49
-49

query I rowsort
SELECT - 10 * tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-220
-280
-820

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 14 col2 FROM tab2 AS cor0 GROUP BY col1
----
14
14
14

query I rowsort
SELECT DISTINCT 2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2

query I rowsort
SELECT - - col0 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT 28 FROM tab2 GROUP BY tab2.col1
----
28
28
28

query I rowsort
SELECT DISTINCT + + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL - 93 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-93
-93
-93

query I rowsort
SELECT ALL + - ( - 84 ) FROM tab0 GROUP BY tab0.col1
----
84
84

query I rowsort
SELECT 14 FROM tab1 AS cor0 GROUP BY cor0.col1
----
14
14
14

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 + 71 FROM tab1 cor0 GROUP BY cor0.col0
----
555
6795
855

query I rowsort
SELECT ALL - - 27 FROM tab0 GROUP BY tab0.col2
----
27
27
27

query I rowsort
SELECT - + 10 FROM tab0 GROUP BY tab0.col2
----
-10
-10
-10

query I rowsort
SELECT ALL ( + 10 ) + - col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-35
-61
2

query I rowsort
SELECT - 58 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-14
-52

query I rowsort
SELECT + - 14 FROM tab0 GROUP BY tab0.col0
----
-14
-14
-14

onlyif mysql # DIV for integer division: 
query I rowsort label-3953
SELECT ALL cor0.col2 DIV + col2 + - 63 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-62
-62
-62

skipif mysql # not compatible
query I rowsort label-3953
SELECT ALL cor0.col2 / + col2 + - 63 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-62
-62
-62

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 45 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
45

query I rowsort
SELECT ALL 85 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
85
85
85

query I rowsort
SELECT 12 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
20
57
83

query I rowsort
SELECT DISTINCT 89 FROM tab1 GROUP BY tab1.col0
----
89

query I rowsort
SELECT ALL - tab2.col0 + tab2.col0 * 10 FROM tab2 GROUP BY tab2.col0
----
135
819
828

onlyif mysql # DIV for integer division: 
query I rowsort label-3960
SELECT ALL - cor0.col1 DIV cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3960
SELECT ALL - cor0.col1 / cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3961
SELECT DISTINCT CAST( NULL AS SIGNED ) + - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-3961
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL

query I rowsort
SELECT COALESCE ( + ( col2 ), + tab1.col2 ) AS col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL 99 FROM tab1 GROUP BY col0
----
99
99
99

query I rowsort
SELECT ALL + tab1.col2 * + 12 + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
104
585
923

query I rowsort
SELECT cor0.col0 + 62 FROM tab0 AS cor0 GROUP BY cor0.col0
----
105
145
88

query I rowsort
SELECT ALL + col1 + - col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + 4 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
4

onlyif mysql # DIV for integer division: 
query I rowsort label-3969
SELECT 4 DIV - col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3969
SELECT 4 / - col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3970
SELECT DISTINCT - cor0.col0 DIV 70 AS col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-1
0

skipif mysql # not compatible
query I rowsort label-3970
SELECT DISTINCT - cor0.col0 / 70 AS col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-1
0

query I rowsort
SELECT DISTINCT - 22 FROM tab2 cor0 GROUP BY cor0.col2
----
-22

query I rowsort
SELECT 57 FROM tab1 cor0 GROUP BY cor0.col1
----
57
57
57

query I rowsort
SELECT DISTINCT - col0 - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

query I rowsort
SELECT ALL + + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-3975
SELECT DISTINCT cor0.col1 DIV - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-3975
SELECT DISTINCT cor0.col1 / - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1

query I rowsort
SELECT ALL tab0.col0 + - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 * + ( 11 * + 59 ) col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-14278
-18172
-53218

query I rowsort
SELECT DISTINCT 75 + + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
113
154
99

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3979
SELECT DISTINCT + cor0.col1 + - CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-3979
SELECT DISTINCT + cor0.col1 + - CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT + cor0.col2 + - 18 FROM tab2 AS cor0 GROUP BY cor0.col2
----
40
61
69

query I rowsort
SELECT + col0 + - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - 29 + + 12 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-17

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT + + 60 FROM tab0 GROUP BY col2
----
60

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT 25 FROM tab2 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT ALL ( 48 ) FROM tab1 AS cor0 GROUP BY col2
----
48
48
48

query I rowsort
SELECT DISTINCT col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

onlyif mysql # DIV for integer division: 
query I rowsort label-3989
SELECT + - tab1.col1 DIV + 28 + tab1.col1 DIV + 49 AS col2 FROM tab1 GROUP BY col1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-3989
SELECT + - tab1.col1 / + 28 + tab1.col1 / + 49 AS col2 FROM tab1 GROUP BY col1
----
-1
-1
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3990
SELECT ALL CAST( - col1 AS SIGNED ) + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-29
16
38

skipif mysql # not compatible
query I rowsort label-3990
SELECT ALL CAST ( - col1 AS INTEGER ) + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-29
16
38

onlyif mysql # DIV for integer division: 
query I rowsort label-3991
SELECT ALL - 30 DIV cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3991
SELECT ALL - 30 / cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1
0
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 2, cor0.col0, cor0.col0 * - ( cor0.col2 * cor0.col1 ) ) * 27 FROM tab1 AS cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT DISTINCT + tab2.col0 + - col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT - tab2.col1 + COALESCE ( tab2.col1, ( - 95 ) ) * tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1640
3422
3660

query I rowsort
SELECT - 5 FROM tab0 GROUP BY tab0.col1
----
-5
-5

query I rowsort
SELECT DISTINCT - - 74 + + 16 AS col0 FROM tab1 GROUP BY tab1.col0
----
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 17 * + 17 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
289
289
289

query I rowsort
SELECT - cor0.col1 * + 72 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-2952
-4248
-4392

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( + 7, + cor0.col1 + - ( - col1 ), + 85 * cor0.col1 - CASE + 62 + - cor0.col1 WHEN - 83 - 85 THEN NULL ELSE cor0.col2 * + cor0.col1 END ) - 20 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-27

onlyif mysql # DIV for integer division: 
query I rowsort label-4000
SELECT cor0.col1 DIV 82 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-4000
SELECT cor0.col1 / 82 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0

query I rowsort
SELECT - 54 FROM tab1 GROUP BY col2
----
-54
-54
-54

query I rowsort
SELECT + tab1.col1 + + col1 AS col2 FROM tab1 GROUP BY col1
----
114
12
88

query I rowsort
SELECT ALL 91 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2002
2548
7462

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NULL > ( NULL ) AND NOT NULL = NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-4005
SELECT ALL - - tab2.col1 + tab2.col1 DIV - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
40
58
60

skipif mysql # not compatible
query I rowsort label-4005
SELECT ALL - - tab2.col1 + tab2.col1 / - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
40
58
60

onlyif mysql # DIV for integer division: 
query I rowsort label-4006
SELECT cor0.col2 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4006
SELECT cor0.col2 / cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT - cor0.col2 * + 24 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1896
-576
-912

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT - col1 FROM tab2 cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT 25 FROM tab0 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - col0 * 90 FROM tab1 GROUP BY tab1.col0
----
-1980
-2520
-7380

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY col1, col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4014
SELECT - - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4014
SELECT - - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-4015
SELECT DISTINCT + 23 DIV - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-2
0

skipif mysql # not compatible
query I rowsort label-4015
SELECT DISTINCT + 23 / - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-2
0

query I rowsort
SELECT DISTINCT + cor0.col1 + 63 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
144
63

query I rowsort
SELECT DISTINCT 63 * 10 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
630

query I rowsort
SELECT 15 FROM tab2 GROUP BY col2
----
15
15
15

query I rowsort
SELECT - 18 FROM tab0 GROUP BY col2
----
-18
-18
-18

query I rowsort
SELECT ALL + cor0.col2 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
105
121
67

query I rowsort
SELECT tab0.col1 AS col2 FROM tab0 WHERE NULL IS NULL GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 80 + - 22 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
58
58
58

query I rowsort
SELECT ( cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT ( - 66 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-66

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - 22 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-22
-22
-22

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT - 25 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
-25
-25
-25

query I rowsort
SELECT DISTINCT - 46 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-20
-3
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL 55 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
55
55
55

query I rowsort
SELECT - 25 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-25
-25
-25

query I rowsort
SELECT 9 FROM tab1 AS cor0 GROUP BY cor0.col0
----
9
9
9

query I rowsort
SELECT ALL + 37 - - 92 FROM tab0 AS cor0 GROUP BY cor0.col2
----
129
129
129

onlyif mysql # DIV for integer division: 
query I rowsort label-4035
SELECT DISTINCT + 25 DIV - tab1.col2 + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-11
-45
-71

skipif mysql # not compatible
query I rowsort label-4035
SELECT DISTINCT + 25 / - tab1.col2 + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-11
-45
-71

query I rowsort
SELECT 50 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
50
50
50

query I rowsort
SELECT cor0.col1 * - 51 FROM tab2 AS cor0 GROUP BY col1
----
-2091
-3009
-3111

query I rowsort
SELECT 11 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
19
56
82

onlyif mysql # DIV for integer division: 
query I rowsort label-4039
SELECT ALL - cor0.col1 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4039
SELECT ALL - cor0.col1 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

query I rowsort
SELECT + ( - 81 ) FROM tab2 GROUP BY col1
----
-81
-81
-81

query I rowsort
SELECT 76 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
76
76
76

query I rowsort
SELECT DISTINCT 69 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1518
1932
5658

query I rowsort
SELECT ALL - 91 FROM tab2 GROUP BY tab2.col1
----
-91
-91
-91

query I rowsort
SELECT ALL tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING tab2.col0 IS NOT NULL
----
15
91
92

query I rowsort
SELECT ALL tab0.col0 * + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT 44 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT + 5 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
5
5
5

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT - 65 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
-65
-65
-65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 36 col1 FROM tab0 AS cor0 GROUP BY col2
----
36
36
36

query I rowsort
SELECT - 13 * tab2.col1 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-492
-708
-732

query I rowsort
SELECT DISTINCT + tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - - 34 FROM tab0 GROUP BY tab0.col2
----
34

query I rowsort
SELECT col2 AS col2 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT 77 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
77

query I rowsort
SELECT ALL + 11 FROM tab2 AS cor0 GROUP BY col2
----
11
11
11

query I rowsort
SELECT - cor0.col1 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

onlyif mysql # DIV for integer division: 
query I rowsort label-4059
SELECT ALL - cor0.col0 DIV 43 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-4059
SELECT ALL - cor0.col0 / 43 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

query I rowsort
SELECT - - 61 FROM tab2, tab1 AS cor0 GROUP BY tab2.col0
----
61
61
61

query I rowsort
SELECT ALL 9 * - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-729
0

query I rowsort
SELECT DISTINCT 61 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2745
4331
488

query I rowsort
SELECT - + tab0.col0 - + col0 AS col0 FROM tab0 GROUP BY col0
----
-166
-52
-86

query I rowsort
SELECT - ( 0 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col0 + - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-38
26
83

query I rowsort
SELECT ALL - - col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT 98 FROM tab2 GROUP BY tab2.col1
----
98
98
98

query I rowsort
SELECT ALL + 15 * - col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-615
-885
-915

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 85 col1 FROM tab1 GROUP BY tab1.col2
----
-85
-85
-85

query I rowsort
SELECT - cor0.col0 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-32
-51
46

query I rowsort
SELECT ALL cor0.col2 * - 47 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2726
-3713
-4089

query I rowsort
SELECT - 94 + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-2
-3
-79

query I rowsort
SELECT 7 AS col0 FROM tab1 GROUP BY tab1.col0
----
7
7
7

query I rowsort
SELECT + 3 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT DISTINCT 31 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
31

query I rowsort
SELECT DISTINCT 66 * + cor0.col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2747
3953
4087

query I rowsort
SELECT + 66 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
66
66
66

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0, cor1.col0, cor1.col1
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + 89 FROM tab1 GROUP BY tab1.col1
----
89

query I rowsort
SELECT + cor1.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab0.col1 * tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT - + col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL + ( 76 ) AS col0 FROM tab2 GROUP BY tab2.col0
----
76
76
76

query I rowsort
SELECT DISTINCT + 26 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
26

query I rowsort
SELECT cor0.col1 + - 67 FROM tab0 AS cor0 GROUP BY col1
----
-67
14

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - - COALESCE ( 34, + tab0.col0 ) FROM tab0 GROUP BY tab0.col2
----
34
34
34

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4090
SELECT + + CAST( NULL AS SIGNED ) / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4090
SELECT + + CAST ( NULL AS INTEGER ) / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4091
SELECT CAST( 57 AS SIGNED ) AS col2 FROM tab0 GROUP BY tab0.col1
----
57
57

skipif mysql # not compatible
query I rowsort label-4091
SELECT CAST ( 57 AS INTEGER ) AS col2 FROM tab0 GROUP BY tab0.col1
----
57
57

query I rowsort
SELECT ALL + 83 AS col2 FROM tab0 GROUP BY tab0.col0
----
83
83
83

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4093
SELECT ALL - CAST( NULL AS DECIMAL ) AS col0 FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4093
SELECT ALL - CAST ( NULL AS REAL ) AS col0 FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT - NULLIF ( + ( + 19 ), - tab0.col0 ) * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1577
-494
-817

query I rowsort
SELECT DISTINCT + 41 AS col0 FROM tab2 GROUP BY tab2.col0
----
41

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col1
----
-81
0

query I rowsort
SELECT - 98 + - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-179
-98

onlyif mysql # DIV for integer division: 
query I rowsort label-4098
SELECT cor0.col2 DIV - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4098
SELECT cor0.col2 / - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL 18 FROM tab2 GROUP BY tab2.col0
----
18
18
18

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - tab2.col0 * + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT ( tab1.col2 ) IS NULL
----
45
71
8

query I rowsort
SELECT col1 + + 50 FROM tab0 GROUP BY tab0.col1
----
131
50

query I rowsort
SELECT ALL + col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 26 + - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
-32
-53
-61

query I rowsort
SELECT DISTINCT + 98 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
98

query I rowsort
SELECT ALL - col0 - + 56 AS col2 FROM tab0 GROUP BY tab0.col0
----
-139
-82
-99

onlyif mysql # DIV for integer division: 
query I rowsort label-4109
SELECT DISTINCT ( 22 ) DIV - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0

skipif mysql # not compatible
query I rowsort label-4109
SELECT DISTINCT ( 22 ) / - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT ALL 35 FROM tab0 AS cor0 GROUP BY col0
----
35
35
35

query I rowsort
SELECT DISTINCT - 40 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-40

query I rowsort
SELECT + 60 FROM tab2 GROUP BY tab2.col1
----
60
60
60

query I rowsort
SELECT - 38 FROM tab0 GROUP BY col2
----
-38
-38
-38

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4114
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4114
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT + ( 77 ) FROM tab1 GROUP BY tab1.col1
----
77
77
77

query I rowsort
SELECT 3 - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-78
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 57 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
57
57

query I rowsort
SELECT + 16 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
16
16
16

query I rowsort
SELECT - tab2.col0 + 66 FROM tab2 GROUP BY col0
----
-25
-26
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 48 * + tab2.col0 - - 7 col1 FROM tab2 GROUP BY tab2.col0
----
4375
4423
727

query I rowsort
SELECT DISTINCT 1 * - cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4122
SELECT + 80 DIV + cor0.col0 FROM tab2 cor0 GROUP BY col0
----
0
0
5

skipif mysql # not compatible
query I rowsort label-4122
SELECT + 80 / + cor0.col0 FROM tab2 cor0 GROUP BY col0
----
0
0
5

query I rowsort
SELECT + 41 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
41
41

query I rowsort
SELECT tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NULL > tab2.col2
----

query I rowsort
SELECT DISTINCT 45 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45

query I rowsort
SELECT + 24 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
24
24
24

query I rowsort
SELECT DISTINCT - 14 FROM tab2 GROUP BY tab2.col1
----
-14

query I rowsort
SELECT 2 FROM tab1 AS cor0 GROUP BY col0
----
2
2
2

query I rowsort
SELECT col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT - 96 FROM tab1 GROUP BY tab1.col2
----
-96
-96
-96

query I rowsort
SELECT + ( 84 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
84
84
84

onlyif mysql # DIV for integer division: 
query I rowsort label-4132
SELECT ALL cor0.col2 * + COALESCE ( - 82, cor0.col2 DIV + col1 + col2, - cor0.col2, col0 * 76 + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-4756
-6478
-7134

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4132
SELECT ALL cor0.col2 * + COALESCE ( - 82, cor0.col2 / + col1 + col2, - cor0.col2, col0 * 76 + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-4756
-6478
-7134

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 86 col1 FROM tab0 GROUP BY tab0.col2
----
86
86
86

query I rowsort
SELECT - - 31 AS col0 FROM tab1 GROUP BY tab1.col1
----
31
31
31

query I rowsort
SELECT ALL + + 14 FROM tab1 GROUP BY col2
----
14
14
14

query I rowsort
SELECT ALL - - 36 FROM tab2 GROUP BY col2
----
36
36
36

query I rowsort
SELECT ALL + + 16 FROM tab0 GROUP BY tab0.col1
----
16
16

query I rowsort
SELECT col0 + - 99 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-16
-56
-73

query I rowsort
SELECT DISTINCT - cor0.col0 * + 43 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-1118
-1849
-3569

query I rowsort
SELECT 86 AS col0 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
86
86
86

query I rowsort
SELECT DISTINCT + 49 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
49

query I rowsort
SELECT - - 91 FROM tab1 GROUP BY tab1.col1
----
91
91
91

query I rowsort
SELECT DISTINCT + cor0.col0 * ( + 22 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
1804
484
616

query I rowsort
SELECT - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - cor1.col0 - ( cor1.col0 ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-166
-52
-86

query I rowsort
SELECT col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-4148
SELECT - cor0.col0 DIV - 25 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
0
1
3

skipif mysql # not compatible
query I rowsort label-4148
SELECT - cor0.col0 / - 25 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
0
1
3

query I rowsort
SELECT - 40 * col2 FROM tab2 cor0 GROUP BY col2, cor0.col2
----
-2320
-3160
-3480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2378
-4661
-5307

query I rowsort
SELECT ALL 59 FROM tab0 GROUP BY col2
----
59
59
59

query I rowsort
SELECT DISTINCT - 29 FROM tab0 GROUP BY tab0.col1
----
-29

query I rowsort
SELECT DISTINCT - 48 FROM tab0 AS cor0 GROUP BY col1
----
-48

query I rowsort
SELECT DISTINCT + + 24 FROM tab2 GROUP BY tab2.col2
----
24

query I rowsort
SELECT 21 FROM tab0 GROUP BY col0
----
21
21
21

query I rowsort
SELECT - cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL 82 * col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3690
5822
656

query I rowsort
SELECT ALL + 99 FROM tab1 GROUP BY tab1.col0
----
99
99
99

query I rowsort
SELECT ALL 30 + - 63 FROM tab0 GROUP BY tab0.col0
----
-33
-33
-33

query I rowsort
SELECT - 52 AS col2 FROM tab2 GROUP BY tab2.col0
----
-52
-52
-52

query I rowsort
SELECT DISTINCT + 63 AS col2 FROM tab0 GROUP BY tab0.col0
----
63

query I rowsort
SELECT ALL - 1 * 54 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-54
-54
-54

query I rowsort
SELECT ALL + 0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

query I rowsort
SELECT + cor0.col0 * + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT - + 11 AS col2 FROM tab1 GROUP BY tab1.col2
----
-11

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0 cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-4167
SELECT + cor0.col1 DIV cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4167
SELECT + cor0.col1 / cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
1
1
1

query I rowsort
SELECT ALL - tab1.col2 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL tab2.col0 + 45 AS col1 FROM tab2 GROUP BY tab2.col0
----
136
137
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 18 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
18
18
18

query I rowsort
SELECT ALL 25 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
25
25
25

query I rowsort
SELECT - 38 FROM tab0 GROUP BY tab0.col0
----
-38
-38
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 58 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT DISTINCT cor0.col1 * + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
1681
3481
3721

query I rowsort
SELECT + cor0.col2 + + cor0.col2 / CASE + 31 WHEN + cor0.col2 + + col0 THEN cor0.col2 * cor0.col0 ELSE NULL END AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
NULL
NULL
NULL

query I rowsort
SELECT ( + 2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
2
2
2

onlyif mysql # DIV for integer division: 
query I rowsort label-4177
SELECT - tab2.col2 DIV 44 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4177
SELECT - tab2.col2 / 44 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col0, col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 13 col1 FROM tab0 AS cor0 GROUP BY col2
----
-13
-13
-13

query I rowsort
SELECT ALL + - col0 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + 67 FROM tab0 AS cor0 GROUP BY col0
----
67
67
67

query I rowsort
SELECT - 99 + 57 FROM tab0 cor0 GROUP BY cor0.col2
----
-42
-42
-42

query I rowsort
SELECT - 95 FROM tab1 GROUP BY tab1.col0
----
-95
-95
-95

onlyif mysql # DIV for integer division: 
query I rowsort label-4186
SELECT cor0.col1 DIV col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4186
SELECT cor0.col1 / col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT - ( + NULLIF ( - cor0.col0, - 81 + - cor0.col0 ) ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + 1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT ALL - 83 AS col0 FROM tab2 GROUP BY tab2.col1
----
-83
-83
-83

query I rowsort
SELECT ALL + tab1.col2 + + 2 AS col1 FROM tab1 GROUP BY tab1.col2
----
10
47
73

query I rowsort
SELECT DISTINCT + 86 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
86

query I rowsort
SELECT DISTINCT - - tab1.col1 * + 14 FROM tab1 GROUP BY tab1.col1
----
616
798
84

query I rowsort
SELECT DISTINCT + tab2.col2 * - tab2.col2 + - 98 FROM tab2 GROUP BY tab2.col2
----
-3462
-6339
-7667

query I rowsort
SELECT tab2.col2 * - tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT + tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING col0 IS NULL
----

query I rowsort
SELECT 2 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

query I rowsort
SELECT - tab1.col1 * col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-4198
SELECT DISTINCT - 79 DIV + tab1.col2 FROM tab1 GROUP BY col2
----
-1
-9

skipif mysql # not compatible
query I rowsort label-4198
SELECT DISTINCT - 79 / + tab1.col2 FROM tab1 GROUP BY col2
----
-1
-9

onlyif mysql # DIV for integer division: 
query I rowsort label-4199
SELECT - 44 DIV + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-7
0

skipif mysql # not compatible
query I rowsort label-4199
SELECT - 44 / + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-7
0

query I rowsort
SELECT DISTINCT - 62 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-62

query I rowsort
SELECT DISTINCT 36 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
36

query I rowsort
SELECT - 40 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1760
-2280
-240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col0 * - 24 col0 FROM tab1 GROUP BY tab1.col0
----
1968
528
672

query I rowsort
SELECT ALL cor0.col1 * 24 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1944

query I rowsort
SELECT 7 * 40 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
280
280
280

query I rowsort
SELECT ALL - 23 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1817
-552
-874

query I rowsort
SELECT DISTINCT 11 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
11

query I rowsort
SELECT - 5 * - cor0.col0 + + 88 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
218
303
503

query I rowsort
SELECT + cor0.col0 - + 84 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-41
-58

query I rowsort
SELECT ALL - ( + ( + 71 ) ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-71
-71
-71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 59 col0 FROM tab0 GROUP BY tab0.col2
----
59
59
59

query I rowsort
SELECT ALL + 0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
15
91
92

query I rowsort
SELECT cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
484
6724
784

query I rowsort
SELECT ALL - 84 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-84
-84
-84

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4216
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4216
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 44 * 26 FROM tab0 GROUP BY tab0.col1
----
1144

query I rowsort
SELECT + tab1.col1 * - 72 AS col0 FROM tab1 GROUP BY tab1.col1
----
-3168
-4104
-432

query I rowsort
SELECT DISTINCT ( col1 ) * - cor0.col1 + - cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-26
-6604
-83

query I rowsort
SELECT ALL + 25 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
25
25
25

query I rowsort
SELECT ALL + + 25 AS col2 FROM tab2 GROUP BY tab2.col0
----
25
25
25

query I rowsort
SELECT DISTINCT tab1.col2 * + 89 AS col2 FROM tab1 GROUP BY col2
----
4005
6319
712

onlyif mysql # DIV for integer division: 
query I rowsort label-4223
SELECT + + tab2.col2 DIV tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4223
SELECT + + tab2.col2 / tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT 34 AS col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
34
34

query I rowsort
SELECT - 48 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-48
-48
-48

query I rowsort
SELECT ALL 14 FROM tab1 GROUP BY col1
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 91 col1 FROM tab1 GROUP BY tab1.col0
----
91

query I rowsort
SELECT + 96 FROM tab0 GROUP BY tab0.col2
----
96
96
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 70 col0 FROM tab1 GROUP BY tab1.col2
----
70
70
70

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + + 41 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
41

query I rowsort
SELECT 89 FROM tab1 cor0 GROUP BY col2
----
89
89
89

query I rowsort
SELECT + 79 FROM tab2 AS cor0 GROUP BY col0
----
79
79
79

query I rowsort
SELECT DISTINCT + 32 FROM tab2 GROUP BY tab2.col1
----
32

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
22
28
82

query I rowsort
SELECT tab0.col0 FROM tab0, tab1 cor0 GROUP BY tab0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1260
176
5822

query I rowsort
SELECT DISTINCT cor0.col0 * ( 59 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1534
2537
4897

query I rowsort
SELECT - cor0.col2 * + 1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 98 * 0 col2 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT DISTINCT + 69 FROM tab0 GROUP BY tab0.col2
----
69

query I rowsort
SELECT ( + 41 ) FROM tab0 GROUP BY tab0.col2
----
41
41
41

query I rowsort
SELECT DISTINCT + col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
118
122
82

query I rowsort
SELECT 59 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
59
59
59

query I rowsort
SELECT DISTINCT 6 FROM tab1 GROUP BY tab1.col0
----
6

query I rowsort
SELECT tab1.col0 * tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + ( 14 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
14

query I rowsort
SELECT ( + tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT 35 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT - 20 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-20
-20
-20

query I rowsort
SELECT ALL + + ( + tab0.col1 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT + 70 * col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1540
1960
5740

query I rowsort
SELECT 27 * 14 FROM tab0 AS cor0 GROUP BY cor0.col2
----
378
378
378

query I rowsort
SELECT cor0.col2 * cor0.col2 + 77 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
1521
6318
653

query I rowsort
SELECT DISTINCT cor0.col1 + + 61 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
142
61

query I rowsort
SELECT cor0.col1 + cor0.col1 * 18 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
1083
114
836

query I rowsort
SELECT DISTINCT 89 + col1 AS col1 FROM tab0 GROUP BY col1
----
170
89

query I rowsort
SELECT ALL - - 73 FROM tab0 GROUP BY col2
----
73
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col0 * col0 col1 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT ALL - - ( + 9 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
9
9
9

query I rowsort
SELECT - col1 * cor0.col1 + + 95 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-6466
95
95

query I rowsort
SELECT ALL - + tab2.col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT + - 89 FROM tab1 GROUP BY tab1.col2
----
-89
-89
-89

query I rowsort
SELECT - 39 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1482
-3081
-936

query I rowsort
SELECT ALL 22 + + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
104
44
50

query I rowsort
SELECT DISTINCT 7 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
7

onlyif mysql # DIV for integer division: 
query I rowsort label-4268
SELECT ALL + cor0.col0 DIV + 73 col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4268
SELECT ALL + cor0.col0 / + 73 col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
1

query I rowsort
SELECT + + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL tab0.col0 * 63 AS col1 FROM tab0 GROUP BY tab0.col0
----
1638
2709
5229

query I rowsort
SELECT + + 12 FROM tab0 GROUP BY tab0.col2
----
12
12
12

query I rowsort
SELECT + 2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
2
2

query I rowsort
SELECT ALL 78 * + 74 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
5772
5772
5772

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT - 49 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col0
----
-49
-49
-49

query I rowsort
SELECT DISTINCT + 58 + - cor0.col1 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6503
58

query I rowsort
SELECT - 54 * - 17 FROM tab2 AS cor0 GROUP BY cor0.col1
----
918
918
918

query I rowsort
SELECT + 66 FROM tab0 AS cor0 GROUP BY cor0.col2
----
66
66
66

query I rowsort
SELECT 96 FROM tab1 AS cor0 GROUP BY col2
----
96
96
96

query I rowsort
SELECT + tab2.col0 + 77 * 85 AS col2 FROM tab2 GROUP BY tab2.col0
----
6560
6636
6637

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 42 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
42
42

query I rowsort
SELECT 28 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1232
1596
168

query I rowsort
SELECT - 29 FROM tab2 GROUP BY tab2.col2
----
-29
-29
-29

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
24
38
79

query I rowsort
SELECT + ( 45 ) FROM tab1 AS cor0 GROUP BY col1
----
45
45
45

query I rowsort
SELECT + col1 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT CASE col2 WHEN cor0.col2 THEN 81 * 8 WHEN cor0.col2 THEN cor0.col2 + - 81 END FROM tab1 AS cor0 GROUP BY col2
----
648
648
648

query I rowsort
SELECT DISTINCT 76 AS col0 FROM tab0 GROUP BY tab0.col2
----
76

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 5 FROM tab2 GROUP BY tab2.col0
----
5

onlyif mysql # DIV for integer division: 
query I rowsort label-4294
SELECT ALL - 97 + + cor0.col2 DIV - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-102
-97
-97

skipif mysql # not compatible
query I rowsort label-4294
SELECT ALL - 97 + + cor0.col2 / - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-102
-97
-97

query I rowsort
SELECT DISTINCT 33 FROM tab1 cor0 GROUP BY cor0.col1
----
33

query I rowsort
SELECT ALL + 99 AS col2 FROM tab1 GROUP BY tab1.col2
----
99
99
99

query I rowsort
SELECT ALL + 66 AS col1 FROM tab0 GROUP BY tab0.col1
----
66
66

query I rowsort
SELECT ALL 9 FROM tab0 GROUP BY tab0.col1
----
9
9

query I rowsort
SELECT ALL - 84 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-84
-84
-84

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 18, + cor0.col0 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
18
18
18

query I rowsort
SELECT ALL 25 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1125
1775
200

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - + COALESCE ( 70, tab0.col1 * - tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
-70
-70
-70

query I rowsort
SELECT DISTINCT + + ( + col2 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-4304
SELECT ALL + 36 DIV - 67 - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-41
-59
-61

skipif mysql # not compatible
query I rowsort label-4304
SELECT ALL + 36 / - 67 - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-41
-59
-61

query I rowsort
SELECT cor0.col0 * 2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
164
44
56

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( 18, tab0.col1 ) FROM tab0 GROUP BY tab0.col2
----
18

query I rowsort
SELECT + 81 FROM tab1 cor0 GROUP BY col1
----
81
81
81

query I rowsort
SELECT DISTINCT + 60 AS col2 FROM tab2 GROUP BY tab2.col0
----
60

query I rowsort
SELECT ALL + - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 1 col2 FROM tab2 GROUP BY tab2.col0
----
-1

query I rowsort
SELECT + 53 * - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-4823
-4876
-795

query I rowsort
SELECT 99 - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
7
8
84

query I rowsort
SELECT ALL cor0.col1 + + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
105
38
79

query I rowsort
SELECT ALL - + col2 * - 36 AS col0 FROM tab1 GROUP BY tab1.col2
----
1620
2556
288

query I rowsort
SELECT DISTINCT 11 FROM tab0 AS cor0 GROUP BY cor0.col2
----
11

query I rowsort
SELECT 20 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT + - 14 AS col2 FROM tab1 GROUP BY tab1.col1
----
-14
-14
-14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 57 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT ALL 79 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1738
2212
6478

query I rowsort
SELECT DISTINCT 34 FROM tab0 GROUP BY tab0.col0
----
34

query I rowsort
SELECT cor0.col0 + 42 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
125
68
85

query I rowsort
SELECT ALL COALESCE ( ( - cor0.col0 ), cor0.col2 ) + 46 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-36
18
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 3 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
3
3
3

onlyif mysql # DIV for integer division: 
query I rowsort label-4324
SELECT DISTINCT + cor0.col0 DIV - 86 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
0

skipif mysql # not compatible
query I rowsort label-4324
SELECT DISTINCT + cor0.col0 / - 86 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT + - 46 FROM tab0 GROUP BY tab0.col2
----
-46
-46
-46

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT 29 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
29
29
29

query I rowsort
SELECT ALL - tab0.col0 + 19 * - 63 FROM tab0 GROUP BY tab0.col0
----
-1223
-1240
-1280

query I rowsort
SELECT + 93 * + 42 FROM tab0 GROUP BY tab0.col1
----
3906
3906

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 87 - col2 col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
0
29
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 7 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-7

query I rowsort
SELECT DISTINCT col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT DISTINCT + 12 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
12

query I rowsort
SELECT - - 68 - - 30 AS col2 FROM tab0 GROUP BY tab0.col1
----
98
98

query I rowsort
SELECT + 52 AS col1 FROM tab1 GROUP BY tab1.col0
----
52
52
52

query I rowsort
SELECT ALL - - 78 * tab1.col0 + 34 AS col1 FROM tab1 GROUP BY tab1.col0
----
1750
2218
6430

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 77 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
77

query I rowsort
SELECT - tab2.col2 + + 91 AS col2 FROM tab2 GROUP BY col2
----
12
33
4

query I rowsort
SELECT + cor0.col0 * 84 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
2184
3612
6972

query I rowsort
SELECT 5 FROM tab0 AS cor0 GROUP BY col2
----
5
5
5

query I rowsort
SELECT - 81 FROM tab0 GROUP BY tab0.col1
----
-81
-81

query I rowsort
SELECT DISTINCT - + 22 * tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1804
-484
-616

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 31 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
31

query I rowsort
SELECT + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
58
79
87

query I rowsort
SELECT + + 13 FROM tab1 GROUP BY tab1.col2
----
13
13
13

query I rowsort
SELECT - 82 FROM tab1 GROUP BY tab1.col1
----
-82
-82
-82

query I rowsort
SELECT - 18 AS col2 FROM tab1 GROUP BY tab1.col0
----
-18
-18
-18

query I rowsort
SELECT + ( cor0.col0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 1 FROM tab0 GROUP BY tab0.col0
----
-1

query I rowsort
SELECT DISTINCT - tab2.col1 + + tab2.col1 FROM tab2 GROUP BY col1
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4351
SELECT - col0 - + 32 DIV 54 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

skipif mysql # not compatible
query I rowsort label-4351
SELECT - col0 - + 32 / 54 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - 19 + 54 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
35
35
35

onlyif mysql # DIV for integer division: 
query I rowsort label-4353
SELECT ALL + + 22 DIV 42 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4353
SELECT ALL + + 22 / 42 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL - 35 AS col2 FROM tab2 GROUP BY tab2.col1
----
-35
-35
-35

query I rowsort
SELECT + 3 AS col1 FROM tab1 GROUP BY tab1.col1
----
3
3
3

onlyif mysql # DIV for integer division: 
query I rowsort label-4356
SELECT + 86 DIV + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
10

skipif mysql # not compatible
query I rowsort label-4356
SELECT + 86 / + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
10

query I rowsort
SELECT DISTINCT - 88 + - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-129
-147
-149

onlyif mysql # DIV for integer division: 
query I rowsort label-4358
SELECT cor0.col1 DIV + 10 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4
5
6

skipif mysql # not compatible
query I rowsort label-4358
SELECT cor0.col1 / + 10 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4
5
6

query I rowsort
SELECT cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT - 42 FROM tab1 GROUP BY tab1.col0
----
-42

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT - 76 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-76
-76
-76

query I rowsort
SELECT - + 56 AS col2 FROM tab0 GROUP BY tab0.col0
----
-56
-56
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 85 - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
2
42
59

query I rowsort
SELECT - tab0.col1 AS col2 FROM tab0 WHERE ( col2 + tab0.col1 ) IS NOT NULL GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT + col0 + - tab1.col0 * + col0 FROM tab1 GROUP BY tab1.col0
----
-462
-6642
-756

query I rowsort
SELECT - - col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT + 57 + + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
101
114
63

query I rowsort
SELECT DISTINCT tab1.col0 - + 90 FROM tab1 GROUP BY tab1.col0
----
-62
-68
-8

query I rowsort
SELECT DISTINCT 3 AS col0 FROM tab2 GROUP BY tab2.col2
----
3

query I rowsort
SELECT DISTINCT + 54 AS col2 FROM tab2 GROUP BY tab2.col2
----
54

query I rowsort
SELECT DISTINCT - col1 + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT ( - 90 ) + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-131
-149
-151

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4375
SELECT CAST( NULL AS SIGNED ) * + tab1.col2 - 4 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4375
SELECT CAST ( NULL AS INTEGER ) * + tab1.col2 - 4 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 24 AS col0 FROM tab1 GROUP BY tab1.col2
----
24
24
24

query I rowsort
SELECT DISTINCT - cor0.col1 + + 74 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-7
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 96 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-96

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col0 - + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-164
-44
-56

query I rowsort
SELECT DISTINCT cor0.col1 * - 83 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6723
0

query I rowsort
SELECT ALL 40 AS col2 FROM tab2 GROUP BY tab2.col0
----
40
40
40

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( + 47, tab1.col0 - 36, tab1.col2 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
47
47
47

query I rowsort
SELECT ALL - cor0.col0 * 84 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2184
-3612
-6972

query I rowsort
SELECT ALL 15 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT 47 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
138
139
62

query I rowsort
SELECT ALL + 56 AS col0 FROM tab0 GROUP BY tab0.col0
----
56
56
56

query I rowsort
SELECT DISTINCT 19 FROM tab0 AS cor0 GROUP BY col0, col1
----
19

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + cor0.col1 * + COALESCE ( + 50, - cor0.col0, cor0.col0, cor0.col0 ) FROM tab1 AS cor0 GROUP BY col1
----
2200
2850
300

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT 72 FROM tab1 AS cor0 GROUP BY cor0.col1
----
72

query I rowsort
SELECT + tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT cor0.col2 * - 53 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2385
-3763
-424

query I rowsort
SELECT DISTINCT 1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col0, cor0.col0
----
1

query I rowsort
SELECT DISTINCT - 71 * + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-3124
-4047
-426

query I rowsort
SELECT ALL - 7 FROM tab0 cor0 GROUP BY cor0.col1
----
-7
-7

query I rowsort
SELECT tab1.col0 * tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
1936
3249
36

query I rowsort
SELECT cor0.col0 + 89 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
111
117
171

query I rowsort
SELECT - cor0.col2 + + 62 * + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
3538
4819
5307

query I rowsort
SELECT + 13 AS col2 FROM tab0 GROUP BY tab0.col0
----
13
13
13

query I rowsort
SELECT DISTINCT 82 FROM tab2 AS cor0 GROUP BY cor0.col2
----
82

query I rowsort
SELECT 34 FROM tab2 GROUP BY tab2.col0
----
34
34
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-114
-12
-88

query I rowsort
SELECT DISTINCT - tab1.col2 * 48 + tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-2115
-3337
-376

query I rowsort
SELECT - 36 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-36
-36
-36

query I rowsort
SELECT DISTINCT - - 87 AS col0 FROM tab0 GROUP BY col1
----
87

query I rowsort
SELECT ALL + 74 AS col0 FROM tab2 GROUP BY col1
----
74
74
74

query I rowsort
SELECT - 22 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-22
-22
-22

query I rowsort
SELECT 97 FROM tab2 AS cor0 GROUP BY col1
----
97
97
97

query I rowsort
SELECT - 58 FROM tab0 GROUP BY tab0.col0
----
-58
-58
-58

query I rowsort
SELECT - 28 + 44 AS col0 FROM tab1 GROUP BY tab1.col2
----
16
16
16

onlyif mysql # DIV for integer division: 
query I rowsort label-4413
SELECT DISTINCT cor0.col1 * + 38 + cor0.col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1673
2167
229

skipif mysql # not compatible
query I rowsort label-4413
SELECT DISTINCT cor0.col1 * + 38 + cor0.col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1673
2167
229

query I rowsort
SELECT - 89 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
-89
-89

query I rowsort
SELECT DISTINCT - cor0.col0 - - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT - tab0.col1 * 87 AS col2 FROM tab0 GROUP BY tab0.col1
----
-7047
0

query I rowsort
SELECT + col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4418
SELECT DISTINCT + + CAST( NULL AS SIGNED ) * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-4418
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
NULL

query I rowsort
SELECT DISTINCT 32 FROM tab2 AS cor0 GROUP BY cor0.col2
----
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - 42 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
-42
-42
-42

query I rowsort
SELECT - col2 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4423
SELECT ALL - col2 DIV + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4423
SELECT ALL - col2 / + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

query I rowsort
SELECT + - 77 AS col2 FROM tab2 GROUP BY tab2.col0
----
-77
-77
-77

query I rowsort
SELECT ALL + 6 FROM tab1 GROUP BY tab1.col2
----
6
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT - + 79 AS col1 FROM tab1 GROUP BY tab1.col1
----
-79
-79
-79

query I rowsort
SELECT DISTINCT + - 7 AS col0 FROM tab1 GROUP BY tab1.col1
----
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 27 col1 FROM tab1 GROUP BY tab1.col0
----
-27
-27
-27

query I rowsort
SELECT 1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT 22 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
22
22
22

query I rowsort
SELECT - 75 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-75
-75

query I rowsort
SELECT DISTINCT tab1.col2 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT ALL - 84 * col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3780
-5964
-672

query I rowsort
SELECT DISTINCT 1 FROM tab1 GROUP BY tab1.col1
----
1

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT - 62 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-62
-62
-62

query I rowsort
SELECT DISTINCT + 41 FROM tab2 GROUP BY tab2.col1
----
41

query I rowsort
SELECT ALL cor0.col0 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, col0
----
102
150
170

query I rowsort
SELECT ( + cor1.col2 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col2
----
24
38
79

query I rowsort
SELECT ALL - + 34 AS col0 FROM tab0 GROUP BY tab0.col1
----
-34
-34

query I rowsort
SELECT DISTINCT + + 93 AS col1 FROM tab1 GROUP BY tab1.col1
----
93

query I rowsort
SELECT DISTINCT + 81 AS col0 FROM tab2 GROUP BY tab2.col1
----
81

onlyif mysql # DIV for integer division: 
query I rowsort label-4445
SELECT DISTINCT 71 DIV 3 FROM tab1 cor0 GROUP BY col1
----
23

skipif mysql # not compatible
query I rowsort label-4445
SELECT DISTINCT 71 / 3 FROM tab1 cor0 GROUP BY col1
----
23

query I rowsort
SELECT DISTINCT + + 1 AS col2 FROM tab0 GROUP BY tab0.col0
----
1

query I rowsort
SELECT ALL cor0.col2 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, col0, cor0.col2
----
102
115
14

query I rowsort
SELECT DISTINCT 48 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
127
72
86

query I rowsort
SELECT DISTINCT + 23 AS col2 FROM tab1 GROUP BY tab1.col2
----
23

query I rowsort
SELECT DISTINCT - + tab0.col0 * 87 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-2288
-3784
-7304

query I rowsort
SELECT + + col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 17 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1343
1479
986

query I rowsort
SELECT - 57 AS col0 FROM tab1 GROUP BY tab1.col2
----
-57
-57
-57

query I rowsort
SELECT DISTINCT + cor0.col0 + col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT - col0 - 66 FROM tab0 GROUP BY col0
----
-109
-149
-92

query I rowsort
SELECT + 9 AS col2 FROM tab1 GROUP BY col0
----
9
9
9

query I rowsort
SELECT DISTINCT - + 80 FROM tab1 GROUP BY tab1.col1
----
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 AS cor0 GROUP BY col2, col0
----
-45
-71
-8

query I rowsort
SELECT DISTINCT col1 * + 68 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2788
4012
4148

query I rowsort
SELECT DISTINCT + 81 FROM tab1 GROUP BY tab1.col2
----
81

query I rowsort
SELECT DISTINCT - ( 49 ) FROM tab0 GROUP BY tab0.col2
----
-49

query I rowsort
SELECT - - 24 FROM tab0 GROUP BY tab0.col2
----
24
24
24

query I rowsort
SELECT - 36 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-36
-36
-36

query I rowsort
SELECT DISTINCT - 9 AS col2 FROM tab2 cor0 GROUP BY col1
----
-9

query I rowsort
SELECT 16 FROM tab1 AS cor0 GROUP BY cor0.col0
----
16
16
16

query I rowsort
SELECT 36 FROM tab2 AS cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT DISTINCT + - 10 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-10

query I rowsort
SELECT DISTINCT + 88 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
129
147
149

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT ALL - 12 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-12
-12
-12

onlyif mysql # DIV for integer division: 
query I rowsort label-4472
SELECT tab1.col2 DIV + tab1.col2 - - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
46
72
9

skipif mysql # not compatible
query I rowsort label-4472
SELECT tab1.col2 / + tab1.col2 - - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
46
72
9

query I rowsort
SELECT ALL 69 FROM tab2 AS cor0 GROUP BY cor0.col1
----
69
69
69

query I rowsort
SELECT - + 93 + + ( 32 ) FROM tab2 GROUP BY col1
----
-61
-61
-61

query I rowsort
SELECT - + ( tab2.col1 ) FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL + ( + 29 ) FROM tab0 GROUP BY tab0.col0
----
29
29
29

query I rowsort
SELECT DISTINCT + COALESCE ( 0, + 45 ) * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0

query I rowsort
SELECT - 14 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-616
-798
-84

query I rowsort
SELECT + - 54 AS col1 FROM tab1 GROUP BY tab1.col1
----
-54
-54
-54

query I rowsort
SELECT ALL col1 + - 25 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-25
56

onlyif mysql # DIV for integer division: 
query I rowsort label-4481
SELECT - - 99 DIV - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4481
SELECT - - 99 / - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-4483
SELECT + 9 DIV - tab1.col0 FROM tab1 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4483
SELECT + 9 / - tab1.col0 FROM tab1 GROUP BY col0
----
0
0
0

query I rowsort
SELECT DISTINCT 52 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
52

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4485
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-4485
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col1
----
NULL

query I rowsort
SELECT cor0.col2 * col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4487
SELECT CAST( NULL AS DECIMAL ) * - 64 + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4487
SELECT CAST ( NULL AS REAL ) * - 64 + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-3364
-6241
-7569

query I rowsort
SELECT tab0.col2 - - col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT ALL + tab2.col2 - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT DISTINCT - tab1.col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL - + 95 FROM tab0 GROUP BY tab0.col2
----
-95
-95
-95

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4493
SELECT DISTINCT - - CAST( NULL AS SIGNED ) FROM tab2 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-4493
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY col1
----
NULL

query I rowsort
SELECT DISTINCT - - 32 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1312
-1888
-1952

query I rowsort
SELECT + ( + tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 38 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
38

query I rowsort
SELECT ALL + - tab2.col0 + + ( + 36 ) FROM tab2 GROUP BY tab2.col0
----
-55
-56
21

query I rowsort
SELECT col1 + - cor0.col1 * - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3564

query I rowsort
SELECT 15 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
15
15
15

onlyif mysql # DIV for integer division: 
query I rowsort label-4500
SELECT + cor0.col2 DIV NULLIF ( + cor0.col2, - cor0.col2 * - ( - cor0.col0 DIV col0 ) ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4500
SELECT + cor0.col2 / NULLIF ( + cor0.col2, - cor0.col2 * - ( - cor0.col0 / col0 ) ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT 15 FROM tab0 cor0 GROUP BY cor0.col2
----
15

query I rowsort
SELECT - col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT ( 71 ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
71

query I rowsort
SELECT - 25 * tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-1125
-1775
-200

query I rowsort
SELECT - 91 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-91
-91
-91

query I rowsort
SELECT DISTINCT NULLIF ( col2, cor0.col2 ) * 41 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT ALL + + col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL 66 AS col1 FROM tab0 GROUP BY tab0.col2
----
66
66
66

query I rowsort
SELECT + - COALESCE ( - 24, + tab0.col1 - - 23 * - tab0.col1 ) FROM tab0 GROUP BY col1
----
24
24

query I rowsort
SELECT - 40 * - cor0.col1 AS col1 FROM tab1 cor0 GROUP BY col1
----
1760
2280
240

query I rowsort
SELECT 2 FROM tab2 AS cor0 GROUP BY col1
----
2
2
2

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT 35 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT ALL - 28 * - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
1064
2212
672

query I rowsort
SELECT 94 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
94
94

onlyif mysql # DIV for integer division: 
query I rowsort label-4516
SELECT cor0.col1 * ( - cor0.col0 DIV + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

skipif mysql # not compatible
query I rowsort label-4516
SELECT cor0.col1 * ( - cor0.col0 / + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT cor0.col0 * - 48 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1248
-2064
-3984

query I rowsort
SELECT - 6 FROM tab2 cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
-6
-6
-6

query I rowsort
SELECT 30 - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-15
-41
22

query I rowsort
SELECT - - 48 AS col1 FROM tab0 GROUP BY col2
----
48
48
48

query I rowsort
SELECT ALL + 89 FROM tab0 GROUP BY tab0.col1
----
89
89

query I rowsort
SELECT - col2 AS col1 FROM tab2 AS cor0 GROUP BY col0, col0, cor0.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 68 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-68
-68
-68

query I rowsort
SELECT DISTINCT - - 89 AS col2 FROM tab0 GROUP BY tab0.col1
----
89

query I rowsort
SELECT + 20 FROM tab2 AS cor0 GROUP BY col1
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 - 81 col0 FROM tab0 GROUP BY tab0.col2
----
-2
-43
-57

query I rowsort
SELECT - - col0 + - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT ALL - ( tab2.col0 ) * col0 FROM tab2 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL 97 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
97
97
97

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - + 22 FROM tab0 GROUP BY tab0.col2
----
-22

query I rowsort
SELECT ALL 92 AS col0 FROM tab1 GROUP BY tab1.col2
----
92
92
92

query I rowsort
SELECT col0 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 53 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
53
53
53

query I rowsort
SELECT 34 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
34
34
34

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - 47 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-47
-47
-47

query I rowsort
SELECT ALL + 56 FROM tab1 GROUP BY tab1.col0
----
56
56
56

onlyif mysql # DIV for integer division: 
query I rowsort label-4539
SELECT DISTINCT + 46 DIV - 25 FROM tab2 cor0 GROUP BY col2
----
-1

skipif mysql # not compatible
query I rowsort label-4539
SELECT DISTINCT + 46 / - 25 FROM tab2 cor0 GROUP BY col2
----
-1

query I rowsort
SELECT ALL + 52 FROM tab2 GROUP BY tab2.col1
----
52
52
52

query I rowsort
SELECT + 82 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-3608
-4674
-492

query I rowsort
SELECT - 36 AS col2 FROM tab1 GROUP BY tab1.col2
----
-36
-36
-36

query I rowsort
SELECT ALL + + 34 FROM tab1 GROUP BY col0
----
34
34
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - 22 ) col2 FROM tab0 GROUP BY tab0.col0
----
22
22
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 52 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
52

query I rowsort
SELECT 17 FROM tab0 AS cor0 GROUP BY cor0.col1
----
17
17

query I rowsort
SELECT + 95 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
95
95
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 col2 FROM tab1 AS cor0 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT 22 FROM tab1 GROUP BY tab1.col1
----
22

query I rowsort
SELECT DISTINCT 77 * 4 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
308

query I rowsort
SELECT + cor0.col1 * + col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL - + 68 AS col1 FROM tab2 GROUP BY tab2.col0
----
-68
-68
-68

query I rowsort
SELECT cor0.col1 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
126
28
85

query I rowsort
SELECT ALL - - tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT 30 * col2 FROM tab2 GROUP BY tab2.col2
----
1740
2370
2610

onlyif mysql # DIV for integer division: 
query I rowsort label-4557
SELECT DISTINCT + cor0.col2 + + cor0.col0 DIV - cor0.col1 FROM tab2 cor0 GROUP BY col0, cor0.col2, cor0.col1
----
56
78
87

skipif mysql # not compatible
query I rowsort label-4557
SELECT DISTINCT + cor0.col2 + + cor0.col0 / - cor0.col1 FROM tab2 cor0 GROUP BY col0, cor0.col2, cor0.col1
----
56
78
87

query I rowsort
SELECT + 54 AS col1 FROM tab1 GROUP BY tab1.col1
----
54
54
54

query I rowsort
SELECT DISTINCT 73 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
73

query I rowsort
SELECT DISTINCT - + ( 75 ) AS col1 FROM tab2 GROUP BY tab2.col1
----
-75

onlyif mysql # DIV for integer division: 
query I rowsort label-4561
SELECT DISTINCT + cor0.col1 DIV + col1 col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4561
SELECT DISTINCT + cor0.col1 / + col1 col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
1

query I rowsort
SELECT DISTINCT + + 89 AS col2 FROM tab2 GROUP BY tab2.col0
----
89

query I rowsort
SELECT ALL - + 26 - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
32
53
61

query I rowsort
SELECT DISTINCT + tab0.col0 * - 94 AS col0 FROM tab0 GROUP BY col0
----
-2444
-4042
-7802

query I rowsort
SELECT ALL - 90 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor1.col1
----
-90
-90
-90
-90
-90
-90

query I rowsort
SELECT DISTINCT 5 FROM tab2 cor0 GROUP BY cor0.col1
----
5

query I rowsort
SELECT - 1 FROM tab2 AS cor0 GROUP BY col2
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4568
SELECT ALL + tab2.col0 * CAST( 87 AS SIGNED ) AS col1 FROM tab2 GROUP BY tab2.col0
----
1305
7917
8004

skipif mysql # not compatible
query I rowsort label-4568
SELECT ALL + tab2.col0 * CAST ( 87 AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col0
----
1305
7917
8004

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 31 * 17 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
527
527
527

query I rowsort
SELECT 9 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
9
9
9

query I rowsort
SELECT DISTINCT cor0.col1 + - ( 58 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-58
23

onlyif mysql # DIV for integer division: 
query I rowsort label-4572
SELECT cor0.col1 DIV - 95 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4572
SELECT cor0.col1 / - 95 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + 25 AS col1 FROM tab2 GROUP BY tab2.col0
----
25

query I rowsort
SELECT DISTINCT + + tab1.col0 - + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT DISTINCT + ( 81 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
81

onlyif mysql # DIV for integer division: 
query I rowsort label-4576
SELECT cor0.col0 DIV + cor0.col0 + 13 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
573
742
79

skipif mysql # not compatible
query I rowsort label-4576
SELECT cor0.col0 / + cor0.col0 + 13 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
573
742
79

query I rowsort
SELECT ALL cor0.col0 * col0 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1873
6927
755

query I rowsort
SELECT DISTINCT 57 FROM tab1 AS cor0 GROUP BY col1
----
57

query I rowsort
SELECT ALL cor0.col0 * 56 FROM tab2 AS cor0 GROUP BY cor0.col0
----
5096
5152
840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * 52 col1 FROM tab2 cor0 GROUP BY col2, cor0.col0
----
3016
4108
4524

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 77 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1155
7007
7084

query I rowsort
SELECT + tab1.col0 + 45 AS col0 FROM tab1 GROUP BY tab1.col0
----
127
67
73

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT ALL 30 FROM tab1 GROUP BY tab1.col2
----
30
30
30

query I rowsort
SELECT DISTINCT + 21 AS col0 FROM tab2 GROUP BY tab2.col0
----
21

query I rowsort
SELECT + 88 + - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
50
64
9

query I rowsort
SELECT DISTINCT + + 89 AS col1 FROM tab0 GROUP BY tab0.col0
----
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 17 col1 FROM tab2 GROUP BY tab2.col0
----
17

query I rowsort
SELECT tab2.col2 + tab2.col2 * tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3422
6320
7656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-132
-1596
-3608

query I rowsort
SELECT 3 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
3
3

query I rowsort
SELECT - - 23 + + col0 * tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
1872
6912
699

query I rowsort
SELECT ALL - + 89 AS col2 FROM tab1 GROUP BY tab1.col1
----
-89
-89
-89

query I rowsort
SELECT DISTINCT - 64 + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-26
-40
15

query I rowsort
SELECT ALL - 62 * 26 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1612
-1612
-1612

query I rowsort
SELECT ALL 46 FROM tab0 AS cor0 GROUP BY col0
----
46
46
46

query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
3483

query I rowsort
SELECT DISTINCT 72 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
72

query I rowsort
SELECT - 70 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-12
17
9

query I rowsort
SELECT COALESCE ( + cor0.col1, cor0.col1 * 43, - cor0.col2, cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT ALL + + 15 FROM tab1 GROUP BY tab1.col0
----
15
15
15

query I rowsort
SELECT ALL - 12 FROM tab1 GROUP BY tab1.col2
----
-12
-12
-12

query I rowsort
SELECT DISTINCT + 18 AS col1 FROM tab0 GROUP BY tab0.col0
----
18

onlyif mysql # DIV for integer division: 
query I rowsort label-4606
SELECT - 17 DIV - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-4606
SELECT - 17 / - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
2

query I rowsort
SELECT ALL 39 * tab1.col2 + - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
1710
2698
304

query I rowsort
SELECT DISTINCT + - tab2.col2 + ( 41 ) AS col1 FROM tab2 GROUP BY col2
----
-17
-38
-46

query I rowsort
SELECT ALL 31 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
31
31
31

query I rowsort
SELECT DISTINCT + 42 FROM tab1 cor0 GROUP BY cor0.col1
----
42

query I rowsort
SELECT + + 92 FROM tab2 GROUP BY tab2.col0
----
92
92
92

query I rowsort
SELECT + - 29 AS col0 FROM tab0 GROUP BY tab0.col0
----
-29
-29
-29

query I rowsort
SELECT DISTINCT - col0 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING - col2 IS NOT NULL
----
45
71
8

query I rowsort
SELECT DISTINCT + 24 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
24

query I rowsort
SELECT + - 96 FROM tab1 GROUP BY tab1.col0
----
-96
-96
-96

query I rowsort
SELECT ALL tab1.col2 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT ALL + + tab0.col0 + tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT ALL + tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL + 24 FROM tab2 AS cor0 GROUP BY cor0.col0
----
24
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 47 col2 FROM tab0 GROUP BY tab0.col1
----
-47

query I rowsort
SELECT DISTINCT - 93 AS col1 FROM tab2 GROUP BY tab2.col1
----
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 50 * tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
2050
2950
3050

query I rowsort
SELECT cor0.col1 - - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT ALL + - tab1.col2 + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-142
-16
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
0
1944

query I rowsort
SELECT ALL ( - cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT ALL cor0.col0 + 96 FROM tab1 AS cor0 GROUP BY col0
----
118
124
178

query I rowsort
SELECT ALL 70 + cor0.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
152
92
98

query I rowsort
SELECT + cor0.col0 + cor0.col0 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

onlyif mysql # DIV for integer division: 
query I rowsort label-4631
SELECT - CASE cor0.col0 WHEN cor0.col2 THEN NULL ELSE 8 DIV 52 END AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4631
SELECT - CASE cor0.col0 WHEN cor0.col2 THEN NULL ELSE 8 / 52 END AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT - cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT - cor0.col2 - - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL tab1.col0 * + 5 FROM tab1 GROUP BY tab1.col0
----
110
140
410

query I rowsort
SELECT cor0.col2 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT - cor0.col1 * - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL col1 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
44
57
6

query I rowsort
SELECT cor0.col1 + + col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
162

query I rowsort
SELECT + cor0.col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
116
158
174

query I rowsort
SELECT ALL + ( 92 ) + col0 FROM tab0 GROUP BY tab0.col0
----
118
135
175

query I rowsort
SELECT - - 11 * - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-638
-869
-957

query I rowsort
SELECT ALL - - 47 - - col2 FROM tab1 GROUP BY tab1.col2
----
118
55
92

query I rowsort
SELECT 89 FROM tab0 cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT - col2 AS col1 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT - + tab0.col1 * 66 AS col2 FROM tab0 GROUP BY tab0.col1
----
-5346
0

query I rowsort
SELECT DISTINCT 83 AS col1 FROM tab1 GROUP BY col2
----
83

query I rowsort
SELECT DISTINCT - + 37 FROM tab2 GROUP BY tab2.col2
----
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 64 col0 FROM tab0 GROUP BY tab0.col0
----
64

query I rowsort
SELECT cor0.col1 * + cor0.col1 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
0
0
6561

query I rowsort
SELECT DISTINCT - 28 * tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-2296
-616
-784

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT tab0.col0 * col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT ALL tab1.col2 * - 32 AS col1 FROM tab1 GROUP BY tab1.col2
----
-1440
-2272
-256

onlyif mysql # DIV for integer division: 
query I rowsort label-4655
SELECT ALL + cor0.col1 DIV + col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
4

skipif mysql # not compatible
query I rowsort label-4655
SELECT ALL + cor0.col1 / + col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
4

onlyif mysql # DIV for integer division: 
query I rowsort label-4656
SELECT DISTINCT tab1.col1 DIV + 98 FROM tab1 GROUP BY tab1.col1
----
0

skipif mysql # not compatible
query I rowsort label-4656
SELECT DISTINCT tab1.col1 / + 98 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT col2 - ( - 98 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
106
143
169

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4658
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-4658
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT - 82 * 35 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2870
-2870
-2870

query I rowsort
SELECT NULLIF ( - cor0.col1, + 10 + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL col2 * col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT + 13 AS col2 FROM tab1 GROUP BY tab1.col1
----
13

query I rowsort
SELECT DISTINCT 28 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col1
----
28

query I rowsort
SELECT cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT - + 88 FROM tab2 GROUP BY tab2.col0
----
-88
-88
-88

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col2 AS col0 FROM tab2 cor0 GROUP BY col2
----
0

query I rowsort
SELECT ALL + + tab0.col2 * tab0.col2 + - 14 FROM tab0 GROUP BY tab0.col2
----
1430
562
6227

onlyif mysql # DIV for integer division: 
query I rowsort label-4668
SELECT 35 + 72 DIV cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
35
35
39

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4668
SELECT 35 + 72 / cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
35
35
39

query I rowsort
SELECT ALL 89 * 59 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
5251
5251
5251

query I rowsort
SELECT + 40 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
40
40
40

query I rowsort
SELECT DISTINCT 82 FROM tab1 GROUP BY tab1.col0
----
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4672
SELECT + CAST( NULL AS SIGNED ) col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4672
SELECT + CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, col1
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-4675
SELECT DISTINCT + tab1.col2 DIV 92 - - 3 AS col0 FROM tab1 GROUP BY tab1.col2
----
3

skipif mysql # not compatible
query I rowsort label-4675
SELECT DISTINCT + tab1.col2 / 92 - - 3 AS col0 FROM tab1 GROUP BY tab1.col2
----
3

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4676
SELECT CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4676
SELECT CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-40
-40
-40

query I rowsort
SELECT ALL 86 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
86
86
86

query I rowsort
SELECT + + 65 AS col2 FROM tab1 GROUP BY tab1.col0
----
65
65
65

query I rowsort
SELECT - 88 AS col0 FROM tab1 GROUP BY tab1.col0
----
-88
-88
-88

query I rowsort
SELECT + tab0.col0 - + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT ALL cor0.col1 - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4683
SELECT tab2.col1 DIV + tab2.col1 + + 88 AS col1 FROM tab2 GROUP BY tab2.col1
----
89
89
89

skipif mysql # not compatible
query I rowsort label-4683
SELECT tab2.col1 / + tab2.col1 + + 88 AS col1 FROM tab2 GROUP BY tab2.col1
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 45 col0 FROM tab0 GROUP BY col1
----
45
45

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 16 col1 FROM tab0 cor0 GROUP BY cor0.col0
----
16
16
16

query I rowsort
SELECT col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
58
79
87

query I rowsort
SELECT - + 2 AS col0 FROM tab2 GROUP BY tab2.col0
----
-2
-2
-2

query I rowsort
SELECT - 41 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-41
-41
-41

query I rowsort
SELECT DISTINCT 3 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
3

query I rowsort
SELECT col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL 46 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT ALL - ( + cor0.col0 ) * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT - 36 FROM tab1 GROUP BY tab1.col2
----
-36
-36
-36

query I rowsort
SELECT ALL - 26 FROM tab1 GROUP BY tab1.col2
----
-26
-26
-26

query I rowsort
SELECT ALL - 73 AS col2 FROM tab0 GROUP BY tab0.col2
----
-73
-73
-73

query I rowsort
SELECT ALL 33 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
33
33
33

onlyif mysql # DIV for integer division: 
query I rowsort label-4699
SELECT cor0.col2 DIV + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4699
SELECT cor0.col2 / + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 5 col2 FROM tab1 AS cor0 GROUP BY col1
----
-5
-5
-5

onlyif mysql # DIV for integer division: 
query I rowsort label-4701
SELECT - tab1.col0 DIV - 28 col2 FROM tab1 GROUP BY tab1.col0
----
0
1
2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4701
SELECT - tab1.col0 / - 28 col2 FROM tab1 GROUP BY tab1.col0
----
0
1
2

query I rowsort
SELECT + cor0.col2 * - col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT - 10 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-440
-570
-60

query I rowsort
SELECT + 14 AS col1 FROM tab2 GROUP BY tab2.col0
----
14
14
14

query I rowsort
SELECT ALL - - 5 FROM tab2 GROUP BY tab2.col0
----
5
5
5

query I rowsort
SELECT DISTINCT - + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + - 60 * 70 FROM tab2 GROUP BY tab2.col2
----
-4200
-4200
-4200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 93 col0 FROM tab1 GROUP BY tab1.col2
----
93
93
93

query I rowsort
SELECT 59 FROM tab0 GROUP BY tab0.col1
----
59
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT + 64 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
64
64
64

query I rowsort
SELECT DISTINCT 10 FROM tab1 GROUP BY tab1.col1
----
10

query I rowsort
SELECT - tab0.col0 * - 92 FROM tab0 GROUP BY tab0.col0
----
2392
3956
7636

query I rowsort
SELECT - NULLIF ( - 60, col0 ) FROM tab1 GROUP BY tab1.col0
----
60
60
60

query I rowsort
SELECT ALL + 53 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
53
53
53

query I rowsort
SELECT ALL + tab2.col2 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT ALL tab1.col0 + + col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL + tab1.col2 + - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-4720
SELECT ALL cor0.col2 DIV + 37 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
2
2

skipif mysql # not compatible
query I rowsort label-4720
SELECT ALL cor0.col2 / + 37 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
2
2

query I rowsort
SELECT ALL - + 45 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-3645
0

query I rowsort
SELECT DISTINCT 92 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
2024
2576
7544

query I rowsort
SELECT DISTINCT - 73 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
-73

query I rowsort
SELECT + + tab1.col0 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT - + 12 * + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-288
-456
-948

query I rowsort
SELECT DISTINCT cor0.col2 + + 11 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
69
90
98

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4727
SELECT ALL CAST( NULL AS SIGNED ) * + 31 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4727
SELECT ALL CAST ( NULL AS INTEGER ) * + 31 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - tab2.col1 * 35 FROM tab2 GROUP BY tab2.col1
----
-1435
-2065
-2135

query I rowsort
SELECT ALL + + 45 FROM tab2 GROUP BY tab2.col0
----
45
45
45

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4731
SELECT CAST( NULL AS SIGNED ) + + 89 AS col0 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4731
SELECT CAST ( NULL AS INTEGER ) + + 89 AS col0 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 - - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
102
115
14

query I rowsort
SELECT DISTINCT - 60 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-60

query I rowsort
SELECT ALL tab1.col0 * + 62 FROM tab1 GROUP BY tab1.col0
----
1364
1736
5084

query I rowsort
SELECT ALL + + tab0.col2 * - ( tab0.col2 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT cor0.col0 + + ( 29 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
112
55
72

query I rowsort
SELECT DISTINCT cor0.col0 * + 92 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2024
2576
7544

query I rowsort
SELECT + - 6 AS col2 FROM tab2 GROUP BY tab2.col2
----
-6
-6
-6

query I rowsort
SELECT + - 83 FROM tab0 GROUP BY tab0.col1
----
-83
-83

query I rowsort
SELECT DISTINCT - ( - col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 52 FROM tab0 AS cor0 GROUP BY cor0.col0
----
52
52
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col1 * - tab1.col1 col2 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT ALL - 64 AS col0 FROM tab0 GROUP BY tab0.col2
----
-64
-64
-64

query I rowsort
SELECT + col2 - + col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * + 83 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1245
7553
7636

query I rowsort
SELECT ALL + 10 * 79 AS col2 FROM tab2 GROUP BY tab2.col0
----
790
790
790

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4748
SELECT ALL - + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4748
SELECT ALL - + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 65 * 44 col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
2860
2860
2860

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - 94, + cor0.col2 + cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY col1
----
94
94

onlyif mysql # DIV for integer division: 
query I rowsort label-4751
SELECT + cor0.col0 DIV 88 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4751
SELECT + cor0.col0 / 88 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - tab0.col0 + + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT - 14 + - col2 AS col1 FROM tab2 GROUP BY col2
----
-101
-72
-93

query I rowsort
SELECT 20 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1180
1220
820

query I rowsort
SELECT + cor0.col0 * 67 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1005
6097
6164

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4756
SELECT ALL - tab0.col0 * + CAST( NULL AS SIGNED ) col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4756
SELECT ALL - tab0.col0 * + CAST ( NULL AS INTEGER ) col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT + col2 + 99 FROM tab2 GROUP BY tab2.col2
----
157
178
186

query I rowsort
SELECT 45 FROM tab0 GROUP BY col0
----
45
45
45

query I rowsort
SELECT - 12 + 56 AS col2 FROM tab2 GROUP BY tab2.col1
----
44
44
44

query I rowsort
SELECT cor0.col2 * 40 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2320
3160
3480

query I rowsort
SELECT ALL - 25 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-25
-25
-25

query I rowsort
SELECT ALL + - 51 FROM tab0 GROUP BY tab0.col0
----
-51
-51
-51

query I rowsort
SELECT + tab2.col0 + - 28 FROM tab2 GROUP BY tab2.col0
----
-13
63
64

query I rowsort
SELECT + 71 * 54 FROM tab2 GROUP BY tab2.col2
----
3834
3834
3834

query I rowsort
SELECT - 22 * + tab2.col0 + - 8 AS col2 FROM tab2 GROUP BY tab2.col0
----
-2010
-2032
-338

query I rowsort
SELECT DISTINCT + 31 FROM tab1 GROUP BY tab1.col0
----
31

query I rowsort
SELECT + - 10 * + tab0.col1 + 98 AS col2 FROM tab0 GROUP BY tab0.col1
----
-712
98

query I rowsort
SELECT DISTINCT + 93 FROM tab1 GROUP BY tab1.col1
----
93

query I rowsort
SELECT ALL + 78 FROM tab1 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT - tab2.col1 + - 14 FROM tab2 GROUP BY tab2.col1
----
-55
-73
-75

query I rowsort
SELECT DISTINCT + ( + cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - 91 FROM tab0 cor0 GROUP BY col2, cor0.col2
----
-91
-91
-91

query I rowsort
SELECT 61 FROM tab0 GROUP BY tab0.col2
----
61
61
61

query I rowsort
SELECT - + 24 AS col2 FROM tab2 GROUP BY tab2.col2
----
-24
-24
-24

query I rowsort
SELECT DISTINCT 85 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
85

query I rowsort
SELECT - + tab1.col2 * 62 FROM tab1 GROUP BY tab1.col2
----
-2790
-4402
-496

query I rowsort
SELECT - 57 FROM tab2 GROUP BY col1
----
-57
-57
-57

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4781
SELECT + + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4781
SELECT + + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT 43 FROM tab1 cor0 GROUP BY cor0.col1
----
43
43
43

query I rowsort
SELECT col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col1 + + tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT 95 FROM tab1 GROUP BY tab1.col1
----
95
95
95

query I rowsort
SELECT - - tab2.col1 + - col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + + 56 AS col2 FROM tab0 GROUP BY tab0.col1
----
56
56

query I rowsort
SELECT + cor0.col2 * 81 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
3690
5822
656

query I rowsort
SELECT ALL tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + + 73 FROM tab2 GROUP BY tab2.col1
----
73

query I rowsort
SELECT 97 + col2 FROM tab2 GROUP BY tab2.col2
----
155
176
184

query I rowsort
SELECT - + 49 * 42 FROM tab1 GROUP BY tab1.col2
----
-2058
-2058
-2058

query I rowsort
SELECT 22 - 24 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2
-2
-2

query I rowsort
SELECT DISTINCT + 1 FROM tab0 GROUP BY tab0.col1
----
1

query I rowsort
SELECT 47 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
47
47
47

query I rowsort
SELECT ALL + cor0.col2 + + cor0.col2 * 3 FROM tab2 AS cor0 GROUP BY cor0.col2
----
232
316
348

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-3306
-6162
-7482

query I rowsort
SELECT - 14 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
-14
-14
-14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * ( - 81 ) col2 FROM tab2 GROUP BY tab2.col0
----
-1215
-7371
-7452

query I rowsort
SELECT cor0.col2 * + 1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - 10 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-10
-10
-10

query I rowsort
SELECT NULLIF ( cor0.col1, - cor0.col1 ) * - col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + cor0.col1 * cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1739
3560
3808

query I rowsort
SELECT ALL - 99 AS col2 FROM tab2 GROUP BY tab2.col2
----
-99
-99
-99

query I rowsort
SELECT + + tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL - + ( - tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + 10 * - cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2, cor0.col0, cor0.col0
----
-810
0
0

query I rowsort
SELECT DISTINCT - - 12 - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-12
-26
-67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col1 * + tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT cor0.col2 + - 53 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-15
-29
26

query I rowsort
SELECT - 56 AS col0 FROM tab1 GROUP BY tab1.col0
----
-56
-56
-56

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 49, - cor0.col0 * CASE - 76 WHEN cor0.col2 THEN - col0 * cor0.col2 END ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
49
49

query I rowsort
SELECT ALL + 63 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT DISTINCT + 37 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 27 col2 FROM tab0 GROUP BY tab0.col0
----
-27
-27
-27

query I rowsort
SELECT - 52 * - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
2288
2964
312

query I rowsort
SELECT DISTINCT tab2.col2 * - 66 FROM tab2 GROUP BY tab2.col2
----
-3828
-5214
-5742

query I rowsort
SELECT DISTINCT - - ( 46 ) + - tab0.col1 * - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
46
6607

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4819
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4819
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 13 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-13
-13
-13

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4821
SELECT DISTINCT + - CAST( - tab1.col1 AS SIGNED ) AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-4821
SELECT DISTINCT + - CAST ( - tab1.col1 AS INTEGER ) AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 12 FROM tab2 cor0 GROUP BY col1
----
12

query I rowsort
SELECT DISTINCT tab2.col2 * tab2.col2 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT ALL col2 * tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT ALL + 66 AS col1 FROM tab1 GROUP BY tab1.col1
----
66
66
66

query I rowsort
SELECT ALL 75 FROM tab1 GROUP BY tab1.col1
----
75
75
75

query I rowsort
SELECT DISTINCT cor0.col2 * - col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-1260
-176
-5822

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 21 + + tab0.col2 col2 FROM tab0 GROUP BY col2
----
17
3
58

query I rowsort
SELECT - 90 - + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-114
-128
-169

query I rowsort
SELECT - 50 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-50
-50
-50

query I rowsort
SELECT - 64 AS col2 FROM tab2 GROUP BY col1
----
-64
-64
-64

query I rowsort
SELECT - 86 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-15
-41
-78

query I rowsort
SELECT ALL - + tab2.col1 * 7 FROM tab2 GROUP BY tab2.col1
----
-287
-413
-427

query I rowsort
SELECT DISTINCT - cor0.col2 + col2 FROM tab1 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT DISTINCT - + 32 AS col2 FROM tab2 GROUP BY col2
----
-32

query I rowsort
SELECT 84 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
84
84
84

query I rowsort
SELECT ALL cor0.col2 * - 99 + - 32 FROM tab1 AS cor0 GROUP BY col2
----
-4487
-7061
-824

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( tab1.col0 ) col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + 23 AS col0 FROM tab1 GROUP BY tab1.col0
----
23
23
23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4840
SELECT ALL CAST( NULL AS SIGNED ) + COALESCE ( col2, + col2 ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4840
SELECT ALL CAST ( NULL AS INTEGER ) + COALESCE ( col2, + col2 ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 74 FROM tab0 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT 77 + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
105
159
99

query I rowsort
SELECT - 61 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-61
-61
-61

query I rowsort
SELECT - tab0.col1 * - 56 FROM tab0 GROUP BY tab0.col1
----
0
4536

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 34 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
34
34
34

onlyif mysql # DIV for integer division: 
query I rowsort label-4847
SELECT ALL 1 DIV cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4847
SELECT ALL 1 / cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + 12 FROM tab2 cor0 GROUP BY col2
----
12

query I rowsort
SELECT - cor0.col2 * ( - cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL cor0.col0 + + COALESCE ( - 92, cor0.col2 - + cor0.col0, cor0.col2 + + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-1
-77
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + 79 col0 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
22
35
73

onlyif mysql # DIV for integer division: 
query I rowsort label-4852
SELECT + col1 DIV tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4852
SELECT + col1 / tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - tab0.col0 AS col2 FROM tab0 GROUP BY col0 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT + 84 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2184
3612
6972

query I rowsort
SELECT DISTINCT - + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT - 33 AS col0 FROM tab0 GROUP BY tab0.col2
----
-33
-33
-33

query I rowsort
SELECT DISTINCT - 98 AS col2 FROM tab0 GROUP BY tab0.col2
----
-98

query I rowsort
SELECT - 48 FROM tab1 GROUP BY col1
----
-48
-48
-48

query I rowsort
SELECT - 91 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-91
-91
-91

query I rowsort
SELECT col0 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
15
91
92

query I rowsort
SELECT 70 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
70
70
70

onlyif mysql # DIV for integer division: 
query I rowsort label-4862
SELECT ALL + cor0.col2 DIV cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4862
SELECT ALL + cor0.col2 / cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT - + 95 + tab0.col1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
-14
-95

query I rowsort
SELECT + - 84 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
2016
3192
6636

query I rowsort
SELECT + 20 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
103
46
63

query I rowsort
SELECT DISTINCT - - col2 * - col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT + + 8 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT 8 FROM tab2 AS cor0 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT ALL col0 * - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT - 77 FROM tab2 GROUP BY tab2.col1
----
-77
-77
-77

query I rowsort
SELECT - 44 AS col1 FROM tab1 GROUP BY tab1.col1
----
-44
-44
-44

query I rowsort
SELECT - 55 * - cor0.col2 AS col0 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
2475
3905
440

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4873
SELECT ALL + CAST( NULL AS DECIMAL ) AS col0 FROM tab2 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4873
SELECT ALL + CAST ( NULL AS REAL ) AS col0 FROM tab2 GROUP BY col2
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4874
SELECT ALL CAST( + col2 AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

skipif mysql # not compatible
query I rowsort label-4874
SELECT ALL CAST ( + col2 AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( 93 ) * tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
4185
6603
744

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4876
SELECT ALL + + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4876
SELECT ALL + + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 80 * + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
3600
5680
640

query I rowsort
SELECT ALL cor0.col1 - + cor0.col1 * cor0.col1 FROM tab1 AS cor0 WHERE col2 IS NULL OR NULL IS NULL GROUP BY cor0.col1 HAVING NULL IS NULL
----
-1892
-30
-3192

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
26
43
83

query I rowsort
SELECT ALL tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL <> NULL
----

query I rowsort
SELECT + cor0.col2 * 20 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
1160
1580
1740

query I rowsort
SELECT - - 4 FROM tab1 GROUP BY tab1.col2
----
4
4
4

query I rowsort
SELECT DISTINCT - 2 * tab2.col0 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 92 FROM tab1 GROUP BY tab1.col1
----
92

query I rowsort
SELECT ALL - + 66 FROM tab0 GROUP BY tab0.col1
----
-66
-66

query I rowsort
SELECT ALL - 71 AS col0 FROM tab2 GROUP BY tab2.col2
----
-71
-71
-71

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL - - 73 FROM tab1 GROUP BY tab1.col1
----
73
73
73

query I rowsort
SELECT DISTINCT - 64 AS col2 FROM tab0 GROUP BY tab0.col0
----
-64

query I rowsort
SELECT - - 6 AS col2 FROM tab2 GROUP BY tab2.col1
----
6
6
6

query I rowsort
SELECT + 29 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT - ( 15 ) FROM tab1 AS cor0 GROUP BY col0
----
-15
-15
-15

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 15 FROM tab2 GROUP BY tab2.col2
----
-15

query I rowsort
SELECT - 15 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1230
-330
-420

query I rowsort
SELECT DISTINCT - - 63 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1512
-2394
-4977

query I rowsort
SELECT DISTINCT - 65 AS col0 FROM tab1 GROUP BY col0
----
-65

query I rowsort
SELECT 98 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
98
98
98

query I rowsort
SELECT DISTINCT cor0.col0 + - 75 FROM tab0 cor0 GROUP BY cor0.col0
----
-32
-49
8

query I rowsort
SELECT + + 68 AS col0 FROM tab1 GROUP BY tab1.col1
----
68
68
68

query I rowsort
SELECT ALL tab1.col1 - - 96 FROM tab1 GROUP BY tab1.col1
----
102
140
153

query I rowsort
SELECT DISTINCT - 24 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-24

query I rowsort
SELECT - col0 * 27 FROM tab1 GROUP BY tab1.col0
----
-2214
-594
-756

query I rowsort
SELECT DISTINCT + 58 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
58

onlyif mysql # DIV for integer division: 
query I rowsort label-4906
SELECT DISTINCT tab1.col2 DIV + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
1

skipif mysql # not compatible
query I rowsort label-4906
SELECT DISTINCT tab1.col2 / + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
1

query I rowsort
SELECT DISTINCT - cor0.col2 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-142
-16
-90

query I rowsort
SELECT 35 + 26 FROM tab2 GROUP BY tab2.col2
----
61
61
61

query I rowsort
SELECT DISTINCT + + 53 AS col0 FROM tab2 GROUP BY tab2.col0
----
53

query I rowsort
SELECT ALL - 88 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-88
-88
-88

query I rowsort
SELECT - cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( + 42, cor0.col2 * + col2, + cor0.col2 + + cor0.col0 ) + - ( col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-41
16

query I rowsort
SELECT DISTINCT + cor0.col2 + - cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-19
-45
53

query I rowsort
SELECT ALL 49 FROM tab0 AS cor0 GROUP BY cor0.col0
----
49
49
49

onlyif mysql # DIV for integer division: 
query I rowsort label-4915
SELECT DISTINCT tab2.col1 DIV - tab2.col1 + tab2.col1 DIV + 95 FROM tab2 GROUP BY tab2.col1
----
-1

skipif mysql # not compatible
query I rowsort label-4915
SELECT DISTINCT tab2.col1 / - tab2.col1 + tab2.col1 / + 95 FROM tab2 GROUP BY tab2.col1
----
-1

query I rowsort
SELECT ALL + 25 + - tab2.col1 * 75 AS col0 FROM tab2 GROUP BY tab2.col1
----
-3050
-4400
-4550

query I rowsort
SELECT - col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT 0 + + col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-4919
SELECT DISTINCT - tab2.col2 DIV 84 AS col1 FROM tab2 GROUP BY tab2.col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-4919
SELECT DISTINCT - tab2.col2 / 84 AS col1 FROM tab2 GROUP BY tab2.col2
----
-1
0

query I rowsort
SELECT - 81 * 51 AS col1 FROM tab0 GROUP BY tab0.col2
----
-4131
-4131
-4131

query I rowsort
SELECT DISTINCT tab1.col2 * 39 FROM tab1, tab1 AS cor0 GROUP BY tab1.col2
----
1755
2769
312

query I rowsort
SELECT DISTINCT + tab1.col1 * - 45 FROM tab1 GROUP BY tab1.col1
----
-1980
-2565
-270

query I rowsort
SELECT ALL 39 FROM tab0 GROUP BY tab0.col0
----
39
39
39

query I rowsort
SELECT - tab1.col2 * + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 39 col0 FROM tab2 GROUP BY tab2.col2
----
-39

query I rowsort
SELECT cor0.col0 * + 94 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1410
8554
8648

query I rowsort
SELECT DISTINCT + + tab1.col0 + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT + 92 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
92
92
92

query I rowsort
SELECT ALL 86 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
130
143
92

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL + 93 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
93
93

query I rowsort
SELECT 36 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT DISTINCT 88 FROM tab1 AS cor0 GROUP BY cor0.col2
----
88

query I rowsort
SELECT - col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - 35 - + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-114
-122
-93

query I rowsort
SELECT 83 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
83
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 6 * - col0 col2 FROM tab0 GROUP BY tab0.col0
----
156
258
498

query I rowsort
SELECT ALL 86 AS col0 FROM tab0 GROUP BY tab0.col2
----
86
86
86

query I rowsort
SELECT ALL 57 AS col2 FROM tab1 GROUP BY tab1.col0
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 99 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-99
-99
-99

query I rowsort
SELECT 11 FROM tab0 AS cor0 GROUP BY cor0.col0
----
11
11
11

query I rowsort
SELECT - tab1.col2 * - 75 FROM tab1 GROUP BY tab1.col2
----
3375
5325
600

query I rowsort
SELECT - cor0.col0 + 95 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
13
67
73

query I rowsort
SELECT DISTINCT - 93 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-93

query I rowsort
SELECT DISTINCT 8 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
8

query I rowsort
SELECT + cor0.col0 * - col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4950
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4950
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - tab0.col1 ) * tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT 0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT DISTINCT - 30 FROM tab2 GROUP BY tab2.col2
----
-30

query I rowsort
SELECT ALL - 22 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-22
-22

query I rowsort
SELECT - 68 * 8 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-544
-544
-544

query I rowsort
SELECT - - 26 FROM tab0 GROUP BY tab0.col1
----
26
26

query I rowsort
SELECT - cor0.col2 * + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 99 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT ALL cor0.col2 * - cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - cor0.col1 ) col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT - + ( 29 ) FROM tab2 GROUP BY tab2.col0
----
-29

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4963
SELECT + CAST( - 63 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-63
-63

skipif mysql # not compatible
query I rowsort label-4963
SELECT + CAST ( - 63 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-63
-63

query I rowsort
SELECT - cor1.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-24
-38
-79

query I rowsort
SELECT + tab2.col0 * tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT ALL col2 * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT ALL - col2 FROM tab1 AS cor0 GROUP BY col2 HAVING NULL <= col2
----

query I rowsort
SELECT ALL 20 AS col2 FROM tab1 AS cor0 GROUP BY col0, col1
----
20
20
20

query I rowsort
SELECT - 9 AS col1 FROM tab0 GROUP BY tab0.col0
----
-9
-9
-9

query I rowsort
SELECT - 82 FROM tab0 GROUP BY tab0.col0
----
-82
-82
-82

query I rowsort
SELECT - 69 * 50 FROM tab2 GROUP BY tab2.col2
----
-3450
-3450
-3450

query I rowsort
SELECT - 14 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
14
68
8

query I rowsort
SELECT 95 AS col0 FROM tab2 GROUP BY tab2.col2
----
95
95
95

query I rowsort
SELECT + ( - 20 ) FROM tab0 GROUP BY tab0.col2
----
-20
-20
-20

query I rowsort
SELECT + 70 FROM tab1 GROUP BY tab1.col1
----
70
70
70

query I rowsort
SELECT 94 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
94
94
94

query I rowsort
SELECT - 85 FROM tab1 GROUP BY tab1.col0
----
-85
-85
-85

query I rowsort
SELECT - + 35 + tab0.col2 * - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1479
-611
-6276

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 48 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
48
48
48

query I rowsort
SELECT 99 - - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
121
127
181

query I rowsort
SELECT cor0.col0 * 12 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
264
336
984

query I rowsort
SELECT DISTINCT cor0.col1 + + cor0.col1 FROM tab1 cor0 GROUP BY col1
----
114
12
88

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT ALL cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col2, cor0.col1
----
9 values hashing to 559da8f454c4e5599b87319641a4f49a

query I rowsort
SELECT DISTINCT 86 FROM tab0 GROUP BY tab0.col0
----
86

query I rowsort
SELECT ALL + + 76 - - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
120
133
82

query I rowsort
SELECT - + 65 AS col1 FROM tab1 GROUP BY tab1.col0
----
-65
-65
-65

query I rowsort
SELECT 69 AS col0 FROM tab0 GROUP BY tab0.col0
----
69
69
69

query I rowsort
SELECT ALL cor0.col0 - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col1 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
132
1596
3608

query I rowsort
SELECT - 61 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
-61
-61
-61

query I rowsort
SELECT DISTINCT - 5 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-5

query I rowsort
SELECT DISTINCT + 8 FROM tab0 AS cor0 GROUP BY cor0.col0
----
8

query I rowsort
SELECT + + tab1.col1 + - 67 AS col0 FROM tab1 GROUP BY tab1.col1
----
-10
-23
-61

query I rowsort
SELECT 44 AS col1 FROM tab2 GROUP BY tab2.col0
----
44
44
44

query I rowsort
SELECT ALL + 76 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT ALL - 79 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-79
-79
-79

query I rowsort
SELECT ALL cor0.col1 * - 47 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1927
-2773
-2867

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab1.col2 + tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
142
16
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col1 * - tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT ALL + - tab0.col2 * + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

onlyif mysql # DIV for integer division: 
query I rowsort label-5002
SELECT DISTINCT - - 25 DIV tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
1

skipif mysql # not compatible
query I rowsort label-5002
SELECT DISTINCT - - 25 / tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
1

query I rowsort
SELECT DISTINCT 7 AS col2 FROM tab2 GROUP BY col1
----
7

query I rowsort
SELECT ALL 77 - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-14
-15
62

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5005
SELECT ALL + tab1.col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5005
SELECT ALL + tab1.col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col1 + 2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-4
-42
-55

query I rowsort
SELECT DISTINCT - 89 - 8 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-97

query I rowsort
SELECT ALL 19 FROM tab1 AS cor0 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT ALL + cor0.col2 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT + - tab0.col1 * - 54 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
4374

query I rowsort
SELECT - 42 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-42
-42

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
44
57
6

query I rowsort
SELECT + 84 + + cor0.col2 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1528
6325
660

query I rowsort
SELECT ALL + col2 AS col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL - - tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL 91 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT - + 18 * 64 + + 49 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1103
-1103
-1103

query I rowsort
SELECT 21 AS col2 FROM tab1 GROUP BY tab1.col1
----
21
21
21

query I rowsort
SELECT DISTINCT 33 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3003
3036
495

query I rowsort
SELECT ALL 6 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
6
6
6

query I rowsort
SELECT cor0.col1 - + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT - + 85 FROM tab1 GROUP BY col1
----
-85

query I rowsort
SELECT - + tab2.col0 + 6 AS col2 FROM tab2 GROUP BY tab2.col0
----
-85
-86
-9

query I rowsort
SELECT DISTINCT cor0.col1 + 55 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
114
116
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 94 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-94

query I rowsort
SELECT - 21 * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-1701
0

query I rowsort
SELECT + 3 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT DISTINCT + col0 * tab1.col0 + col0 FROM tab1 GROUP BY tab1.col0
----
506
6806
812

query I rowsort
SELECT DISTINCT - 7 AS col1 FROM tab0 GROUP BY tab0.col0
----
-7

query I rowsort
SELECT DISTINCT + 98 + + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
6659
98

query I rowsort
SELECT + + tab0.col0 * 26 FROM tab0 GROUP BY col0
----
1118
2158
676

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col1 * col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
132
1596
3608

query I rowsort
SELECT - 41 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
-41
-41
-41

query I rowsort
SELECT DISTINCT cor0.col2 + 86 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
131
157
94

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5037
SELECT - + tab0.col1 + + tab0.col1 * - CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5037
SELECT - + tab0.col1 + + tab0.col1 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT - - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 18 AS col2 FROM tab2 GROUP BY tab2.col0
----
18

query I rowsort
SELECT ALL + 13 + 5 FROM tab1 AS cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT + 40 FROM tab1 GROUP BY col2
----
40
40
40

query I rowsort
SELECT ALL - - 0 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT 44 - - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
101
50
88

query I rowsort
SELECT + cor1.col2 * - 58 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-3364
-4582
-5046

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
44
57
6

query I rowsort
SELECT + col1 - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT 53 AS col2 FROM tab1 GROUP BY tab1.col2
----
53
53
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 98 col0 FROM tab0 GROUP BY tab0.col0
----
-98

query I rowsort
SELECT + 73 FROM tab0 AS cor0 GROUP BY cor0.col1
----
73
73

query I rowsort
SELECT ALL col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT ALL 43 AS col2 FROM tab1 GROUP BY tab1.col2
----
43
43
43

query I rowsort
SELECT DISTINCT - 47 FROM tab0 cor0 GROUP BY cor0.col0
----
-47

query I rowsort
SELECT 43 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT + tab1.col1 FROM tab1 AS cor0 CROSS JOIN tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT tab1.col1 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL 41 * - 70 AS col0 FROM tab0 GROUP BY tab0.col0
----
-2870
-2870
-2870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 46 col1 FROM tab0 GROUP BY tab0.col0
----
46
46
46

query I rowsort
SELECT ALL cor0.col1 + 3 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
44
62
64

query I rowsort
SELECT ALL + 67 FROM tab1 GROUP BY col1
----
67
67
67

query I rowsort
SELECT 76 * + 0 AS col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + 66 AS col2 FROM tab1 GROUP BY tab1.col1
----
66
66
66

onlyif mysql # DIV for integer division: 
query I rowsort label-5063
SELECT - - tab2.col1 + - 10 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif mysql # not compatible
query I rowsort label-5063
SELECT - - tab2.col1 + - 10 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL - cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-158
-48
-76

query I rowsort
SELECT ALL - cor0.col0 + - 78 FROM tab1 AS cor0 GROUP BY col0, col2
----
-100
-106
-160

query I rowsort
SELECT DISTINCT 1 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
46
72
9

query I rowsort
SELECT - 76 FROM tab1 GROUP BY tab1.col2
----
-76
-76
-76

query I rowsort
SELECT + cor0.col1 - - 90 FROM tab0 AS cor0 GROUP BY cor0.col1
----
171
90

query I rowsort
SELECT - - 94 FROM tab1 GROUP BY tab1.col2
----
94
94
94

query I rowsort
SELECT DISTINCT + ( + 21 ) FROM tab1 GROUP BY tab1.col2
----
21

query I rowsort
SELECT DISTINCT + 76 AS col2 FROM tab0 GROUP BY col0
----
76

query I rowsort
SELECT DISTINCT - 70 AS col0 FROM tab2 GROUP BY tab2.col1
----
-70

query I rowsort
SELECT cor0.col0 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 1 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT + tab2.col2 - + 95 FROM tab2 GROUP BY tab2.col2
----
-16
-37
-8

query I rowsort
SELECT DISTINCT 30 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
2430

query I rowsort
SELECT DISTINCT + 32 AS col1 FROM tab1 GROUP BY tab1.col1
----
32

query I rowsort
SELECT ALL + cor0.col1 * - 38 FROM tab1 cor0 GROUP BY cor0.col1
----
-1672
-2166
-228

query I rowsort
SELECT - 29 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-29
-29
-29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT + 2 AS col1 FROM tab0 GROUP BY tab0.col1
----
2
2

query I rowsort
SELECT DISTINCT - 23 * 32 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-736

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 30, + tab1.col0 * tab1.col2 ) AS col2 FROM tab1 GROUP BY col0
----
-30
-30
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 98 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-98

query I rowsort
SELECT DISTINCT + 2 AS col2 FROM tab0 GROUP BY col1
----
2

query I rowsort
SELECT + 85 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
85
85
85

query I rowsort
SELECT + 1 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0, cor0.col2
----
59
80
88

onlyif mysql # DIV for integer division: 
query I rowsort label-5089
SELECT DISTINCT - tab0.col1 DIV + 63 AS col1 FROM tab0 GROUP BY tab0.col1
----
-1
0

skipif mysql # not compatible
query I rowsort label-5089
SELECT DISTINCT - tab0.col1 / + 63 AS col1 FROM tab0 GROUP BY tab0.col1
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 9 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
9
9
9

query I rowsort
SELECT DISTINCT tab2.col0 + - col0 AS col1 FROM tab2 GROUP BY col0
----
0

query I rowsort
SELECT + tab2.col2 * 32 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1914
2607
2871

query I rowsort
SELECT 23 * + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1817
552
874

onlyif mysql # DIV for integer division: 
query I rowsort label-5094
SELECT - tab1.col1 DIV - ( - tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5094
SELECT - tab1.col1 / - ( - tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 2 + 30 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
32
32
32

query I rowsort
SELECT - 1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL - 49 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-49
-49
-49

query I rowsort
SELECT DISTINCT - col0 * 84 AS col0 FROM tab0 GROUP BY tab0.col0
----
-2184
-3612
-6972

query I rowsort
SELECT DISTINCT 77 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
135
156
164

query I rowsort
SELECT ALL - cor0.col2 + + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 27 AS col0 FROM tab1 GROUP BY tab1.col0
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 15 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-15
-15
-15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * - tab1.col2 col0 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT 38 FROM tab1 AS cor0 GROUP BY cor0.col0
----
38
38
38

query I rowsort
SELECT DISTINCT + cor0.col0 * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
225
8281
8464

onlyif mysql # DIV for integer division: 
query I rowsort label-5106
SELECT DISTINCT cor0.col2 DIV 25 FROM tab1 AS cor0 GROUP BY col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-5106
SELECT DISTINCT cor0.col2 / 25 FROM tab1 AS cor0 GROUP BY col2
----
0
1
2

query I rowsort
SELECT 28 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
28
28
28

query I rowsort
SELECT ALL - 22 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-22
-22
-22

query I rowsort
SELECT + 38 FROM tab2 cor0 GROUP BY cor0.col2
----
38
38
38

query I rowsort
SELECT 93 * + col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
2046
2604
7626

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL - tab0.col2 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL 15 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col1
----
15
15
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 46 * cor0.col1 col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
1886
2714
2806

onlyif mysql # DIV for integer division: 
query I rowsort label-5115
SELECT ALL col0 DIV - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5115
SELECT ALL col0 / - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col0 + + tab0.col0 col2 FROM tab0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT + + tab1.col1 * + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col2, col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 * tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT col2 FROM tab1 GROUP BY tab1.col2 HAVING NULL NOT IN ( - tab1.col2 )
----

query I rowsort
SELECT tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1 HAVING ( NULL ) IS NULL
----
41
59
61

query I rowsort
SELECT ALL + tab2.col0 + col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT + cor0.col1 + 81 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6642

query I rowsort
SELECT - - 75 * tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
1650
2100
6150

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - 14 FROM tab0 GROUP BY tab0.col2
----
-14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
58
79
87

query I rowsort
SELECT + NULLIF ( 77, + cor0.col1 * cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY col1
----
77
77
77

query I rowsort
SELECT ALL + 16 AS col1 FROM tab0 GROUP BY tab0.col2
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 66 col2 FROM tab2 GROUP BY tab2.col1
----
-66
-66
-66

query I rowsort
SELECT 38 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
38
38
38

query I rowsort
SELECT 53 * 7 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
371
371
371

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL 91 AS col2 FROM tab2 GROUP BY tab2.col0
----
91
91
91

query I rowsort
SELECT DISTINCT + 85 AS col1 FROM tab2 GROUP BY tab2.col2
----
85

query I rowsort
SELECT DISTINCT + col2 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT - 67 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-67
-67
-67

query I rowsort
SELECT - 66 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-66
-66
-66

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col0 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-138
-8202
-8406

query I rowsort
SELECT 58 * + col0 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1254
1596
4674

query I rowsort
SELECT DISTINCT + 69 FROM tab2 GROUP BY tab2.col1
----
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 49 col1 FROM tab1 GROUP BY tab1.col1
----
49
49
49

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5143
SELECT ALL 32 * tab1.col1 - + CAST( NULL AS DECIMAL ) AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5143
SELECT ALL 32 * tab1.col1 - + CAST ( NULL AS REAL ) AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col0 + - cor0.col0 FROM tab2 cor0 GROUP BY col0
----
-182
-184
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 + + 86 AS col1 FROM tab1 cor0 GROUP BY col1
----
29
42
80

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 32 col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT DISTINCT - 62 * tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1488
-2356
-4898

query I rowsort
SELECT + cor0.col0 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
105
121
67

query I rowsort
SELECT DISTINCT 0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0

query I rowsort
SELECT + 23 FROM tab2 GROUP BY tab2.col1
----
23
23
23

query I rowsort
SELECT 73 FROM tab1 GROUP BY tab1.col1
----
73
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 86 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-86
-86
-86

query I rowsort
SELECT + 18 FROM tab2 GROUP BY tab2.col0
----
18
18
18

query I rowsort
SELECT + 15 * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
1365
1380
225

query I rowsort
SELECT ( + 54 ) - - col2 FROM tab0 cor0 GROUP BY cor0.col2
----
133
78
92

query I rowsort
SELECT DISTINCT - 33 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-33

query I rowsort
SELECT DISTINCT + 53 FROM tab0 GROUP BY tab0.col2
----
53

query I rowsort
SELECT 30 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1290
2490
780

query I rowsort
SELECT ALL + + tab2.col1 - - 61 AS col2 FROM tab2 GROUP BY tab2.col1
----
102
120
122

query I rowsort
SELECT + ( - 22 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
-22
-22
-22

query I rowsort
SELECT + 22 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
22
22
22

query I rowsort
SELECT - 11 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-11
-11
-11

query I rowsort
SELECT DISTINCT 30 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
30

query I rowsort
SELECT DISTINCT - 76 AS col2 FROM tab1 GROUP BY col1
----
-76

query I rowsort
SELECT ALL + - 1 FROM tab2 GROUP BY col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 84 FROM tab1 GROUP BY tab1.col0
----
84

query I rowsort
SELECT + 70 FROM tab0 GROUP BY tab0.col2
----
70
70
70

query I rowsort
SELECT ALL - 88 FROM tab2 GROUP BY tab2.col2
----
-88
-88
-88

query I rowsort
SELECT 19 FROM tab2 cor0 GROUP BY cor0.col1
----
19
19
19

query I rowsort
SELECT ALL + 66 FROM tab0 AS cor0 GROUP BY cor0.col1
----
66
66

query I rowsort
SELECT DISTINCT + - 82 AS col0 FROM tab2 GROUP BY tab2.col1
----
-82

query I rowsort
SELECT DISTINCT - 89 AS col0 FROM tab0 GROUP BY tab0.col1
----
-89

query I rowsort
SELECT DISTINCT + cor0.col0 * - col0 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-484
-6724
-784

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5176
SELECT + CAST( NULL AS DECIMAL ) col0 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5176
SELECT + CAST ( NULL AS REAL ) col0 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 50 FROM tab2 AS cor0 GROUP BY col1
----
-50
-50
-50

query I rowsort
SELECT ALL - + 17 AS col1 FROM tab0 GROUP BY tab0.col0
----
-17
-17
-17

query I rowsort
SELECT DISTINCT + ( - ( col2 ) ) AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-5180
SELECT DISTINCT + cor0.col1 DIV - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-5180
SELECT DISTINCT + cor0.col1 / - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1

query I rowsort
SELECT 97 AS col0 FROM tab0 GROUP BY col2
----
97
97
97

query I rowsort
SELECT ALL 74 * col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1110
6734
6808

query I rowsort
SELECT ALL + 49 FROM tab2 AS cor0 GROUP BY cor0.col0
----
49
49
49

onlyif mysql # DIV for integer division: 
query I rowsort label-5184
SELECT - - tab0.col2 * 41 - - tab0.col2 DIV tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1559
3240
985

skipif mysql # not compatible
query I rowsort label-5184
SELECT - - tab0.col2 * 41 - - tab0.col2 / tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1559
3240
985

query I rowsort
SELECT tab2.col1 - - 25 AS col0 FROM tab2 GROUP BY tab2.col1
----
66
84
86

query I rowsort
SELECT DISTINCT + 21 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
21

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + - 76 AS col1 FROM tab0 GROUP BY col2
----
-76
-76
-76

query I rowsort
SELECT + ( 11 ) FROM tab2 GROUP BY tab2.col0
----
11
11
11

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 col2 FROM tab1 GROUP BY col1
----
-7
-7
-7

query I rowsort
SELECT cor0.col0 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT ALL + + col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + + cor0.col2 col0 FROM tab2 cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT 0 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT - 79 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-79

query I rowsort
SELECT DISTINCT - 34 * - 34 FROM tab1 cor0 GROUP BY cor0.col2
----
1156

query I rowsort
SELECT cor0.col0 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT - 29 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-29
52

query I rowsort
SELECT + 69 FROM tab1 GROUP BY tab1.col2
----
69
69
69

query I rowsort
SELECT + 68 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
68
68
68

query I rowsort
SELECT - cor0.col1 * col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-132
-1596
-3608

query I rowsort
SELECT - 58 + - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-103
-129
-66

onlyif mysql # DIV for integer division: 
query I rowsort label-5205
SELECT - 51 DIV - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-5205
SELECT - 51 / - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0
0
3

query I rowsort
SELECT ALL tab1.col0 * + col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT 52 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
52
52
52

query I rowsort
SELECT col1 * 52 FROM tab1 GROUP BY col1
----
2288
2964
312

query I rowsort
SELECT DISTINCT + + 48 AS col0 FROM tab0 GROUP BY col0
----
48

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT ( - 11 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-11

query I rowsort
SELECT tab0.col1 * 79 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
6399

query I rowsort
SELECT col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT - 99 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-99
-99
-99

onlyif mysql # DIV for integer division: 
query I rowsort label-5215
SELECT ALL cor0.col0 DIV - 2 FROM tab0 cor0 GROUP BY cor0.col0
----
-13
-21
-41

skipif mysql # not compatible
query I rowsort label-5215
SELECT ALL cor0.col0 / - 2 FROM tab0 cor0 GROUP BY cor0.col0
----
-13
-21
-41

query I rowsort
SELECT - 3 + + 70 FROM tab2 GROUP BY tab2.col2
----
67
67
67

query I rowsort
SELECT DISTINCT + + 51 FROM tab2 GROUP BY tab2.col2
----
51

query I rowsort
SELECT ALL 35 + + ( col1 + - cor0.col1 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
35
35
35

query I rowsort
SELECT DISTINCT - - 62 * + 94 AS col0 FROM tab1 GROUP BY col2
----
5828

query I rowsort
SELECT ALL 37 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
116
61
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 60 col0 FROM tab2 GROUP BY tab2.col2
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * 37 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1628
2109
222

query I rowsort
SELECT cor0.col0 - - 41 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
132
133
56

query I rowsort
SELECT DISTINCT - + 64 FROM tab2 GROUP BY tab2.col1
----
-64

query I rowsort
SELECT DISTINCT + + 95 + 8 * col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
423
567
583

query I rowsort
SELECT DISTINCT + cor1.col0 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT + 26 FROM tab2 AS cor0 GROUP BY col1
----
26
26
26

query I rowsort
SELECT + 4 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
364
368
60

query I rowsort
SELECT - 85 + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-24
-26
-44

query I rowsort
SELECT - 29 FROM tab2 AS cor0 GROUP BY col2
----
-29
-29
-29

query I rowsort
SELECT - ( 6 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-6
-6
-6

query I rowsort
SELECT tab0.col2 AS col2 FROM tab1 cor0 CROSS JOIN tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL tab2.col2 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT - tab0.col0 AS col1 FROM tab0 GROUP BY col0 HAVING NOT ( NULL ) <> NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-5235
SELECT DISTINCT + 23 DIV - 95 - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

skipif mysql # not compatible
query I rowsort label-5235
SELECT DISTINCT + 23 / - 95 - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 10, tab0.col1 * tab0.col1 ) FROM tab0 GROUP BY tab0.col0
----
10
10
10

query I rowsort
SELECT ALL - 51 AS col1 FROM tab0 GROUP BY col0
----
-51
-51
-51

query I rowsort
SELECT + 80 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
80
80
80

query I rowsort
SELECT DISTINCT + + 78 FROM tab2 GROUP BY tab2.col1
----
78

query I rowsort
SELECT DISTINCT + + NULLIF ( + ( - tab1.col0 ), tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT 96 AS col2 FROM tab0 GROUP BY tab0.col1
----
96
96

onlyif mysql # DIV for integer division: 
query I rowsort label-5242
SELECT tab2.col2 DIV col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5242
SELECT tab2.col2 / col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT - 88 FROM tab2 GROUP BY tab2.col1
----
-88
-88
-88

query I rowsort
SELECT ALL + 15 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
15
15
15

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5245
SELECT DISTINCT CAST( NULL AS SIGNED ) * COALESCE ( + cor0.col2, cor0.col2, 57 ) FROM tab0 AS cor0 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-5245
SELECT DISTINCT CAST ( NULL AS INTEGER ) * COALESCE ( + cor0.col2, cor0.col2, 57 ) FROM tab0 AS cor0 GROUP BY col2
----
NULL

query I rowsort
SELECT - cor0.col2 + + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL cor0.col2 - col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5249
SELECT DISTINCT + COALESCE ( - 47, - tab1.col1 * tab1.col2 ) DIV 56 FROM tab1 GROUP BY tab1.col0
----
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-5249
SELECT DISTINCT + COALESCE ( - 47, - tab1.col1 * tab1.col2 ) / 56 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT ALL 86 AS col1 FROM tab0 GROUP BY tab0.col0
----
86
86
86

query I rowsort
SELECT DISTINCT 4 * 93 AS col1 FROM tab1 GROUP BY tab1.col2
----
372

query I rowsort
SELECT ALL - col0 * 76 FROM tab1 GROUP BY col0
----
-1672
-2128
-6232

query I rowsort
SELECT + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT 34 FROM tab0 AS cor0 GROUP BY cor0.col1
----
34
34

query I rowsort
SELECT 11 FROM tab1 AS cor0 GROUP BY cor0.col0
----
11
11
11

query I rowsort
SELECT + cor0.col0 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 55, + tab1.col1 + + tab1.col1 * col1, 76 * tab1.col0 + tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
-55
-55
-55

query I rowsort
SELECT ALL + + 96 * tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1440
8736
8832

query I rowsort
SELECT 37 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1517
2183
2257

query I rowsort
SELECT DISTINCT - - 31 * + col2 AS col1 FROM tab1 GROUP BY col2
----
1395
2201
248

query I rowsort
SELECT 68 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
68
68

query I rowsort
SELECT DISTINCT + 11 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
11

query I rowsort
SELECT tab0.col2 * - 18 FROM tab0 GROUP BY col2
----
-1422
-432
-684

query I rowsort
SELECT + 79 + + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
123
136
85

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5265
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5265
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 14 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
14
14
14

query I rowsort
SELECT ALL - + col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + col2 - - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT - 34 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-34
-34
-34

query I rowsort
SELECT DISTINCT + 60 FROM tab1 AS cor0 GROUP BY cor0.col1
----
60

onlyif mysql # DIV for integer division: 
query I rowsort label-5271
SELECT ALL + + tab1.col1 - + tab1.col1 DIV tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
43
5
56

skipif mysql # not compatible
query I rowsort label-5271
SELECT ALL + + tab1.col1 - + tab1.col1 / tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
43
5
56

query I rowsort
SELECT ALL cor0.col2 * - 0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5273
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5273
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT + COALESCE ( - cor0.col0, - col0 - cor0.col2, + cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL cor0.col2 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1444
-576
-6241

query I rowsort
SELECT ALL cor0.col2 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT - 76 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-76
-76
-76

query I rowsort
SELECT - col2 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 cor0 GROUP BY col0, cor0.col2
----
26
43
83

query I rowsort
SELECT ( cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT + + tab2.col0 + - col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL col1 + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT DISTINCT cor0.col0 * + 48 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4368
4416
720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 11 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
11
11
11

query I rowsort
SELECT ALL + 12 FROM tab0 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT + 42 AS col0 FROM tab1 GROUP BY tab1.col0
----
42
42
42

query I rowsort
SELECT tab0.col0 * 72 FROM tab0 GROUP BY tab0.col0
----
1872
3096
5976

query I rowsort
SELECT 90 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
90
90
90

query I rowsort
SELECT ALL tab1.col1 * + 60 FROM tab1 GROUP BY tab1.col1
----
2640
3420
360

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
3564

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5291
SELECT CAST( NULL AS SIGNED ) * col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5291
SELECT CAST ( NULL AS INTEGER ) * col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 69 col2 FROM tab2 GROUP BY tab2.col1
----
69
69
69

query I rowsort
SELECT DISTINCT - tab2.col2 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT DISTINCT + 54 FROM tab0 AS cor0 GROUP BY cor0.col1
----
54

query I rowsort
SELECT - ( + 98 ) AS col2 FROM tab1 GROUP BY col1
----
-98
-98
-98

query I rowsort
SELECT - ( 99 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-99
-99
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - 53 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-53
-53
-53

query I rowsort
SELECT DISTINCT - 80 AS col1 FROM tab0 GROUP BY col1
----
-80

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - ( + 58 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1276
-1624
-4756

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT + tab0.col0 + - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT col1 FROM tab0 cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT DISTINCT col2 * + 11 FROM tab0 GROUP BY tab0.col2
----
264
418
869

query I rowsort
SELECT DISTINCT cor0.col0 * 39 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3549
3588
585

query I rowsort
SELECT 82 AS col1 FROM tab1 GROUP BY tab1.col1
----
82
82
82

query I rowsort
SELECT ALL 33 AS col2 FROM tab2 GROUP BY tab2.col1
----
33
33
33

query I rowsort
SELECT + tab0.col2 + - 66 FROM tab0 GROUP BY tab0.col2
----
-28
-42
13

query I rowsort
SELECT ALL tab2.col0 * - 11 FROM tab2 GROUP BY tab2.col0
----
-1001
-1012
-165

query I rowsort
SELECT DISTINCT - ( + 13 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
-13

query I rowsort
SELECT cor0.col0 + - cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT + 51 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
132
51

query I rowsort
SELECT - tab2.col1 * + 94 AS col2 FROM tab2 GROUP BY col1
----
-3854
-5546
-5734

query I rowsort
SELECT + 79 * tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1896
3002
6241

query I rowsort
SELECT + ( 27 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
27
27
27

query I rowsort
SELECT DISTINCT - 94 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
-94

onlyif mysql # DIV for integer division: 
query I rowsort label-5319
SELECT ALL col1 DIV 99 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5319
SELECT ALL col1 / 99 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( - 29, - cor0.col2 ) FROM tab2 AS cor0 GROUP BY col0, col1
----
29

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5322
SELECT DISTINCT + CAST( NULL AS SIGNED ) col2 FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5322
SELECT DISTINCT + CAST ( NULL AS INTEGER ) col2 FROM tab2 GROUP BY tab2.col1
----
NULL

query I rowsort
SELECT tab0.col0 * tab0.col0 + - 27 AS col1 FROM tab0 GROUP BY tab0.col0
----
1822
649
6862

query I rowsort
SELECT + ( tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT 97 * + cor0.col2 - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2, cor0.col0
----
4320
6816
768

query I rowsort
SELECT - 35 + + col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-13
-7
47

query I rowsort
SELECT - cor0.col0 * + 93 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2046
-2604
-7626

onlyif mysql # DIV for integer division: 
query I rowsort label-5328
SELECT ALL - 43 DIV col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5328
SELECT ALL - 43 / col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL + - tab0.col1 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-162
0

query I rowsort
SELECT ALL - 60 FROM tab1 GROUP BY tab1.col1
----
-60
-60
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 90 + 78 col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
168
168
168

query I rowsort
SELECT - - 44 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
44
44
44

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY col1, col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 84 col0 FROM tab0 GROUP BY tab0.col0
----
84
84
84

onlyif mysql # DIV for integer division: 
query I rowsort label-5335
SELECT + cor0.col0 + + cor0.col0 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
29
83

skipif mysql # not compatible
query I rowsort label-5335
SELECT + cor0.col0 + + cor0.col0 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
29
83

onlyif mysql # DIV for integer division: 
query I rowsort label-5336
SELECT ALL - 70 DIV col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-11

skipif mysql # not compatible
query I rowsort label-5336
SELECT ALL - 70 / col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-11

onlyif mysql # DIV for integer division: 
query I rowsort label-5337
SELECT ALL + 38 DIV - 17 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-5337
SELECT ALL + 38 / - 17 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2
-2
-2

query I rowsort
SELECT ALL + 6 FROM tab0 GROUP BY tab0.col1
----
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 77 * 32 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 35 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-35

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0
0

query I rowsort
SELECT + 18 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
18
18
18

query I rowsort
SELECT - 11 + + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
13
27
68

query I rowsort
SELECT DISTINCT + 38 - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-33
-7
30

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 62, tab0.col1 ) FROM tab0 GROUP BY tab0.col2
----
62
62
62

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5346
SELECT ALL CAST( NULL AS SIGNED ) / cor0.col1 FROM tab1 cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5346
SELECT ALL CAST ( NULL AS INTEGER ) / cor0.col1 FROM tab1 cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT col1 FROM tab2 AS cor0 WHERE ( col1 ) IS NOT NULL OR ( NULL ) IN ( + cor0.col0 / cor0.col1 + - cor0.col1 ) GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL col0 * + tab1.col0 AS col1 FROM tab1 WHERE NOT ( - tab1.col2 ) <= NULL GROUP BY col0
----

query I rowsort
SELECT DISTINCT tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL BETWEEN col2 AND - tab2.col2
----

query I rowsort
SELECT tab0.col2 + tab0.col2 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1482
600
6320

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + 55 AS col0 FROM tab2 GROUP BY tab2.col1
----
55
55
55

query I rowsort
SELECT ALL + 88 FROM tab0 GROUP BY tab0.col2
----
88
88
88

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL + col2 * 46 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
1104
1748
3634

query I rowsort
SELECT + 67 * 6 FROM tab1 GROUP BY tab1.col0
----
402
402
402

query I rowsort
SELECT cor0.col2 * - 67 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3015
-4757
-536

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 39, 36 - tab0.col0 * 81, + tab0.col1 + tab0.col2 ) + tab0.col0 * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1888
6928
715

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT tab0.col2 + - 95 FROM tab0 GROUP BY tab0.col2
----
-16
-57
-71

query I rowsort
SELECT 56 * - tab1.col2 - 46 FROM tab1 GROUP BY tab1.col2
----
-2566
-4022
-494

query I rowsort
SELECT DISTINCT - 80 FROM tab1 GROUP BY tab1.col2
----
-80

query I rowsort
SELECT 34 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3094
3128
510

query I rowsort
SELECT ALL + + tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col0 col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT ALL + 70 FROM tab1 GROUP BY tab1.col1
----
70
70
70

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5368
SELECT ALL + CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5368
SELECT ALL + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - tab2.col0 + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5370
SELECT - 87 DIV 41 FROM tab1 GROUP BY tab1.col1
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-5370
SELECT - 87 / 41 FROM tab1 GROUP BY tab1.col1
----
-2
-2
-2

query I rowsort
SELECT ALL + col1 + + 25 FROM tab0 AS cor0 GROUP BY cor0.col1
----
106
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 92 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
92
92
92

query I rowsort
SELECT - 67 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-67
-67

query I rowsort
SELECT cor0.col2 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
1260
176
5822

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
45
71
8

query I rowsort
SELECT DISTINCT 51 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
51

query I rowsort
SELECT - + 33 - cor0.col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
-39
-77
-90

query I rowsort
SELECT DISTINCT cor0.col1 + + col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
0
162

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 11 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
11

query I rowsort
SELECT ALL - 25 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-25
-25

onlyif mysql # DIV for integer division: 
query I rowsort label-5386
SELECT DISTINCT - + 25 DIV tab1.col2 FROM tab1 GROUP BY col2
----
-3
0

skipif mysql # not compatible
query I rowsort label-5386
SELECT DISTINCT - + 25 / tab1.col2 FROM tab1 GROUP BY col2
----
-3
0

query I rowsort
SELECT 68 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
68
68
68

query I rowsort
SELECT ALL COALESCE ( + cor0.col0, + 0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + 46 * tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2070
3266
368

query I rowsort
SELECT ALL - 81 + 50 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-31
-31
-31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 91 col1 FROM tab1 GROUP BY tab1.col1
----
91
91
91

query I rowsort
SELECT DISTINCT 3 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
18
94
95

query I rowsort
SELECT + cor0.col0 * - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 51 col2 FROM tab0 GROUP BY tab0.col1
----
51
51

query I rowsort
SELECT - NULLIF ( - tab1.col1, tab1.col1 ) * tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 * 91 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-4050
-6390
-720

query I rowsort
SELECT + 92 FROM tab0 GROUP BY tab0.col2
----
92
92
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + 60 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
60
60
60

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 96, col0 * - ( 98 * col1 ) ) AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
96
96
96

query I rowsort
SELECT + 66 AS col1 FROM tab0 GROUP BY tab0.col2
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 0 * col0 col1 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT 2 FROM tab1 GROUP BY tab1.col0
----
2
2
2

query I rowsort
SELECT - tab2.col1 + 52 AS col1 FROM tab2 GROUP BY tab2.col1
----
-7
-9
11

query I rowsort
SELECT 81 * - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-1782
-2268
-6642

query I rowsort
SELECT DISTINCT - - 7 FROM tab1 GROUP BY col2
----
7

query I rowsort
SELECT ALL + tab0.col1 * tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT + 36 FROM tab2 GROUP BY tab2.col0
----
36
36
36

query I rowsort
SELECT DISTINCT 61 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
61

query I rowsort
SELECT + 29 FROM tab2 GROUP BY col1
----
29
29
29

query I rowsort
SELECT - 61 FROM tab1 GROUP BY tab1.col1
----
-61
-61
-61

query I rowsort
SELECT DISTINCT + 45 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
45

query I rowsort
SELECT ( ( 74 ) ) AS col0 FROM tab1 GROUP BY tab1.col2
----
74
74
74

query I rowsort
SELECT DISTINCT - + tab2.col1 * col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL 73 + col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
164
165
88

query I rowsort
SELECT DISTINCT cor0.col0 * + col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1305
5336
7189

query I rowsort
SELECT ALL + 40 * + col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1120
3280
880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + 16 FROM tab1 cor0 GROUP BY cor0.col1
----
16
16
16

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT 9 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
9
9

query I rowsort
SELECT ALL col1 * col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5423
SELECT - + CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5423
SELECT - + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 98 AS col1 FROM tab2 GROUP BY tab2.col2
----
98
98
98

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 92, + cor0.col2 ) FROM tab0 AS cor0 GROUP BY col0
----
92
92
92

query I rowsort
SELECT + cor0.col0 * + 0 - + cor0.col0 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-1305
-5336
-7189

query I rowsort
SELECT ALL + 67 * tab0.col1 + 63 FROM tab0 GROUP BY tab0.col1
----
5490
63

query I rowsort
SELECT cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT + 75 AS col0 FROM tab0 GROUP BY tab0.col1
----
75
75

query I rowsort
SELECT - + 70 * 35 AS col2 FROM tab0 GROUP BY tab0.col0
----
-2450
-2450
-2450

query I rowsort
SELECT + 14 FROM tab2 GROUP BY tab2.col0
----
14
14
14

query I rowsort
SELECT - tab0.col0 + + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT ALL + + tab1.col0 + - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT 29 AS col0 FROM tab2 GROUP BY col1
----
29
29
29

query I rowsort
SELECT ALL 77 FROM tab1 AS cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT - ( - 6 ) * cor0.col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
270
426
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT 25 AS col1 FROM tab1 GROUP BY tab1.col2
----
25
25
25

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1849
676
6889

onlyif mysql # DIV for integer division: 
query I rowsort label-5440
SELECT + cor0.col1 DIV cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5440
SELECT + cor0.col1 / cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
1

query I rowsort
SELECT DISTINCT - 70 * - 25 AS col0 FROM tab0 GROUP BY tab0.col1
----
1750

onlyif mysql # DIV for integer division: 
query I rowsort label-5442
SELECT DISTINCT cor0.col0 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
1

skipif mysql # not compatible
query I rowsort label-5442
SELECT DISTINCT cor0.col0 / cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
1

query I rowsort
SELECT + 18 + - 28 FROM tab1 cor0 GROUP BY cor0.col2
----
-10
-10
-10

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 99 AS col2 FROM tab1 GROUP BY tab1.col0
----
99
99
99

query I rowsort
SELECT ALL 45 AS col2 FROM tab1 GROUP BY tab1.col0
----
45
45
45

query I rowsort
SELECT - cor0.col1 + - 51 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-132
-51

query I rowsort
SELECT - 16 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-16
-16
-16

query I rowsort
SELECT + cor0.col1 + 96 FROM tab1 AS cor0 GROUP BY cor0.col1
----
102
140
153

query I rowsort
SELECT 69 FROM tab1 cor0 GROUP BY cor0.col1
----
69
69
69

query I rowsort
SELECT 76 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
76
76
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 72 col2 FROM tab0 GROUP BY tab0.col1
----
72
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 26 col1 FROM tab0 GROUP BY tab0.col1
----
-26
-26

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5454
SELECT - CAST( NULL AS SIGNED ) col2 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5454
SELECT - CAST ( NULL AS INTEGER ) col2 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + tab1.col1 + + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL IS NOT NULL
----
114
12
88

query I rowsort
SELECT - tab2.col0 * + col0 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-210
-8190
-8372

query I rowsort
SELECT ALL - 30 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-30
-30
-30

query I rowsort
SELECT DISTINCT 31 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
31

query I rowsort
SELECT ALL - - col2 + + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
116
158
174

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5462
SELECT ALL + tab0.col2 * + CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5462
SELECT ALL + tab0.col2 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 65 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
65
65
65

query I rowsort
SELECT 80 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
80
80
80

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-5466
SELECT - tab2.col2 DIV 51 col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5466
SELECT - tab2.col2 / 51 col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT 80 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT ALL + tab1.col1 * - 23 + + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1254
-132
-968

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 19 col0 FROM tab1 GROUP BY tab1.col0
----
-19
-19
-19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - cor0.col1 ) col1 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT - 79 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
-79
-79
-79

query I rowsort
SELECT - tab1.col0 * col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT + tab1.col0 + - 61 FROM tab1 GROUP BY tab1.col0
----
-33
-39
21

onlyif mysql # DIV for integer division: 
query I rowsort label-5474
SELECT DISTINCT cor0.col2 DIV - 45 AS col1 FROM tab1 cor0 GROUP BY col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-5474
SELECT DISTINCT cor0.col2 / - 45 AS col1 FROM tab1 cor0 GROUP BY col2
----
-1
0

query I rowsort
SELECT - 13 FROM tab1 cor0 GROUP BY col2
----
-13
-13
-13

query I rowsort
SELECT DISTINCT + 30 AS col2 FROM tab2 GROUP BY tab2.col0
----
30

query I rowsort
SELECT ALL - 75 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-75
-75
-75

query I rowsort
SELECT - tab0.col2 + 87 AS col2 FROM tab0 GROUP BY tab0.col2
----
49
63
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col2 FROM tab2 GROUP BY tab2.col2 HAVING NULL < NULL
----

query I rowsort
SELECT + - 49 * - tab0.col1 + 3 FROM tab0 GROUP BY tab0.col1
----
3
3972

query I rowsort
SELECT + - tab2.col0 * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT + tab1.col0 * - col0 + tab1.col0 * 63 FROM tab1 GROUP BY tab1.col0
----
-1558
902
980

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT + cor0.col0 + - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-72
12
34

query I rowsort
SELECT 90 * + cor0.col1 AS col0 FROM tab0 cor0 GROUP BY col1, cor0.col1
----
0
7290

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5487
SELECT + CAST( NULL AS SIGNED ) * + 43 + 64 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5487
SELECT + CAST ( NULL AS INTEGER ) * + 43 + 64 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-5488
SELECT cor0.col1 DIV - ( + col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5488
SELECT cor0.col1 / - ( + col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT + 87 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
87
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 - - cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT - 7 AS col2 FROM tab1 GROUP BY col0
----
-7
-7
-7

query I rowsort
SELECT 25 AS col1 FROM tab2 GROUP BY tab2.col0
----
25
25
25

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
26
43
83

query I rowsort
SELECT DISTINCT - - 55 AS col0 FROM tab1 GROUP BY tab1.col1
----
55

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT + 90 FROM tab2 GROUP BY tab2.col2
----
90
90
90

query I rowsort
SELECT DISTINCT col1 - - 67 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
108
126
128

query I rowsort
SELECT + 86 AS col0 FROM tab0 GROUP BY tab0.col2
----
86
86
86

query I rowsort
SELECT col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - NULLIF ( - cor0.col2, 66 / + 97 + + cor0.col2 ) col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
45
71
8

query I rowsort
SELECT DISTINCT - 68 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-113
-139
-76

query I rowsort
SELECT DISTINCT - 40 AS col2 FROM tab1 GROUP BY tab1.col0
----
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 73 col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
73

query I rowsort
SELECT - 37 AS col2 FROM tab2 GROUP BY tab2.col1
----
-37
-37
-37

query I rowsort
SELECT DISTINCT + 90 * + ( - cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3690
-5310
-5490

query I rowsort
SELECT DISTINCT + + 15 + 11 AS col2 FROM tab1 GROUP BY col1
----
26

query I rowsort
SELECT DISTINCT 79 * - tab2.col2 + tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
-4524
-6162
-6786

query I rowsort
SELECT COALESCE ( + 49, cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT ALL cor0.col2 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2025
-5041
-64

query I rowsort
SELECT - ( cor0.col1 ) * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT - 60 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-60

query I rowsort
SELECT + cor0.col2 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5513
SELECT ALL - cor0.col2 * + CAST( - 87 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
2088
3306
6873

skipif mysql # not compatible
query I rowsort label-5513
SELECT ALL - cor0.col2 * + CAST ( - 87 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
2088
3306
6873

query I rowsort
SELECT ALL 95 * tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
2090
2660
7790

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
116
158
174

query I rowsort
SELECT + 81 AS col0 FROM tab2 GROUP BY tab2.col2
----
81
81
81

query I rowsort
SELECT + - 74 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-4292
-5846
-6438

query I rowsort
SELECT - 7 * 80 FROM tab0 GROUP BY tab0.col0
----
-560
-560
-560

query I rowsort
SELECT 37 AS col2 FROM tab1 GROUP BY tab1.col0
----
37
37
37

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
225
8281
8464

query I rowsort
SELECT - col1 * tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT DISTINCT + 1 FROM tab1 GROUP BY tab1.col1
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 14 col1 FROM tab0 GROUP BY tab0.col2
----
-14

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5524
SELECT DISTINCT + tab0.col1 - + CAST( NULL AS DECIMAL ) FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-5524
SELECT DISTINCT + tab0.col1 - + CAST ( NULL AS REAL ) FROM tab0 GROUP BY tab0.col1
----
NULL

query I rowsort
SELECT ALL + 96 * + cor0.col2 + 11 FROM tab1 AS cor0 GROUP BY col2
----
4331
6827
779

query I rowsort
SELECT - 74 AS col2 FROM tab1 GROUP BY tab1.col0
----
-74
-74
-74

query I rowsort
SELECT ALL 51 * + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2091
3009
3111

query I rowsort
SELECT - 68 FROM tab1 GROUP BY tab1.col1
----
-68
-68
-68

query I rowsort
SELECT + 4 AS col2 FROM tab0 GROUP BY tab0.col2
----
4
4
4

query I rowsort
SELECT DISTINCT - 41 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-41

query I rowsort
SELECT + 17 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT - 19 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-19
-19
-19

query I rowsort
SELECT DISTINCT + + col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-5534
SELECT - - tab2.col0 DIV col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5534
SELECT - - tab2.col0 / col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT - cor0.col1 * + 80 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6480
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - CASE - tab1.col2 WHEN + 93 THEN - tab1.col2 END * - 68 col2 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + 0 FROM tab2 GROUP BY col1
----
0
0
0

query I rowsort
SELECT DISTINCT 79 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1185
7189
7268

query I rowsort
SELECT ALL + 82 FROM tab2 AS cor0 GROUP BY cor0.col0
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col1 + - 83 col2 FROM tab2 GROUP BY tab2.col1
----
-124
-142
-144

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT cor0.col0 - 18 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
25
65
8

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL tab2.col1 * tab2.col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT - 12 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-12

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
44
57
6

query I rowsort
SELECT DISTINCT - 66 FROM tab2 AS cor0 GROUP BY col1
----
-66

query I rowsort
SELECT col2 * + 1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 85 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
85

query I rowsort
SELECT DISTINCT 62 FROM tab1 cor0 GROUP BY cor0.col0
----
62

query I rowsort
SELECT ALL - cor1.col0 * - 89 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
2314
3827
7387

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT - ( + 66 ) FROM tab0 GROUP BY col1
----
-66
-66

query I rowsort
SELECT DISTINCT + tab1.col2 * + tab1.col2 + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1980
4970
56

query I rowsort
SELECT - col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0, col1
----
-26
-43
-83

query I rowsort
SELECT ALL ( cor0.col0 ) FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT 84 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
84
84
84

query I rowsort
SELECT col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + 68 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
68
68
68

query I rowsort
SELECT + 24 + - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-20
-33
18

query I rowsort
SELECT DISTINCT - 1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1

query I rowsort
SELECT - + tab0.col1 * 31 AS col2 FROM tab0 GROUP BY col1
----
-2511
0

query I rowsort
SELECT ALL 36 + + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
115
60
74

query I rowsort
SELECT ( 57 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT + 54 AS col1 FROM tab2 GROUP BY tab2.col1
----
54
54
54

query I rowsort
SELECT DISTINCT - 33 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-33

query I rowsort
SELECT 80 FROM tab1 AS cor0 GROUP BY col1
----
80
80
80

query I rowsort
SELECT ALL + 17 FROM tab0 AS cor0 GROUP BY cor0.col1
----
17
17

onlyif mysql # DIV for integer division: 
query I rowsort label-5571
SELECT - + col0 DIV + 32 FROM tab1 GROUP BY col0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-5571
SELECT - + col0 / + 32 FROM tab1 GROUP BY col0
----
-2
0
0

query I rowsort
SELECT - 22 + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-22
59

query I rowsort
SELECT 72 AS col0 FROM tab0 GROUP BY tab0.col1
----
72
72

query I rowsort
SELECT DISTINCT + + 48 AS col1 FROM tab2 GROUP BY tab2.col2
----
48

onlyif mysql # DIV for integer division: 
query I rowsort label-5575
SELECT DISTINCT + 90 DIV tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1

skipif mysql # not compatible
query I rowsort label-5575
SELECT DISTINCT + 90 / tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1

query I rowsort
SELECT ALL col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, col0
----
166
52
86

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT 68 * COALESCE ( + 77, cor0.col2 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
5236
5236
5236

onlyif mysql # DIV for integer division: 
query I rowsort label-5578
SELECT DISTINCT - + 0 DIV - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
0

skipif mysql # not compatible
query I rowsort label-5578
SELECT DISTINCT - + 0 / - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5579
SELECT + tab1.col0 DIV tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5579
SELECT + tab1.col0 / tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT ALL + 5 AS col2 FROM tab0 GROUP BY tab0.col0
----
5
5
5

query I rowsort
SELECT ALL + 34 * tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
3094
3128
510

query I rowsort
SELECT col1 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
162

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( - 25, tab1.col1, + tab1.col0 - + tab1.col2 ) - - 90 AS col2 FROM tab1 GROUP BY tab1.col1
----
115

query I rowsort
SELECT ALL - + 8 AS col0 FROM tab2 GROUP BY tab2.col1
----
-8
-8
-8

query I rowsort
SELECT 23 + - col1 FROM tab2 GROUP BY tab2.col1
----
-18
-36
-38

query I rowsort
SELECT ALL + NULLIF ( + cor0.col2, - cor0.col2 ) * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
3364
6241
7569

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5587
SELECT CAST( - 52 AS SIGNED ) FROM tab0 GROUP BY col0
----
-52
-52
-52

skipif mysql # not compatible
query I rowsort label-5587
SELECT CAST ( - 52 AS INTEGER ) FROM tab0 GROUP BY col0
----
-52
-52
-52

query I rowsort
SELECT ALL - 21 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-21
-21
-21

query I rowsort
SELECT ALL - 30 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
-30
-30
-30

query I rowsort
SELECT ( tab2.col1 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 99 AS col1 FROM tab0 GROUP BY tab0.col1
----
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 70 col2 FROM tab2 GROUP BY tab2.col1
----
-70

query I rowsort
SELECT DISTINCT + cor0.col2 * + 22 + cor0.col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
1817
552
874

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5594
SELECT + CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5594
SELECT + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + 42 FROM tab0 GROUP BY tab0.col1
----
42
42

query I rowsort
SELECT ALL - + tab0.col2 * col2 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL - 61 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-61
-61
-61

query I rowsort
SELECT + 47 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
47
47

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + 10 + - cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-48
-69
-77

query I rowsort
SELECT - 62 FROM tab0 cor0 GROUP BY cor0.col2
----
-62
-62
-62

query I rowsort
SELECT ALL - 47 * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1222
-2021
-3901

query I rowsort
SELECT ALL + 23 AS col1 FROM tab0 GROUP BY tab0.col0
----
23
23
23

onlyif mysql # DIV for integer division: 
query I rowsort label-5604
SELECT + 8 DIV col1 + - 75 FROM tab1 GROUP BY tab1.col1
----
-74
-75
-75

skipif mysql # not compatible
query I rowsort label-5604
SELECT + 8 / col1 + - 75 FROM tab1 GROUP BY tab1.col1
----
-74
-75
-75

query I rowsort
SELECT DISTINCT - 6 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2
39
65

query I rowsort
SELECT - ( - cor0.col0 ) * 93 FROM tab0 AS cor0 GROUP BY col0
----
2418
3999
7719

onlyif mysql # DIV for integer division: 
query I rowsort label-5607
SELECT DISTINCT - + 25 DIV - 85 FROM tab1 GROUP BY tab1.col2
----
0

skipif mysql # not compatible
query I rowsort label-5607
SELECT DISTINCT - + 25 / - 85 FROM tab1 GROUP BY tab1.col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5608
SELECT 66 DIV 22 FROM tab0 GROUP BY tab0.col0
----
3
3
3

skipif mysql # not compatible
query I rowsort label-5608
SELECT 66 / 22 FROM tab0 GROUP BY tab0.col0
----
3
3
3

query I rowsort
SELECT - 48 * col2 - + 98 FROM tab0 GROUP BY tab0.col2
----
-1250
-1922
-3890

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5610
SELECT CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5610
SELECT CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
41
59
61

query I rowsort
SELECT ALL + ( - tab0.col1 ) * - 11 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
891

query I rowsort
SELECT DISTINCT - 78 FROM tab0 GROUP BY tab0.col1
----
-78

query I rowsort
SELECT DISTINCT - ( - cor0.col0 ) + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 23 * 82 col0 FROM tab2 GROUP BY tab2.col1
----
1886

query I rowsort
SELECT 42 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
42
42
42

query I rowsort
SELECT DISTINCT - cor0.col0 + + col0 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
462
6642
756

query I rowsort
SELECT DISTINCT - + tab2.col0 + + col0 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT DISTINCT + 45 FROM tab0 GROUP BY tab0.col0
----
45

query I rowsort
SELECT + cor0.col0 * 56 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1232
1568
4592

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
6561

query I rowsort
SELECT - ( - 52 ) + tab0.col2 * + 16 FROM tab0 GROUP BY tab0.col2
----
1316
436
660

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT COALESCE ( - 96, col0 * 29 ) - + 83 * tab0.col1 col1 FROM tab0 GROUP BY col1
----
-6819
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 90 col1 FROM tab2 GROUP BY col2
----
-90

query I rowsort
SELECT DISTINCT + 37 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
37

query I rowsort
SELECT 47 AS col0 FROM tab1 GROUP BY col1
----
47
47
47

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL + + 10 FROM tab2 GROUP BY tab2.col2
----
10
10
10

query I rowsort
SELECT + 4 * + 33 AS col2 FROM tab0 GROUP BY tab0.col1
----
132
132

query I rowsort
SELECT - 80 + 32 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-48
-48
-48

onlyif mysql # DIV for integer division: 
query I rowsort label-5631
SELECT DISTINCT 97 + cor0.col2 DIV + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
98

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5631
SELECT DISTINCT 97 + cor0.col2 / + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
98

onlyif mysql # DIV for integer division: 
query I rowsort label-5632
SELECT ALL - + COALESCE ( 44, - tab1.col0, - tab1.col1 DIV - 44 ) * + 95 FROM tab1 GROUP BY tab1.col2
----
-4180
-4180
-4180

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-5632
SELECT ALL - + COALESCE ( 44, - tab1.col0, - tab1.col1 / - 44 ) * + 95 FROM tab1 GROUP BY tab1.col2
----
-4180
-4180
-4180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 75 * + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3375
5325
600

query I rowsort
SELECT DISTINCT + 47 AS col2 FROM tab1 GROUP BY tab1.col0
----
47

query I rowsort
SELECT + + 76 FROM tab0 GROUP BY tab0.col0
----
76
76
76

query I rowsort
SELECT DISTINCT 23 FROM tab1 cor0 GROUP BY cor0.col1
----
23

query I rowsort
SELECT + 96 * - 94 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-9024
-9024

query I rowsort
SELECT 99 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
99
99
99

query I rowsort
SELECT DISTINCT + 1 - + 56 FROM tab2 GROUP BY tab2.col1
----
-55

query I rowsort
SELECT + tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT tab2.col0 * + tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
225
8281
8464

onlyif mysql # DIV for integer division: 
query I rowsort label-5642
SELECT tab2.col1 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5642
SELECT tab2.col1 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col2 + - tab0.col2 * tab0.col2 col1 FROM tab0 WHERE + tab0.col0 * - tab0.col2 IS NULL GROUP BY col2
----

query I rowsort
SELECT + 51 FROM tab2 AS cor0 GROUP BY cor0.col2
----
51
51
51

onlyif mysql # DIV for integer division: 
query I rowsort label-5645
SELECT tab2.col1 DIV + 77 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5645
SELECT tab2.col1 / + 77 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT - + 94 FROM tab0 GROUP BY tab0.col1
----
-94
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 37 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
37

query I rowsort
SELECT ALL 13 FROM tab1 AS cor0 GROUP BY cor0.col2
----
13
13
13

query I rowsort
SELECT ALL COALESCE ( cor0.col2, cor0.col2 ) * cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
3364
6241
7569

onlyif mysql # DIV for integer division: 
query I rowsort label-5650
SELECT DISTINCT col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-5650
SELECT DISTINCT col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

onlyif mysql # DIV for integer division: 
query I rowsort label-5651
SELECT DISTINCT cor0.col2 DIV + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-5651
SELECT DISTINCT cor0.col2 / + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5652
SELECT - cor0.col0 * + CAST( NULL AS DECIMAL ) + + 52 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5652
SELECT - cor0.col0 * + CAST ( NULL AS REAL ) + + 52 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + tab2.col0 * + 50 FROM tab2 GROUP BY col0
----
4550
4600
750

query I rowsort
SELECT - 60 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-60
-60
-60

query I rowsort
SELECT cor0.col2 * col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
2025
5041
64

query I rowsort
SELECT cor0.col1 + + 15 FROM tab0 AS cor0 GROUP BY cor0.col1
----
15
96

query I rowsort
SELECT DISTINCT + cor0.col2 + + 7 FROM tab0 AS cor0 GROUP BY cor0.col2
----
31
45
86

query I rowsort
SELECT ALL + tab2.col2 * + 35 + - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
1972
2686
2958

query I rowsort
SELECT + col0 + - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING - tab0.col0 IS NOT NULL
----
26
43
83

query I rowsort
SELECT + 34 AS col1 FROM tab0 GROUP BY tab0.col0
----
34
34
34

query I rowsort
SELECT + 7 FROM tab0 GROUP BY tab0.col0
----
7
7
7

query I rowsort
SELECT DISTINCT 53 FROM tab2 GROUP BY col0
----
53

query I rowsort
SELECT ALL + + 23 AS col2 FROM tab1 GROUP BY tab1.col0
----
23
23
23

query I rowsort
SELECT ALL - cor0.col2 * 54 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-3040
-4175
-4683

query I rowsort
SELECT DISTINCT - 20 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-20

query I rowsort
SELECT - cor0.col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL - 77 AS col0 FROM tab1 GROUP BY tab1.col0
----
-77
-77
-77

query I rowsort
SELECT DISTINCT + 2 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-118
-122
-82

query I rowsort
SELECT - 58 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-58
-58
-58

query I rowsort
SELECT - 27 FROM tab2 GROUP BY tab2.col0
----
-27
-27
-27

query I rowsort
SELECT - cor0.col1 * + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT + 25 FROM tab0 GROUP BY col0
----
25
25
25

query I rowsort
SELECT 97 FROM tab1 GROUP BY tab1.col0
----
97
97
97

query I rowsort
SELECT 67 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
2948
3819
402

query I rowsort
SELECT cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT col1 * + tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
24
38
79

query I rowsort
SELECT ALL - 45 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-45
-45

query I rowsort
SELECT DISTINCT + 33 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
33

query I rowsort
SELECT + 46 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT 77 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
77
77
77

query I rowsort
SELECT ALL - 36 FROM tab1 GROUP BY tab1.col2
----
-36
-36
-36

query I rowsort
SELECT 50 FROM tab1 AS cor0 GROUP BY col2
----
50
50
50

query I rowsort
SELECT 93 FROM tab1 AS cor0 GROUP BY col2
----
93
93
93

query I rowsort
SELECT DISTINCT 27 FROM tab0 AS cor0 GROUP BY col0, cor0.col0, cor0.col1
----
27

query I rowsort
SELECT - 82 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-82
-82
-82

query I rowsort
SELECT DISTINCT 92 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
92

query I rowsort
SELECT ALL - 18 FROM tab0 GROUP BY tab0.col1
----
-18
-18

query I rowsort
SELECT + col0 + + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
124
26
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 67 * cor0.col2 - + cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
3794
5202
5814

query I rowsort
SELECT + + col0 + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT tab1.col2 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT - tab2.col0 - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT ALL + tab0.col2 + - 77 FROM tab0 GROUP BY tab0.col2
----
-39
-53
2

query I rowsort
SELECT tab2.col2 + + 61 FROM tab2 GROUP BY tab2.col2
----
119
140
148

query I rowsort
SELECT + tab2.col0 + - 55 * + 50 FROM tab2 GROUP BY tab2.col0
----
-2658
-2659
-2735

query I rowsort
SELECT ALL + + ( 69 ) FROM tab0 GROUP BY col1
----
69
69

query I rowsort
SELECT cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor1.col1
----
9 values hashing to a7fc3d55de9b3e11322658ec587831cf

query I rowsort
SELECT 79 FROM tab2 AS cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT - 45 FROM tab1 GROUP BY col2
----
-45
-45
-45

query I rowsort
SELECT DISTINCT 15 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5704
SELECT ALL + CAST( NULL AS SIGNED ) * 86 AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5704
SELECT ALL + CAST ( NULL AS INTEGER ) * 86 AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 65 FROM tab1 AS cor0 GROUP BY cor0.col2
----
65
65
65

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( 7, tab2.col2 * - col0 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
7

query I rowsort
SELECT - ( + 35 ) FROM tab1 GROUP BY tab1.col0
----
-35
-35
-35

query I rowsort
SELECT DISTINCT + 77 AS col0 FROM tab1 GROUP BY col0
----
77

query I rowsort
SELECT cor0.col0 * + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1849
676
6889

query I rowsort
SELECT ALL + 44 + - 95 FROM tab0 cor0 GROUP BY cor0.col1
----
-51
-51

query I rowsort
SELECT ALL ( - cor1.col1 ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 21 FROM tab0 AS cor0 GROUP BY cor0.col2
----
21
21
21

query I rowsort
SELECT DISTINCT cor0.col1 + - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT ALL - 12 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-12
-12
-12

query I rowsort
SELECT 13 FROM tab2 GROUP BY col1
----
13
13
13

query I rowsort
SELECT tab0.col1 - tab0.col1 FROM tab0 GROUP BY col1
----
0
0

query I rowsort
SELECT ALL - + 70 FROM tab2 GROUP BY tab2.col1
----
-70
-70
-70

query I rowsort
SELECT + ( + tab1.col2 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT - + 75 FROM tab2 GROUP BY tab2.col2
----
-75
-75
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 78 col0 FROM tab0 GROUP BY tab0.col2
----
78
78
78

query I rowsort
SELECT ALL 23 * NULLIF ( cor0.col0, cor0.col0 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 72 FROM tab1 AS cor0 GROUP BY col1
----
-72
-72
-72

query I rowsort
SELECT + - col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5724
SELECT + col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5724
SELECT + col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
1
1
1

query I rowsort
SELECT ALL cor0.col1 * + 47 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
3807

query I rowsort
SELECT ALL - ( - 61 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
61
61

query I rowsort
SELECT ALL + 78 - + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-3
78
78

query I rowsort
SELECT + cor0.col0 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
133
150
76

query I rowsort
SELECT cor0.col0 + ( + cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - cor0.col0 + 34 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-48
12
6

query I rowsort
SELECT - 63 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-63
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT - 88 AS col0 FROM tab0 GROUP BY tab0.col0
----
-88
-88
-88

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
-81
0
0

query I rowsort
SELECT 17 * 31 FROM tab0 GROUP BY col1
----
527
527

query I rowsort
SELECT ALL - tab0.col1 + + 67 FROM tab0 GROUP BY tab0.col1
----
-14
67

query I rowsort
SELECT - cor0.col0 * - 66 + - 21 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1431
1827
5391

query I rowsort
SELECT + col1 AS col1 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + cor0.col2 + cor0.col2 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
1392
5394
7268

onlyif mysql # DIV for integer division: 
query I rowsort label-5741
SELECT cor0.col1 DIV - 26 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-3
0

skipif mysql # not compatible
query I rowsort label-5741
SELECT cor0.col1 / - 26 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-3
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5742
SELECT 41 DIV cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5742
SELECT 41 / cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT tab0.col2 + - 82 * + 16 FROM tab0 GROUP BY tab0.col2
----
-1233
-1274
-1288

query I rowsort
SELECT - + col1 + 77 AS col2 FROM tab1 GROUP BY col1
----
20
33
71

query I rowsort
SELECT + col2 * + 82 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4756
6478
7134

query I rowsort
SELECT DISTINCT col2 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT col1 + + cor0.col1 * 35 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1476
2124
2196

query I rowsort
SELECT DISTINCT col2 * 74 AS col0 FROM tab0 GROUP BY tab0.col2
----
1776
2812
5846

query I rowsort
SELECT col1 - - cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1722
3540
3782

query I rowsort
SELECT DISTINCT + 71 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
71

query I rowsort
SELECT DISTINCT + - ( + tab0.col2 ) * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT - 91 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-91
-91
-91

query I rowsort
SELECT ALL 9 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col1, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL col0 * + col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col0 col1 FROM tab1 WHERE NOT ( NULL ) IN ( tab1.col0 * - tab1.col2 ) GROUP BY tab1.col0 HAVING NOT NULL <> ( NULL )
----

query I rowsort
SELECT ALL 31 + - tab1.col1 * 93 AS col0 FROM tab1 GROUP BY tab1.col1
----
-4061
-527
-5270

query I rowsort
SELECT 16 + + 23 AS col1 FROM tab2 GROUP BY tab2.col0
----
39
39
39

query I rowsort
SELECT + 42 FROM tab1 GROUP BY tab1.col1
----
42
42
42

query I rowsort
SELECT DISTINCT + NULLIF ( tab2.col0, tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL

query I rowsort
SELECT ALL - 66 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
-66
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
2025
5041
64

query I rowsort
SELECT DISTINCT 45 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
45

query I rowsort
SELECT ALL 97 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
97
97
97

query I rowsort
SELECT DISTINCT 48 FROM tab0 GROUP BY col0
----
48

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + 28 * COALESCE ( + 92, + cor0.col0 * 74, + cor0.col2 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2576
2576
2576

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT - - 87 FROM tab1 GROUP BY col0
----
87
87
87

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL col2 * - col0 + + cor0.col2 * cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
0
0
0

query I rowsort
SELECT ALL 95 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
95
95
95

query I rowsort
SELECT - 38 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-38
43

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
132
1596
3608

query I rowsort
SELECT - col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT + + ( - 25 ) FROM tab1 GROUP BY col1
----
-25
-25
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab1.col1 + col1 col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT ALL + + tab1.col1 * tab1.col1 + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1980
3306
42

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5779
SELECT + CAST( NULL AS DECIMAL ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5779
SELECT + CAST ( NULL AS REAL ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 56 AS col0 FROM tab2 GROUP BY tab2.col2
----
56

query I rowsort
SELECT - 45 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-45
-45
-45

query I rowsort
SELECT - 35 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-35
-35
-35

query I rowsort
SELECT tab1.col2 AS col1 FROM tab1 WHERE NULL IS NULL GROUP BY col2
----
45
71
8

query I rowsort
SELECT + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL NOT IN ( - col1 )
----

query I rowsort
SELECT DISTINCT tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL NOT IN ( + tab0.col2 )
----

query I rowsort
SELECT DISTINCT + - tab1.col0 + - ( - 92 ) FROM tab1 GROUP BY tab1.col0
----
10
64
70

query I rowsort
SELECT 42 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
3822
3864
630

query I rowsort
SELECT ALL - - 39 AS col1 FROM tab1 GROUP BY tab1.col1
----
39
39
39

query I rowsort
SELECT 42 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
42
42
42

onlyif mysql # DIV for integer division: 
query I rowsort label-5790
SELECT - - col0 + 1 DIV - 13 FROM tab1 GROUP BY tab1.col0
----
22
28
82

skipif mysql # not compatible
query I rowsort label-5790
SELECT - - col0 + 1 / - 13 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL - - ( - tab1.col1 ) AS col2 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL tab2.col0 * 70 FROM tab2 GROUP BY tab2.col0
----
1050
6370
6440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 58 col2 FROM tab2 GROUP BY col0
----
58

query I rowsort
SELECT ALL - NULLIF ( + col0, - cor0.col0 ) * cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col0, cor0.col1
----
-132
-1596
-3608

query I rowsort
SELECT 3 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
3
3
3

query I rowsort
SELECT ALL tab2.col2 * - 59 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3422
-4661
-5133

onlyif mysql # DIV for integer division: 
query I rowsort label-5797
SELECT DISTINCT - - tab2.col2 DIV + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
1

skipif mysql # not compatible
query I rowsort label-5797
SELECT DISTINCT - - tab2.col2 / + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
1

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL - 25 + - 33 AS col0 FROM tab2 GROUP BY tab2.col2
----
-58
-58
-58

query I rowsort
SELECT cor0.col2 + - 41 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-17
-3
38

query I rowsort
SELECT ALL - 42 AS col0 FROM tab0 GROUP BY tab0.col1
----
-42
-42

query I rowsort
SELECT DISTINCT ( tab1.col1 ) * tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT + 36 FROM tab1 GROUP BY tab1.col0
----
36

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + cor0.col2 + 65 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
103
144
89

query I rowsort
SELECT - 38 + - 24 * - 3 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
34
34
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - tab1.col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT - - tab2.col1 * + 92 AS col0 FROM tab2 GROUP BY tab2.col1
----
3772
5428
5612

query I rowsort
SELECT DISTINCT + cor0.col2 + col1 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1968
38
79

query I rowsort
SELECT 26 AS col1 FROM tab0 GROUP BY tab0.col2
----
26
26
26

query I rowsort
SELECT + ( NULLIF ( + cor0.col0, 4 ) ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 98 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
98
98
98

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
6561

query I rowsort
SELECT + cor0.col0 * 12 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
312
516
996

query I rowsort
SELECT + 6 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
6
6
6

query I rowsort
SELECT - 3 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-273
-276
-45

query I rowsort
SELECT ALL - col2 * 64 FROM tab0 GROUP BY col2
----
-1536
-2432
-5056

query I rowsort
SELECT ALL - 48 AS col2 FROM tab2 GROUP BY tab2.col1
----
-48
-48
-48

query I rowsort
SELECT ALL + - 28 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-2268
0

query I rowsort
SELECT - 92 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-92
-92
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab1.col0 + - 95 * - 9 col1 FROM tab1 GROUP BY tab1.col0
----
773
827
833

query I rowsort
SELECT - cor0.col0 * - 69 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1794
2967
5727

query I rowsort
SELECT cor0.col0 * + cor0.col0 - + col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1825
597
6851

query I rowsort
SELECT ALL + col0 + - cor0.col0 * 72 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1065
-6461
-6532

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT COALESCE ( cor0.col2, ( 46 ) * 65 - cor0.col2 ) + NULLIF ( 20, + cor0.col2 ) FROM tab0 AS cor0 GROUP BY col2
----
44
58
99

query I rowsort
SELECT + col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT 18 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 6 col2 FROM tab0 GROUP BY tab0.col0
----
-6

query I rowsort
SELECT - 21 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-21
-21
-21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 96 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
96
96
96

query I rowsort
SELECT DISTINCT - + 58 FROM tab1 GROUP BY tab1.col2
----
-58

query I rowsort
SELECT + 12 + tab2.col1 * - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1669
-3469
-3709

query I rowsort
SELECT + 90 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
90
90

query I rowsort
SELECT DISTINCT - col1 * col1 FROM tab2 cor0 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT ( - 79 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-79
-79
-79

query I rowsort
SELECT DISTINCT + 59 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
59

query I rowsort
SELECT + - 88 FROM tab1 GROUP BY col1
----
-88
-88
-88

query I rowsort
SELECT DISTINCT 91 - - tab1.col0 * tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
575
6815
875

query I rowsort
SELECT DISTINCT + + 99 FROM tab1 GROUP BY tab1.col0
----
99

query I rowsort
SELECT 51 FROM tab2 AS cor0 GROUP BY cor0.col1
----
51
51
51

query I rowsort
SELECT ALL - col0 - - 21 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-22
-5
-62

query I rowsort
SELECT - ( - tab0.col2 ) AS col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-5846
SELECT + cor0.col0 DIV + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5846
SELECT + cor0.col0 / + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col2 + + tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT - - 40 AS col1 FROM tab1 GROUP BY tab1.col2
----
40

query I rowsort
SELECT 7 FROM tab2 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2622
3168
54

query I rowsort
SELECT 29 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
29
29

query I rowsort
SELECT 28 AS col0 FROM tab1 GROUP BY tab1.col0
----
28
28
28

query I rowsort
SELECT DISTINCT ( 57 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
57

query I rowsort
SELECT col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
41
59
61

query I rowsort
SELECT tab0.col0 * tab0.col0 + 5 FROM tab0 GROUP BY tab0.col0
----
1854
681
6894

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - NULLIF ( cor0.col1, - 10 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT 11 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
11
11

onlyif mysql # DIV for integer division: 
query I rowsort label-5859
SELECT DISTINCT - - tab2.col1 + + tab2.col1 DIV 91 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif mysql # not compatible
query I rowsort label-5859
SELECT DISTINCT - - tab2.col1 + + tab2.col1 / 91 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 57 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
57

query I rowsort
SELECT DISTINCT 77 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
77

query I rowsort
SELECT col0 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT DISTINCT tab2.col1 * 74 AS col0 FROM tab2 GROUP BY tab2.col1
----
3034
4366
4514

query I rowsort
SELECT ALL + cor0.col0 * 55 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1210
1540
4510

query I rowsort
SELECT 86 * 11 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
946
946
946

query I rowsort
SELECT 63 + - tab0.col0 FROM tab0 GROUP BY col0
----
-20
20
37

query I rowsort
SELECT + + 86 FROM tab0 GROUP BY tab0.col1
----
86
86

onlyif mysql # DIV for integer division: 
query I rowsort label-5868
SELECT 88 - col2 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
87
87
87

skipif mysql # not compatible
query I rowsort label-5868
SELECT 88 - col2 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT + cor0.col2 * + 98 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2352
3724
7742

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 98 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT 56 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT - - tab1.col2 * - 7 AS col0 FROM tab1 GROUP BY tab1.col2
----
-315
-497
-56

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
45
71
8

query I rowsort
SELECT ALL + 20 AS col0 FROM tab0 GROUP BY tab0.col1
----
20
20

query I rowsort
SELECT DISTINCT + cor0.col1 * - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + + 14 FROM tab1 GROUP BY tab1.col0
----
14
14
14

query I rowsort
SELECT - col1 * - cor0.col2 - + 73 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, col1, cor0.col2
----
-25
2492
3051

query I rowsort
SELECT DISTINCT + - col2 * - tab1.col2 + tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
10082
128
4050

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT DISTINCT 83 - - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
124
142
144

query I rowsort
SELECT + + 41 + + 28 AS col1 FROM tab2 GROUP BY tab2.col0
----
69
69
69

query I rowsort
SELECT ALL 65 FROM tab2 GROUP BY col2
----
65
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col2 col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0, cor1.col0, cor1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + - 27 AS col0 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
-27

onlyif mysql # DIV for integer division: 
query I rowsort label-5885
SELECT cor0.col2 DIV col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5885
SELECT cor0.col2 / col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
0
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-5886
SELECT 12 DIV + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5886
SELECT 12 / + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT - col1 + ( - cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-162
0

query I rowsort
SELECT - 52 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
-52
-52
-52

query I rowsort
SELECT DISTINCT 34 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col2
----
34

query I rowsort
SELECT DISTINCT - 49 AS col0 FROM tab0 GROUP BY tab0.col1
----
-49

query I rowsort
SELECT + tab2.col2 * + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT ALL 16 FROM tab1 AS cor0 GROUP BY col0, col1
----
16
16
16

query I rowsort
SELECT 63 AS col0 FROM tab0 GROUP BY col2
----
63
63
63

query I rowsort
SELECT DISTINCT 48 FROM tab2 GROUP BY tab2.col1
----
48

query I rowsort
SELECT ALL + - 70 * - col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
2870
4130
4270

query I rowsort
SELECT ALL 43 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
114
51
88

query I rowsort
SELECT 93 + - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
1
2
78

query I rowsort
SELECT ALL + 99 FROM tab2 GROUP BY tab2.col2
----
99
99
99

query I rowsort
SELECT DISTINCT + 29 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
29

query I rowsort
SELECT ALL + tab1.col2 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT ALL - 73 FROM tab1 GROUP BY tab1.col1
----
-73
-73
-73

query I rowsort
SELECT DISTINCT - tab0.col1 + 80 AS col1 FROM tab0 GROUP BY tab0.col1
----
-1
80

query I rowsort
SELECT + NULLIF ( tab2.col0, 85 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL - 88 AS col2 FROM tab0 GROUP BY tab0.col1
----
-88
-88

query I rowsort
SELECT + cor0.col2 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 col1 FROM tab1 GROUP BY tab1.col2
----
74
74
74

query I rowsort
SELECT - 20 AS col0 FROM tab2 GROUP BY tab2.col0
----
-20
-20
-20

query I rowsort
SELECT DISTINCT + 24 AS col0 FROM tab0 GROUP BY tab0.col0
----
24

query I rowsort
SELECT DISTINCT 94 + + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
152
173
181

onlyif mysql # DIV for integer division: 
query I rowsort label-5911
SELECT ALL col2 DIV - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5911
SELECT ALL col2 / - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-1
-1
-1

query I rowsort
SELECT + tab1.col1 + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NULL
----
114
12
88

query I rowsort
SELECT ALL ( 36 ) - - col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
77
95
97

query I rowsort
SELECT ALL ( + col1 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL + col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT + NULLIF ( 12, + cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT ALL col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-5918
SELECT cor0.col2 DIV + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5918
SELECT cor0.col2 / + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL - - ( - tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - - 27 AS col1 FROM tab1 GROUP BY tab1.col0
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1444
576
6241

query I rowsort
SELECT + ( col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, col0, cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + 25 FROM tab0 GROUP BY tab0.col0
----
25

query I rowsort
SELECT 39 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
39
39
39

query I rowsort
SELECT DISTINCT + tab0.col1 * - 51 FROM tab0 GROUP BY tab0.col1
----
-4131
0

query I rowsort
SELECT - 21 * + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-1218
-1659
-1827

query I rowsort
SELECT tab2.col1 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
138
148
99

query I rowsort
SELECT ALL tab1.col1 * + NULLIF ( + tab1.col1, tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - tab2.col0 * - 15 FROM tab2 GROUP BY tab2.col0
----
1365
1380
225

query I rowsort
SELECT ALL 36 FROM tab1 AS cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT ALL 4 + 97 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
101
101
101

query I rowsort
SELECT ALL 69 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
69
69
69

query I rowsort
SELECT ALL ( cor0.col2 ) + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT 24 * col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1896
576
912

query I rowsort
SELECT DISTINCT ( col1 ) + 29 * - tab0.col1 FROM tab0 GROUP BY col1
----
-2268
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 75 col0 FROM tab2 GROUP BY col1
----
75

query I rowsort
SELECT 10 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
10
10
10

query I rowsort
SELECT DISTINCT ( - cor1.col0 ) FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - + tab1.col2 + - tab1.col2 * 15 FROM tab1 GROUP BY tab1.col2
----
-1136
-128
-720

query I rowsort
SELECT col1 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5943
SELECT ALL + 24 DIV 61 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5943
SELECT ALL + 24 / 61 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5944
SELECT DISTINCT 59 DIV 58 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-5944
SELECT DISTINCT 59 / 58 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
166
52
86

query I rowsort
SELECT - 32 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-32
-32
-32

query I rowsort
SELECT DISTINCT 86 FROM tab2 AS cor0 GROUP BY cor0.col0
----
86

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( + 24, - cor0.col0 * + 21 ) + - 76 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
-52
-52
-52

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT cor0.col1 * ( - 56 ) + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
-2255
-3245
-3355

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5951
SELECT DISTINCT cor0.col0 * CAST( NULL AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-5951
SELECT DISTINCT cor0.col0 * CAST ( NULL AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT - 2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-158
-48
-76

query I rowsort
SELECT ALL + 95 AS col2 FROM tab2 GROUP BY tab2.col2
----
95
95
95

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
45
71
8

query I rowsort
SELECT - ( + 77 ) AS col2 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
-77
-77

query I rowsort
SELECT + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 20 col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-20

query I rowsort
SELECT DISTINCT - 53 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col0
----
-53

query I rowsort
SELECT DISTINCT + 37 FROM tab0 AS cor0 GROUP BY col1
----
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 30 col2 FROM tab2 GROUP BY tab2.col0
----
-30

query I rowsort
SELECT 88 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
88
88
88

query I rowsort
SELECT DISTINCT + 55 * - 14 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-770

query I rowsort
SELECT + + 95 AS col2 FROM tab2 GROUP BY tab2.col1
----
95
95
95

query I rowsort
SELECT - 28 - + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-34
-72
-85

query I rowsort
SELECT 62 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
62
62
62

onlyif mysql # DIV for integer division: 
query I rowsort label-5966
SELECT DISTINCT 55 DIV 94 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-5966
SELECT DISTINCT 55 / 94 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT - 99 * + cor0.col0 AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-1485
-9009
-9108

onlyif mysql # DIV for integer division: 
query I rowsort label-5968
SELECT - col0 DIV col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5968
SELECT - col0 / col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT - + 26 AS col0 FROM tab1 GROUP BY tab1.col0
----
-26
-26
-26

query I rowsort
SELECT + 73 * 28 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
2044
2044
2044

query I rowsort
SELECT + 28 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT DISTINCT 99 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
99

query I rowsort
SELECT - 40 FROM tab1 GROUP BY tab1.col1
----
-40
-40
-40

query I rowsort
SELECT DISTINCT - 1 AS col0 FROM tab2 cor0 GROUP BY col2
----
-1

query I rowsort
SELECT DISTINCT - 67 FROM tab0 GROUP BY tab0.col0
----
-67

query I rowsort
SELECT 21 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
21
21
21

query I rowsort
SELECT ALL - col2 * - cor0.col2 FROM tab2 AS cor0 WHERE NULL NOT IN ( col1 / cor0.col0 ) GROUP BY cor0.col2 HAVING ( NULL ) IS NULL
----

query I rowsort
SELECT ALL - + 61 AS col2 FROM tab1 GROUP BY tab1.col0
----
-61
-61
-61

query I rowsort
SELECT DISTINCT + + 21 FROM tab0 GROUP BY tab0.col1
----
21

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5980
SELECT - CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5980
SELECT - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * 36 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
3276
3312
540

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5982
SELECT CAST( NULL AS SIGNED ) - 53 / 67 col2 FROM tab1 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5982
SELECT CAST ( NULL AS INTEGER ) - 53 / 67 col2 FROM tab1 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 2 + - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-4
-42
-55

query I rowsort
SELECT - cor0.col2 * - col2 FROM tab1 cor0 GROUP BY col2, cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT 52 FROM tab0 AS cor0 GROUP BY cor0.col0
----
52

query I rowsort
SELECT - - 33 FROM tab2 GROUP BY tab2.col1
----
33
33
33

onlyif mysql # DIV for integer division: 
query I rowsort label-5987
SELECT DISTINCT + cor0.col0 DIV - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1

skipif mysql # not compatible
query I rowsort label-5987
SELECT DISTINCT + cor0.col0 / - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1

query I rowsort
SELECT - tab0.col2 * 69 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1656
-2622
-5451

query I rowsort
SELECT ALL 40 AS col1 FROM tab1 GROUP BY tab1.col2
----
40
40
40

query I rowsort
SELECT ALL 95 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor1.col2
----
95
95
95

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT 84 FROM tab0 GROUP BY tab0.col2
----
84
84
84

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5993
SELECT DISTINCT - CAST( NULL AS SIGNED ) col1 FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5993
SELECT DISTINCT - CAST ( NULL AS INTEGER ) col1 FROM tab0 GROUP BY tab0.col1
----
NULL

query I rowsort
SELECT ALL 8 * col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
464
632
696

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) - + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-126
-28
-85

query I rowsort
SELECT ALL + 99 FROM tab2 GROUP BY col0
----
99
99
99

query I rowsort
SELECT DISTINCT ( + tab1.col1 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT ( cor0.col2 ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 66 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
66

query I rowsort
SELECT DISTINCT + - 47 FROM tab2 GROUP BY tab2.col1
----
-47

query I rowsort
SELECT + - tab1.col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL tab2.col0 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT ALL - - tab0.col0 * tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab1 GROUP BY col1 HAVING NOT + col1 IS NOT NULL
----

query I rowsort
SELECT DISTINCT tab2.col1 FROM tab2 WHERE NOT col2 IN ( + col1 ) GROUP BY tab2.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-6006
SELECT ALL tab2.col1 DIV + 35 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6006
SELECT ALL tab2.col1 / + 35 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - - tab1.col2 - 98 AS col0 FROM tab1 GROUP BY tab1.col2
----
-27
-53
-90

query I rowsort
SELECT cor0.col2 + + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
102
115
14

query I rowsort
SELECT + ( 16 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
16
16

query I rowsort
SELECT + 27 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
27
27
27

query I rowsort
SELECT DISTINCT + - 2 + - tab2.col2 FROM tab2 GROUP BY col2
----
-60
-81
-89

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 63 col1 FROM tab0 GROUP BY col2
----
63

query I rowsort
SELECT 23 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
23
23
23

query I rowsort
SELECT 67 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
67
67
67

query I rowsort
SELECT - 60 FROM tab2 GROUP BY col1
----
-60
-60
-60

query I rowsort
SELECT ALL 60 FROM tab2 AS cor0 GROUP BY cor0.col0
----
60
60
60

onlyif mysql # DIV for integer division: 
query I rowsort label-6018
SELECT - + tab1.col2 DIV - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6018
SELECT - + tab1.col2 / - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT + ( - col0 ) FROM tab1 GROUP BY col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-6020
SELECT DISTINCT cor0.col0 DIV + 90 FROM tab2 cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-6020
SELECT DISTINCT cor0.col0 / + 90 FROM tab2 cor0 GROUP BY cor0.col0
----
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-6021
SELECT DISTINCT - 54 DIV + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-9
0

skipif mysql # not compatible
query I rowsort label-6021
SELECT DISTINCT - 54 / + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-9
0

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT ALL col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
22
28
82

query I rowsort
SELECT + 76 FROM tab0 cor0 GROUP BY cor0.col1
----
76
76

query I rowsort
SELECT DISTINCT - tab1.col2 * + 70 AS col0 FROM tab1 GROUP BY tab1.col2
----
-3150
-4970
-560

query I rowsort
SELECT cor0.col0 * - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

onlyif mysql # DIV for integer division: 
query I rowsort label-6027
SELECT DISTINCT cor0.col0 DIV col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-6027
SELECT DISTINCT cor0.col0 / col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT + col2 + 15 * 12 FROM tab1 AS cor0 GROUP BY cor0.col2
----
188
225
251

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6030
SELECT CAST( NULL AS SIGNED ) + 82 AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6030
SELECT CAST ( NULL AS INTEGER ) + 82 AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6031
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6031
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - ( 91 ) * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
7371

query I rowsort
SELECT - col2 FROM tab1 cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT ALL 87 FROM tab1 AS cor0 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT - cor1.col1 * cor1.col1 AS col0 FROM tab2 cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + 56 + - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
12
50

query I rowsort
SELECT ALL + - tab1.col2 + + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL ( + 57 ) AS col0 FROM tab2 cor0 GROUP BY col1
----
57
57
57

query I rowsort
SELECT DISTINCT + 74 AS col1 FROM tab0 GROUP BY tab0.col0
----
74

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6040
SELECT - - CAST( NULL AS DECIMAL ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6040
SELECT - - CAST ( NULL AS REAL ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 7 - + 92 FROM tab1 AS cor0 GROUP BY col2
----
-85
-85
-85

query I rowsort
SELECT cor0.col0 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
3772
5369
915

onlyif mysql # DIV for integer division: 
query I rowsort label-6043
SELECT - cor0.col1 DIV cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6043
SELECT - cor0.col1 / cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 34 col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 36 col0 FROM tab2 GROUP BY tab2.col2
----
-36
-36
-36

query I rowsort
SELECT ALL 48 + tab2.col0 * tab2.col0 FROM tab2 GROUP BY col0
----
273
8329
8512

query I rowsort
SELECT 30 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2730
2760
450

query I rowsort
SELECT ALL - 15 FROM tab2 AS cor0 GROUP BY col1
----
-15
-15
-15

query I rowsort
SELECT - col0 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-132
-1596
-3608

query I rowsort
SELECT ALL 94 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
94
94
94

query I rowsort
SELECT DISTINCT - 55 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-55

query I rowsort
SELECT + cor0.col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6053
SELECT ALL CAST( - 5 AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col2
----
-5
-5
-5

skipif mysql # not compatible
query I rowsort label-6053
SELECT ALL CAST ( - 5 AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col2
----
-5
-5
-5

query I rowsort
SELECT DISTINCT - - 57 AS col1 FROM tab0 GROUP BY tab0.col2
----
57

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6056
SELECT CAST( NULL AS DECIMAL ) + 76 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6056
SELECT CAST ( NULL AS REAL ) + 76 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 62 AS col1 FROM tab1 GROUP BY tab1.col1
----
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col0 * cor1.col0 col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0 HAVING NULL IS NULL
----
-484
-6724
-784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * cor0.col0 col1 FROM tab2 cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
225
8281
8464

query I rowsort
SELECT ALL + - 21 FROM tab0 GROUP BY tab0.col0
----
-21
-21
-21

query I rowsort
SELECT - 5 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-5
-5
-5

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + + 57 AS col0 FROM tab1 GROUP BY tab1.col1
----
57

query I rowsort
SELECT 28 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
28
28
28

query I rowsort
SELECT DISTINCT + cor0.col1 * + COALESCE ( col0, - cor0.col0 ) FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
0
3483

query I rowsort
SELECT DISTINCT tab2.col2 + 81 FROM tab2 GROUP BY tab2.col2
----
139
160
168

query I rowsort
SELECT ALL 97 + cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
121
135
176

query I rowsort
SELECT + ( col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 87 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
87

query I rowsort
SELECT ALL 1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT 49 * + 6 AS col2 FROM tab2 GROUP BY tab2.col0
----
294

query I rowsort
SELECT ALL - 41 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-41
-41
-41

query I rowsort
SELECT + 63 FROM tab0 AS cor0 GROUP BY cor0.col2
----
63
63
63

query I rowsort
SELECT 41 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-1845
-2911
-328

query I rowsort
SELECT ALL + 57 FROM tab0 AS cor0 GROUP BY cor0.col1
----
57
57

query I rowsort
SELECT DISTINCT 67 FROM tab0 AS cor0 GROUP BY cor0.col2
----
67

query I rowsort
SELECT ALL 91 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
91
91
91

query I rowsort
SELECT DISTINCT 29 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col0, cor0.col2
----
29

query I rowsort
SELECT ALL 50 + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
109
111
91

query I rowsort
SELECT ALL - 89 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1958
-2492
-7298

query I rowsort
SELECT - 18 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to 09afafec657a5e9f082beb6a16ec85de

query I rowsort
SELECT ALL - col2 + col2 FROM tab0 cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT + + 59 FROM tab2 GROUP BY tab2.col2
----
59
59
59

query I rowsort
SELECT - + 33 + 7 FROM tab0 GROUP BY tab0.col2
----
-26
-26
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 - + 65 col2 FROM tab1 GROUP BY tab1.col0
----
-37
-43
17

query I rowsort
SELECT - 29 FROM tab1 cor0 GROUP BY cor0.col0
----
-29
-29
-29

query I rowsort
SELECT + - tab2.col1 - + 28 AS col1 FROM tab2 GROUP BY tab2.col1
----
-69
-87
-89

query I rowsort
SELECT + cor0.col2 + - 40 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-16
-2
39

query I rowsort
SELECT ALL - COALESCE ( 1, cor0.col1 ) * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT + 13 + + tab1.col1 * - tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
-1923
-23
-3236

query I rowsort
SELECT + 0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT + cor0.col1 * - cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1640
-3422
-3660

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ALL col1 * cor0.col1 + + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6642

query I rowsort
SELECT ALL + + 74 + + tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
155
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 87 col0 FROM tab2 GROUP BY tab2.col1
----
87
87
87

query I rowsort
SELECT 4 AS col2 FROM tab1 GROUP BY tab1.col1
----
4
4
4

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6098
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6098
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * - 21 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1911
-1932
-315

query I rowsort
SELECT cor0.col0 * cor0.col0 + - 29 FROM tab2 AS cor0 GROUP BY cor0.col0
----
196
8252
8435

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + + cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT ALL cor0.col1 + - col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
0

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT DISTINCT 76 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
76

query I rowsort
SELECT DISTINCT + 96 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
96

query I rowsort
SELECT - 31 FROM tab2 GROUP BY col0
----
-31
-31
-31

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( 63, cor0.col2 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-63

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6108
SELECT - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6108
SELECT - CAST ( NULL AS REAL ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 32 FROM tab2 cor0 GROUP BY cor0.col1
----
-32

query I rowsort
SELECT - tab1.col0 * 57 FROM tab1 GROUP BY col0
----
-1254
-1596
-4674

query I rowsort
SELECT - + 75 + - 65 FROM tab2 GROUP BY col2
----
-140
-140
-140

query I rowsort
SELECT - 37 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1406
-2923
-888

query I rowsort
SELECT 48 * 22 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1056
1056
1056

query I rowsort
SELECT + 60 FROM tab1 GROUP BY col2
----
60
60
60

query I rowsort
SELECT DISTINCT + NULLIF ( 2, tab2.col0 ) AS col0 FROM tab2 GROUP BY col0
----
2

query I rowsort
SELECT + 5 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
5
5
5

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col0 * + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1260
176
5822

query I rowsort
SELECT - 94 FROM tab0 cor0 GROUP BY cor0.col1
----
-94
-94

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6120
SELECT CAST( + 0 AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6120
SELECT CAST ( + 0 AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL + - 57 FROM tab1 GROUP BY tab1.col1
----
-57
-57
-57

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2 HAVING NULL IS NULL
----
58
79
87

query I rowsort
SELECT ALL tab1.col0 * col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

onlyif mysql # DIV for integer division: 
query I rowsort label-6124
SELECT ALL tab1.col1 DIV - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6124
SELECT ALL tab1.col1 / - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT - + 90 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-90
-90
-90

onlyif mysql # DIV for integer division: 
query I rowsort label-6126
SELECT DISTINCT - 2 DIV + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-6126
SELECT DISTINCT - 2 / + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT ALL + col0 * - tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-6129
SELECT + cor0.col1 - cor0.col1 DIV - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
45
58
7

skipif mysql # not compatible
query I rowsort label-6129
SELECT + cor0.col1 - cor0.col1 / - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
45
58
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 + - 59 col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor1.col0
----
-59
22

query I rowsort
SELECT 11 FROM tab2 AS cor0 GROUP BY cor0.col1
----
11
11
11

query I rowsort
SELECT DISTINCT + 40 * - 76 + col2 FROM tab0 GROUP BY tab0.col2
----
-2961
-3002
-3016

query I rowsort
SELECT DISTINCT - 76 FROM tab0 GROUP BY tab0.col1
----
-76

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT 96 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
96
96
96

query I rowsort
SELECT DISTINCT - + tab1.col2 * + 26 FROM tab1 GROUP BY tab1.col2
----
-1170
-1846
-208

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + tab0.col2 col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 30 FROM tab0 GROUP BY tab0.col1
----
-30

query I rowsort
SELECT 69 FROM tab2 AS cor0 GROUP BY col1
----
69
69
69

query I rowsort
SELECT + 87 FROM tab2 GROUP BY tab2.col1
----
87
87
87

query I rowsort
SELECT ALL - 31 FROM tab2 cor0 GROUP BY cor0.col0
----
-31
-31
-31

query I rowsort
SELECT - 10 FROM tab2 AS cor0 GROUP BY col2
----
-10
-10
-10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NULL < NULL
----

query I rowsort
SELECT DISTINCT - 43 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2494
-3397
-3741

query I rowsort
SELECT - tab1.col1 + + 15 AS col0 FROM tab1 GROUP BY tab1.col1
----
-29
-42
9

query I rowsort
SELECT + 49 * + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
2156
2793
294

query I rowsort
SELECT ALL - ( - tab0.col2 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 + tab1.col1 * tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
1980
3306
42

query I rowsort
SELECT + cor0.col2 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
1305
5336
7189

query I rowsort
SELECT - ( cor0.col2 ) - col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-138
-148
-99

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
22
28
82

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 + - 98 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1695
17199
17480

query I rowsort
SELECT 60 FROM tab1 AS cor0 GROUP BY col2
----
60
60
60

query I rowsort
SELECT + - col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT + - tab0.col0 + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT DISTINCT + tab0.col2 * 46 FROM tab0 GROUP BY tab0.col2
----
1104
1748
3634

query I rowsort
SELECT DISTINCT - 85 FROM tab2 GROUP BY col0
----
-85

query I rowsort
SELECT - col1 * 18 + 28 FROM tab0 GROUP BY tab0.col1
----
-1430
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1260
176
5822

query I rowsort
SELECT ALL - - 78 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
169
170
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( + 6 ) col2 FROM tab0 GROUP BY tab0.col1
----
-6
-6

query I rowsort
SELECT + 66 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, col1
----
66
66
66

query I rowsort
SELECT - 86 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-86
-86
-86

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6164
SELECT ALL + CAST( NULL AS DECIMAL ) / tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6164
SELECT ALL + CAST ( NULL AS REAL ) / tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 36 AS col2 FROM tab2 GROUP BY tab2.col0
----
-36

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT 4 AS col2 FROM tab0 GROUP BY tab0.col2
----
4
4
4

query I rowsort
SELECT - 73 FROM tab0 GROUP BY tab0.col2
----
-73
-73
-73

query I rowsort
SELECT ALL - + 9 * 53 AS col2 FROM tab0 GROUP BY tab0.col1
----
-477
-477

onlyif mysql # DIV for integer division: 
query I rowsort label-6170
SELECT ALL + tab0.col2 + 12 DIV 41 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

skipif mysql # not compatible
query I rowsort label-6170
SELECT ALL + tab0.col2 + 12 / 41 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL + + tab2.col1 + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL + 55 * 91 FROM tab1 GROUP BY tab1.col2
----
5005
5005
5005

query I rowsort
SELECT cor1.col1 * + ( 10 ) AS col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
410
590
610

query I rowsort
SELECT DISTINCT + + tab1.col1 * + 85 FROM tab1 GROUP BY tab1.col1
----
3740
4845
510

query I rowsort
SELECT DISTINCT - tab2.col0 * 13 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1183
-1196
-195

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 * 23 col2 FROM tab2 GROUP BY tab2.col1
----
1357
1403
943

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT cor0.col2 - COALESCE ( 32, - col1 * + cor0.col0, 92 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-24
13
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * + 9 + 98 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
332
485
845

query I rowsort
SELECT DISTINCT 56 FROM tab1 cor0 GROUP BY cor0.col2
----
56

query I rowsort
SELECT col0 * 43 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
1118
1849
3569

query I rowsort
SELECT + tab1.col0 * + 77 AS col0 FROM tab1 GROUP BY tab1.col0
----
1694
2156
6314

query I rowsort
SELECT DISTINCT + 31 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1271
-1829
-1891

query I rowsort
SELECT DISTINCT - 47 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-47

query I rowsort
SELECT + 65 * - 55 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3575
-3575

query I rowsort
SELECT DISTINCT ( - 29 ) FROM tab2 cor0 GROUP BY cor0.col1
----
-29

query I rowsort
SELECT + + tab2.col0 * tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NULL IN ( cor0.col0 )
----

query I rowsort
SELECT - cor0.col1 * - 97 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
3977
5723
5917

onlyif mysql # DIV for integer division: 
query I rowsort label-6189
SELECT + cor0.col2 DIV + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6189
SELECT + cor0.col2 / + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - 45 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-45

query I rowsort
SELECT ALL + ( cor0.col0 ) * + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
0
3483

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6192
SELECT DISTINCT - tab2.col0 * - CAST( NULL AS SIGNED ) + + 92 AS col0 FROM tab2 GROUP BY tab2.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6192
SELECT DISTINCT - tab2.col0 * - CAST ( NULL AS INTEGER ) + + 92 AS col0 FROM tab2 GROUP BY tab2.col0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 43 * tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
-2494
-3397
-3741

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + cor0.col2 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 - - cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT + 19 FROM tab0 AS cor0 GROUP BY cor0.col1
----
19
19

query I rowsort
SELECT DISTINCT cor0.col2 * 2 + 75 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
191
233
249

query I rowsort
SELECT ALL + 49 * - tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
-1078
-1372
-4018

query I rowsort
SELECT + + 2 + tab2.col0 FROM tab2 GROUP BY col0
----
17
93
94

query I rowsort
SELECT - - 65 AS col0 FROM tab0 GROUP BY col2
----
65
65
65

query I rowsort
SELECT ALL - 72 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-72
-72
-72

onlyif mysql # DIV for integer division: 
query I rowsort label-6202
SELECT 80 DIV cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
1
1
13

skipif mysql # not compatible
query I rowsort label-6202
SELECT 80 / cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
1
1
13

query I rowsort
SELECT DISTINCT - - 27 AS col0 FROM tab1 GROUP BY col1
----
27

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6204
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6204
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 50 + tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
108
129
137

query I rowsort
SELECT DISTINCT - tab1.col2 * + col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT 14 * - cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1162
-364
-602

query I rowsort
SELECT 42 FROM tab1 GROUP BY col0
----
42
42
42

query I rowsort
SELECT ALL - + 83 AS col1 FROM tab1 GROUP BY col0
----
-83
-83
-83

query I rowsort
SELECT DISTINCT tab1.col1 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1 HAVING col1 IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT COALESCE ( - 78, col2, - cor0.col1 + + cor0.col1 * cor0.col0 ) col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-78
-78
-78

query I rowsort
SELECT DISTINCT 99 * + 70 + tab2.col2 * 16 FROM tab2 GROUP BY col2
----
7858
8194
8322

query I rowsort
SELECT ( cor0.col1 ) * cor0.col1 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1980
3306
42

query I rowsort
SELECT DISTINCT 92 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
136
149
98

query I rowsort
SELECT - col2 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT + 81 AS col1 FROM tab2 GROUP BY tab2.col2
----
81
81
81

query I rowsort
SELECT ALL 74 FROM tab2 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT 22 * + 93 FROM tab2 GROUP BY tab2.col1
----
2046
2046
2046

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - NULLIF ( 13, tab2.col1 * + 14 ) col2 FROM tab2 GROUP BY tab2.col1
----
-13
-13
-13

query I rowsort
SELECT + cor0.col0 * - cor0.col2 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col1, col2, cor0.col0
----
-1218
-5278
-7110

query I rowsort
SELECT - 83 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
-83
-83
-83

query I rowsort
SELECT - cor0.col2 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT + 7 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT - cor0.col0 + - 60 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-151
-152
-75

query I rowsort
SELECT ALL + 16 FROM tab2 AS cor0 GROUP BY cor0.col0
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 75 col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
75
75
75

query I rowsort
SELECT ALL - 55 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-55
-55
-55

query I rowsort
SELECT - + cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - - 72 FROM tab1 GROUP BY tab1.col2
----
72

query I rowsort
SELECT + 37 * + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1517
2183
2257

query I rowsort
SELECT + COALESCE ( + 51, tab2.col1, + 53, - col1 ) + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
110
112
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6233
SELECT DISTINCT CAST( NULL AS SIGNED ) / 41 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6233
SELECT DISTINCT CAST ( NULL AS INTEGER ) / 41 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT 81 FROM tab2 AS cor0 GROUP BY col0, col0
----
81

onlyif mysql # DIV for integer division: 
query I rowsort label-6235
SELECT + tab1.col2 DIV + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6235
SELECT + tab1.col2 / + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT DISTINCT - + 6 FROM tab1 GROUP BY col2
----
-6

query I rowsort
SELECT DISTINCT - ( 93 ) AS col1 FROM tab0 GROUP BY col0
----
-93

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6238
SELECT ALL - CAST( NULL AS SIGNED ) * + 29 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6238
SELECT ALL - CAST ( NULL AS INTEGER ) * + 29 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 41 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3321
0

query I rowsort
SELECT DISTINCT + 11 AS col1 FROM tab1 cor0 GROUP BY col2
----
11

query I rowsort
SELECT ALL col1 + - 30 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-24
14
27

query I rowsort
SELECT - cor0.col2 * - cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT ALL - 75 AS col0 FROM tab1 GROUP BY tab1.col2
----
-75
-75
-75

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor1.col2
----
44
57
6

query I rowsort
SELECT - + 23 FROM tab0 GROUP BY col1
----
-23
-23

query I rowsort
SELECT ALL - cor0.col2 * + 57 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
-1368
-2166
-4503

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT - + tab2.col2 + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT DISTINCT + tab0.col1 + 58 AS col1 FROM tab0 GROUP BY tab0.col1
----
139
58

query I rowsort
SELECT col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT + tab1.col0 * tab1.col0 FROM tab1 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT 20 + - 68 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-48
-48
-48

query I rowsort
SELECT ALL 17 + + 56 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
73
73
73

query I rowsort
SELECT DISTINCT 98 * cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
4312
5586
588

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + - 52 FROM tab2 GROUP BY tab2.col1
----
-52

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6257
SELECT DISTINCT + CAST( NULL AS SIGNED ) + - 35 AS col1 FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6257
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + - 35 AS col1 FROM tab0 GROUP BY tab0.col0
----
NULL

query I rowsort
SELECT ALL - 1 + + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
14
90
91

query I rowsort
SELECT ALL cor0.col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT ALL 99 AS col2 FROM tab0 GROUP BY col0
----
99
99
99

query I rowsort
SELECT DISTINCT + 19 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
19

query I rowsort
SELECT DISTINCT 64 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
2816
3648
384

query I rowsort
SELECT DISTINCT - - col2 * + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT tab1.col0 * - 70 FROM tab1 GROUP BY tab1.col0
----
-1540
-1960
-5740

query I rowsort
SELECT DISTINCT - 20 FROM tab2 AS cor0 GROUP BY col2
----
-20

query I rowsort
SELECT 51 - - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
109
130
138

query I rowsort
SELECT + - tab2.col0 + - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT ALL tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT col0 IN ( tab1.col0 )
----

query I rowsort
SELECT ALL tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NOT NULL
----
22
28
82

query I rowsort
SELECT DISTINCT - 60 FROM tab0 AS cor0 GROUP BY col0
----
-60

query I rowsort
SELECT ALL + 22 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
22
22

query I rowsort
SELECT + 43 FROM tab0 cor0 GROUP BY cor0.col2
----
43
43
43

query I rowsort
SELECT 56 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 13 col1 FROM tab0 GROUP BY tab0.col0
----
13

query I rowsort
SELECT - 98 * 80 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-7840
-7840
-7840

query I rowsort
SELECT cor0.col1 * 61 FROM tab0 cor0 GROUP BY cor0.col1
----
0
4941

query I rowsort
SELECT - - tab2.col1 * - tab2.col1 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT + 88 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
88
88
88

query I rowsort
SELECT col2 * + 26 FROM tab0 GROUP BY tab0.col2
----
2054
624
988

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + tab2.col0 * + col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT tab0.col2 AS col0 FROM tab0 GROUP BY col2 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT tab0.col0 + + tab0.col0 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1806
-650
-6806

query I rowsort
SELECT - col1 - 4 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
132
171
18

query I rowsort
SELECT + 72 AS col2 FROM tab2 GROUP BY tab2.col1
----
72
72
72

query I rowsort
SELECT ALL - 1 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT - 45 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-45
-45

query I rowsort
SELECT + + tab0.col0 + col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT + 89 FROM tab0 AS cor0 GROUP BY cor0.col1
----
89

query I rowsort
SELECT + + 80 AS col2 FROM tab1 GROUP BY tab1.col0
----
80
80
80

query I rowsort
SELECT + 62 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
62
62
62

query I rowsort
SELECT DISTINCT 74 FROM tab1 cor0 GROUP BY cor0.col2
----
74

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IN ( cor0.col0 )
----

query I rowsort
SELECT ALL - tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING ( - col2 ) IS NOT NULL
----
0
0
0

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT DISTINCT ( cor0.col0 ) + + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT ALL + 78 AS col1 FROM tab1 GROUP BY tab1.col0
----
78
78
78

query I rowsort
SELECT + 48 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
48
48
48

query I rowsort
SELECT ALL 62 FROM tab1 GROUP BY tab1.col0
----
62
62
62

query I rowsort
SELECT DISTINCT col2 * 79 AS col1 FROM tab0 GROUP BY tab0.col2
----
1896
3002
6241

query I rowsort
SELECT + + col0 * 87 FROM tab1 GROUP BY col0
----
1914
2436
7134

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 3 col1 FROM tab1 GROUP BY tab1.col1
----
3
3
3

query I rowsort
SELECT DISTINCT + COALESCE ( tab2.col1, - tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + cor0.col2 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT ALL cor0.col1 * 15 FROM tab2 AS cor0 GROUP BY cor0.col1
----
615
885
915

query I rowsort
SELECT ALL ( - tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL ( 36 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
36
36

query I rowsort
SELECT ALL + cor0.col2 + - 33 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
25
46
54

onlyif mysql # DIV for integer division: 
query I rowsort label-6310
SELECT ALL + 83 DIV - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-6310
SELECT ALL + 83 / - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
-2
-3

query I rowsort
SELECT + tab0.col1 - + tab0.col1 FROM tab0 GROUP BY col1
----
0
0

query I rowsort
SELECT ALL + - 79 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-79
2

query I rowsort
SELECT + + 51 AS col1 FROM tab0 GROUP BY tab0.col2
----
51
51
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6315
SELECT ALL - - CAST( NULL AS SIGNED ) FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6315
SELECT ALL - - CAST ( NULL AS INTEGER ) FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 44 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
115
52
89

query I rowsort
SELECT + 81 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
81
81
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6318
SELECT DISTINCT CAST( NULL AS SIGNED ) * + 61 AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-6318
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + 61 AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 70 col0 FROM tab1 GROUP BY tab1.col0
----
70
70
70

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
45
71
8

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 1 col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
1
1
1

query I rowsort
SELECT 90 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
90
90
90

query I rowsort
SELECT ALL + 60 + tab1.col1 * tab1.col1 FROM tab1 GROUP BY col1
----
1996
3309
96

onlyif mysql # DIV for integer division: 
query I rowsort label-6325
SELECT DISTINCT 82 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5
0

skipif mysql # not compatible
query I rowsort label-6325
SELECT DISTINCT 82 / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5
0

query I rowsort
SELECT 50 FROM tab2 GROUP BY col0
----
50
50
50

query I rowsort
SELECT + 57 FROM tab2 AS cor0 GROUP BY cor0.col1
----
57
57
57

query I rowsort
SELECT + - tab2.col2 + - col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT ALL + 49 FROM tab0 GROUP BY tab0.col2
----
49
49
49

query I rowsort
SELECT DISTINCT 53 AS col2 FROM tab1 GROUP BY col0
----
53

query I rowsort
SELECT DISTINCT - col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT 46 FROM tab0 AS cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT ALL - - ( 74 ) FROM tab2 GROUP BY tab2.col0
----
74
74
74

query I rowsort
SELECT - 84 FROM tab2 GROUP BY tab2.col0
----
-84
-84
-84

query I rowsort
SELECT ALL + 59 FROM tab0 GROUP BY tab0.col0
----
59
59
59

query I rowsort
SELECT cor0.col0 + - 83 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-40
-57
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + cor0.col0 * + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1892
6972
702

query I rowsort
SELECT + + tab0.col1 + ( 3 ) * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
324

query I rowsort
SELECT + - tab2.col1 + 87 FROM tab2 GROUP BY tab2.col1
----
26
28
46

onlyif mysql # DIV for integer division: 
query I rowsort label-6341
SELECT col0 DIV 11 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2
2
7

skipif mysql # not compatible
query I rowsort label-6341
SELECT col0 / 11 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2
2
7

query I rowsort
SELECT ALL ( + cor0.col0 ) FROM tab2 AS cor0 GROUP BY col2, cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + 74 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
74
74
74

query I rowsort
SELECT ALL - - 52 FROM tab1 GROUP BY tab1.col2
----
52
52
52

query I rowsort
SELECT DISTINCT + - 55 FROM tab0 GROUP BY tab0.col2
----
-55

query I rowsort
SELECT 28 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-1148
-1652
-1708

query I rowsort
SELECT tab2.col0 AS col1 FROM tab2 WHERE NOT NULL > ( - tab2.col2 ) GROUP BY tab2.col0
----

query I rowsort
SELECT DISTINCT col0 * + 12 AS col0 FROM tab1 GROUP BY tab1.col0
----
264
336
984

query I rowsort
SELECT DISTINCT + 26 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
26

query I rowsort
SELECT ALL - 35 + 98 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT ALL 28 - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-53
28

query I rowsort
SELECT DISTINCT cor1.col1 * cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL > NULL
----

query I rowsort
SELECT ALL + 15 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
15
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
44
57
6

query I rowsort
SELECT DISTINCT - 99 AS col0 FROM tab0 GROUP BY tab0.col2
----
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 87 col2 FROM tab2 GROUP BY tab2.col2
----
-87

query I rowsort
SELECT + cor0.col0 + 95 FROM tab0 AS cor0 GROUP BY cor0.col0
----
121
138
178

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 28 + - cor0.col0 col2 FROM tab2 AS cor0 GROUP BY col0
----
-63
-64
13

onlyif mysql # DIV for integer division: 
query I rowsort label-6361
SELECT ALL cor0.col0 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6361
SELECT ALL cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 98 col2 FROM tab1 cor0 GROUP BY cor0.col2
----
98

query I rowsort
SELECT DISTINCT - 59 + tab1.col1 * + tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
-23
1877
3190

query I rowsort
SELECT 99 FROM tab2 cor0 GROUP BY col2
----
99
99
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 91 col1 FROM tab0 AS cor0 GROUP BY col1
----
91

query I rowsort
SELECT - - tab2.col0 + - 67 FROM tab2 GROUP BY col0
----
-52
24
25

query I rowsort
SELECT 58 FROM tab1 AS cor0 GROUP BY col2
----
58
58
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col1 FROM tab2 cor0 GROUP BY cor0.col2 HAVING ( NULL ) IS NULL
----
-58
-79
-87

query I rowsort
SELECT - 81 AS col1 FROM tab0 cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
-81
-81

query I rowsort
SELECT 8 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
8
8
8

onlyif mysql # DIV for integer division: 
query I rowsort label-6371
SELECT cor0.col0 DIV 61 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6371
SELECT cor0.col0 / 61 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
1

query I rowsort
SELECT ALL ( 1 ) FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
1
1
1

query I rowsort
SELECT + 64 FROM tab0 GROUP BY tab0.col1
----
64
64

query I rowsort
SELECT + 71 AS col1 FROM tab0 GROUP BY tab0.col1
----
71
71

onlyif mysql # DIV for integer division: 
query I rowsort label-6375
SELECT ALL - 50 DIV + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-6
0

skipif mysql # not compatible
query I rowsort label-6375
SELECT ALL - 50 / + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-6
0

query I rowsort
SELECT 17 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
17
17
17

query I rowsort
SELECT DISTINCT + 86 AS col0 FROM tab0 GROUP BY tab0.col1
----
86

query I rowsort
SELECT - 60 - tab1.col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-544
-6784
-844

query I rowsort
SELECT + 11 FROM tab2 GROUP BY tab2.col0
----
11
11
11

query I rowsort
SELECT ALL + 87 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
87
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab2.col2 + col2 col1 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT DISTINCT 66 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
66

query I rowsort
SELECT ALL 53 FROM tab1 AS cor0 GROUP BY cor0.col0
----
53
53
53

query I rowsort
SELECT COALESCE ( - 77, - 37 ) FROM tab2 AS cor0 GROUP BY col2
----
-77
-77
-77

query I rowsort
SELECT ALL 24 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
1392
1896
2088

query I rowsort
SELECT - col0 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-3483
0
0

query I rowsort
SELECT cor0.col2 + cor0.col2 * 3 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
232
316
348

query I rowsort
SELECT DISTINCT - 68 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-68

query I rowsort
SELECT + 85 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
85
85
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 84 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
84

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL COALESCE ( + 18, - cor0.col0 ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
18
18
18

query I rowsort
SELECT 2 * - 22 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-44
-44

query I rowsort
SELECT DISTINCT - 26 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-26

query I rowsort
SELECT + 39 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1755
2769
312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + 2 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
46
59
8

query I rowsort
SELECT - col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT - + 92 FROM tab2 GROUP BY col0
----
-92
-92
-92

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, col0
----
22
28
82

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6400
SELECT + - CAST( NULL AS DECIMAL ) * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6400
SELECT + - CAST ( NULL AS REAL ) * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + + 9 FROM tab0 GROUP BY tab0.col2
----
9
9
9

query I rowsort
SELECT + 47 * - col2 FROM tab2 GROUP BY tab2.col2
----
-2726
-3713
-4089

query I rowsort
SELECT DISTINCT - ( - cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT 75 * COALESCE ( 69, - cor0.col2 * cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY col0
----
5175
5175
5175

query I rowsort
SELECT + 43 FROM tab1 AS cor0 GROUP BY col0
----
43
43
43

onlyif mysql # DIV for integer division: 
query I rowsort label-6406
SELECT DISTINCT - cor0.col0 DIV + 60 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0

skipif mysql # not compatible
query I rowsort label-6406
SELECT DISTINCT - cor0.col0 / + 60 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0

query I rowsort
SELECT col2 - + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 91 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT ALL + cor0.col1 - - 15 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col1
----
56
74
76

query I rowsort
SELECT DISTINCT - 0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT - ( + 25 ) * - col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1075
2075
650

query I rowsort
SELECT - 2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-2
-2
-2

query I rowsort
SELECT - cor0.col2 - 97 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-4410
-6958
-784

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6414
SELECT DISTINCT - cor0.col1 / + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6414
SELECT DISTINCT - cor0.col1 / + CAST ( NULL AS REAL ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
NULL

query I rowsort
SELECT ALL + + 13 AS col0 FROM tab1 GROUP BY col2
----
13
13
13

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, col1
----
24
38
79

query I rowsort
SELECT + 78 AS col1 FROM tab0 GROUP BY tab0.col0
----
78
78
78

query I rowsort
SELECT 39 + - 70 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-31
-31
-31

query I rowsort
SELECT ALL + cor0.col1 + - 23 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-17
21
34

query I rowsort
SELECT ALL 45 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
45
45

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT + 60 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
2460
3540
3660

onlyif mysql # DIV for integer division: 
query I rowsort label-6423
SELECT 41 DIV cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1, cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6423
SELECT 41 / cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1, cor0.col1
----
0
0
1

query I rowsort
SELECT DISTINCT cor0.col0 * + 99 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
2178
2772
8118

query I rowsort
SELECT DISTINCT - + tab0.col1 * - 71 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
5832

query I rowsort
SELECT ALL 9 FROM tab0 AS cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT ALL cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 86 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
86
86
86

query I rowsort
SELECT + 23 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
105
45
51

query I rowsort
SELECT - - tab2.col2 * - 89 AS col1 FROM tab2 GROUP BY tab2.col2
----
-5162
-7031
-7743

query I rowsort
SELECT ALL + col1 * col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL cor0.col2 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-57
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + + col2 * - 56 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2492
-3894
-426

query I rowsort
SELECT ALL - 77 FROM tab1 GROUP BY tab1.col0
----
-77
-77
-77

query I rowsort
SELECT cor0.col0 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 + tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT DISTINCT - tab1.col1 * 94 AS col1 FROM tab1 GROUP BY tab1.col1
----
-4136
-5358
-564

query I rowsort
SELECT tab1.col0 FROM tab1, tab1 cor0 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL - - 9 AS col1 FROM tab1 GROUP BY tab1.col0
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 9 * tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
135
819
828

query I rowsort
SELECT ALL - COALESCE ( - cor0.col2, - cor0.col2 ) FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 52 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
4212

query I rowsort
SELECT DISTINCT cor1.col2 - - cor1.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1, cor1.col2
----
142
16
90

query I rowsort
SELECT DISTINCT + cor0.col0 * 54 + - 13 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1175
1499
4415

query I rowsort
SELECT + - 22 FROM tab2 GROUP BY tab2.col0
----
-22
-22
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 33 col0 FROM tab0 AS cor0 GROUP BY col2
----
33
33
33

query I rowsort
SELECT DISTINCT + 25 - + 49 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-24

onlyif mysql # DIV for integer division: 
query I rowsort label-6448
SELECT + 40 DIV - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-6448
SELECT + 40 / - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
0

query I rowsort
SELECT - 53 AS col2 FROM tab2 GROUP BY tab2.col1
----
-53
-53
-53

query I rowsort
SELECT DISTINCT + + tab1.col0 * - 38 FROM tab1 GROUP BY tab1.col0
----
-1064
-3116
-836

query I rowsort
SELECT 76 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
76
76
76

query I rowsort
SELECT ALL 75 FROM tab2 AS cor0 GROUP BY cor0.col2
----
75
75
75

query I rowsort
SELECT - col0 * + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT - 94 AS col1 FROM tab1 GROUP BY tab1.col0
----
-94
-94
-94

query I rowsort
SELECT 12 FROM tab1 GROUP BY tab1.col0
----
12
12
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT tab1.col2 * tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT + 55 FROM tab1 GROUP BY tab1.col0
----
55
55
55

query I rowsort
SELECT DISTINCT + 15 AS col1 FROM tab2 GROUP BY tab2.col1
----
15

query I rowsort
SELECT DISTINCT + tab2.col1 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT 81 + 15 FROM tab2 AS cor0 GROUP BY cor0.col2
----
96
96
96

query I rowsort
SELECT DISTINCT 39 FROM tab1 cor0 GROUP BY col0
----
39

query I rowsort
SELECT ALL + - 16 FROM tab0 GROUP BY tab0.col0
----
-16
-16
-16

query I rowsort
SELECT ALL 11 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
11
11
11

query I rowsort
SELECT - cor0.col2 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1032
-2054
-3154

query I rowsort
SELECT ALL 86 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0
----
86
86
86

query I rowsort
SELECT DISTINCT + + 2 FROM tab2 GROUP BY tab2.col0
----
2

query I rowsort
SELECT + 62 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
107
133
70

query I rowsort
SELECT ALL 64 - - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
155
156
79

query I rowsort
SELECT DISTINCT - 72 * cor0.col0 - + 86 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-13114
-4108
-6794

query I rowsort
SELECT 75 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
75
75
75

query I rowsort
SELECT 26 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
26
26
26

query I rowsort
SELECT DISTINCT - - 89 FROM tab0 GROUP BY tab0.col2
----
89

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6474
SELECT CAST( + 77 AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col0
----
77
77
77

skipif mysql # not compatible
query I rowsort label-6474
SELECT CAST ( + 77 AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT DISTINCT cor0.col2 * + 79 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
3555
5609
632

query I rowsort
SELECT ALL - col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT cor0.col2 + + cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
102
150
170

query I rowsort
SELECT 2 AS col1 FROM tab2 GROUP BY tab2.col1
----
2
2
2

query I rowsort
SELECT DISTINCT - + 75 AS col2 FROM tab2 GROUP BY col1
----
-75

query I rowsort
SELECT ALL 13 * + 43 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
559
559
559

query I rowsort
SELECT ALL 34 FROM tab2 GROUP BY col0
----
34
34
34

query I rowsort
SELECT - cor0.col1 * cor0.col1 AS col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT ALL cor0.col2 + 30 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
101
38
75

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - - tab0.col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT + + 9 AS col2 FROM tab0 GROUP BY tab0.col2
----
9

query I rowsort
SELECT DISTINCT + col0 * - 58 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1508
-2494
-4814

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT - 85 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
-85
-85

query I rowsort
SELECT 43 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
43
43
43

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6491
SELECT - CAST( NULL AS SIGNED ) col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6491
SELECT - CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 col1 FROM tab0 GROUP BY col2
----
21
21
21

query I rowsort
SELECT ALL 23 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
23
23
23

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6494
SELECT - CAST( NULL AS DECIMAL ) AS col0 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6494
SELECT - CAST ( NULL AS REAL ) AS col0 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-6495
SELECT + cor0.col1 DIV + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6495
SELECT + cor0.col1 / + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( - 46, cor0.col0, col0 ) FROM tab2 AS cor0 GROUP BY col2
----
46

query I rowsort
SELECT DISTINCT 12 AS col1 FROM tab0 GROUP BY tab0.col1
----
12

onlyif mysql # DIV for integer division: 
query I rowsort label-6498
SELECT cor0.col2 + + ( - cor0.col2 ) DIV cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
57
78
86

skipif mysql # not compatible
query I rowsort label-6498
SELECT cor0.col2 + + ( - cor0.col2 ) / cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
57
78
86

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col2, cor0.col2 ) * - cor0.col0 AS col2 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
NULL

query I rowsort
SELECT - 31 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-31
-31
-31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - col0 + 11 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1838
-665
-6878

query I rowsort
SELECT - 26 FROM tab2 GROUP BY tab2.col1
----
-26
-26
-26

query I rowsort
SELECT ALL 42 FROM tab1 AS cor0 GROUP BY col0
----
42
42
42

query I rowsort
SELECT + tab0.col0 - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0 HAVING NOT ( NULL ) IS NOT NULL
----
0
0
0

query I rowsort
SELECT - tab0.col0 * - tab0.col0 FROM tab0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT - 49 FROM tab0 AS cor0 GROUP BY col0
----
-49
-49
-49

query I rowsort
SELECT ALL cor0.col1 * - 43 - 85 FROM tab0 cor0 GROUP BY cor0.col1
----
-3568
-85

query I rowsort
SELECT - cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2, col1
----
22
28
82

query I rowsort
SELECT - tab2.col1 + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + 9 FROM tab2 AS cor0 GROUP BY cor0.col0
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT 96 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
96
96
96

query I rowsort
SELECT - cor1.col2 - 10 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col2, cor0.col2
----
9 values hashing to 82a37b576dc8a7a511d3f07bca1d282b

query I rowsort
SELECT ALL + tab0.col0 - - 29 AS col1 FROM tab0 GROUP BY tab0.col0
----
112
55
72

query I rowsort
SELECT DISTINCT col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
58
79
87

query I rowsort
SELECT DISTINCT - 19 FROM tab0 GROUP BY tab0.col1
----
-19

query I rowsort
SELECT - 95 FROM tab2 GROUP BY tab2.col2
----
-95
-95
-95

query I rowsort
SELECT cor0.col0 - cor0.col0 * 16 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-1365
-1380
-225

query I rowsort
SELECT + tab0.col0 + + ( 2 ) FROM tab0 GROUP BY tab0.col0
----
28
45
85

query I rowsort
SELECT DISTINCT 23 FROM tab2 GROUP BY tab2.col0
----
23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6524
SELECT ALL - COALESCE ( - tab0.col0, + CAST( NULL AS SIGNED ) ) - - col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

skipif mysql # not compatible
query I rowsort label-6524
SELECT ALL - COALESCE ( - tab0.col0, + CAST ( NULL AS INTEGER ) ) - - col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT + 30 FROM tab0 GROUP BY col1
----
30
30

query I rowsort
SELECT - 61 AS col2 FROM tab1 GROUP BY col0
----
-61
-61
-61

query I rowsort
SELECT ALL 16 FROM tab0 cor0 GROUP BY cor0.col0
----
16
16
16

query I rowsort
SELECT ALL 90 FROM tab1 cor0 GROUP BY cor0.col1
----
90
90
90

query I rowsort
SELECT col0 * + ( cor0.col0 ) FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT cor0.col1 * 75 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
3075
4425
4575

query I rowsort
SELECT ALL tab1.col1 * 34 FROM tab1 GROUP BY tab1.col1
----
1496
1938
204

query I rowsort
SELECT - 51 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-51
-51
-51

query I rowsort
SELECT DISTINCT - + 29 AS col1 FROM tab2 GROUP BY tab2.col1
----
-29

query I rowsort
SELECT ALL - 47 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-47
-47
-47

query I rowsort
SELECT cor0.col0 - + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT cor0.col0 * - cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-462
-6642
-756

query I rowsort
SELECT DISTINCT - 83 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-83

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab1 cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + 62 * col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1612
2666
5146

onlyif mysql # DIV for integer division: 
query I rowsort label-6540
SELECT cor0.col2 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6540
SELECT cor0.col2 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 71 col1 FROM tab2 GROUP BY tab2.col0
----
71
71
71

query I rowsort
SELECT COALESCE ( cor0.col2, - cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * - cor0.col2 + 69 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3295
-6172
-7500

query I rowsort
SELECT 39 AS col0 FROM tab0 GROUP BY tab0.col0
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( tab1.col0 ) col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL 41 FROM tab1 AS cor0 GROUP BY col2
----
41
41
41

query I rowsort
SELECT col2 * 2 + - tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 2 + - 84 FROM tab2 GROUP BY tab2.col2
----
-86

query I rowsort
SELECT 55 FROM tab0 GROUP BY tab0.col1
----
55
55

query I rowsort
SELECT DISTINCT col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1936
-3249
-36

query I rowsort
SELECT - col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + - col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL + 32 FROM tab2 AS cor0 GROUP BY cor0.col1
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * cor0.col0 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT - 96 FROM tab2 GROUP BY tab2.col0
----
-96

query I rowsort
SELECT - 98 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col2
----
-98
-98
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col0 + + 0 col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT + 3 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3

query I rowsort
SELECT - col0 AS col2 FROM tab1 cor0 GROUP BY col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT ( 75 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
75
75
75

query I rowsort
SELECT ALL + - 90 AS col1 FROM tab0 GROUP BY tab0.col0
----
-90
-90
-90

query I rowsort
SELECT 0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col1 * - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab2.col2 col1 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT tab2.col1 * + 21 AS col0 FROM tab2 GROUP BY col1
----
1239
1281
861

query I rowsort
SELECT + 97 + - 3 FROM tab2 GROUP BY tab2.col2
----
94
94
94

query I rowsort
SELECT ALL + tab2.col2 * col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT cor0.col1 + col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1722
3540
3782

query I rowsort
SELECT ALL + cor0.col0 + + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

onlyif mysql # DIV for integer division: 
query I rowsort label-6570
SELECT DISTINCT + cor0.col0 DIV + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6570
SELECT DISTINCT + cor0.col0 / + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col2 col0 FROM tab2 GROUP BY tab2.col2 HAVING ( NULL ) < NULL
----

query I rowsort
SELECT + - tab0.col1 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0

query I rowsort
SELECT cor0.col2 * 17 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1343
1479
986

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6575
SELECT CAST( NULL AS SIGNED ) col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6575
SELECT CAST ( NULL AS INTEGER ) col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT ALL - 89 + + 48 AS col1 FROM tab2 GROUP BY col0
----
-41
-41
-41

query I rowsort
SELECT ALL 80 * 32 + - cor0.col2 FROM tab1 cor0 GROUP BY col2, col2
----
2489
2515
2552

query I rowsort
SELECT ALL - tab0.col2 * + col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col2 + - tab0.col2 col1 FROM tab0 GROUP BY col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 72 + - tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
15
28
66

query I rowsort
SELECT 38 + 25 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1138
1463
188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 74 col0 FROM tab2 AS cor0 GROUP BY col1
----
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 47 col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-47

query I rowsort
SELECT ALL 0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
0
0
0

query I rowsort
SELECT 99 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
99
99
99

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT 68 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
68
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 66 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
66

query I rowsort
SELECT DISTINCT - col2 FROM tab0 cor0 GROUP BY col0, col2
----
-24
-38
-79

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
44
57
6

query I rowsort
SELECT ( 71 ) * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1562
1988
5822

query I rowsort
SELECT ALL tab0.col2 - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab2 cor0 CROSS JOIN tab2 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT tab1.col2 * - tab1.col2 AS col1 FROM tab1 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
-2025
-5041
-64

onlyif mysql # DIV for integer division: 
query I rowsort label-6596
SELECT DISTINCT + + 64 + tab2.col2 DIV tab2.col2 FROM tab2 GROUP BY tab2.col2
----
65

skipif mysql # not compatible
query I rowsort label-6596
SELECT DISTINCT + + 64 + tab2.col2 / tab2.col2 FROM tab2 GROUP BY tab2.col2
----
65

query I rowsort
SELECT + 72 FROM tab0 cor0 GROUP BY col0, cor0.col0
----
72
72
72

query I rowsort
SELECT 71 FROM tab0 GROUP BY col1
----
71
71

query I rowsort
SELECT DISTINCT 34 * 32 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1088

query I rowsort
SELECT - tab1.col1 + + 69 AS col0 FROM tab1 GROUP BY tab1.col1
----
12
25
63

query I rowsort
SELECT - 44 FROM tab0 cor0 GROUP BY cor0.col1
----
-44
-44

query I rowsort
SELECT - 23 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-23
-23
-23

query I rowsort
SELECT + 58 - + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6503
58

query I rowsort
SELECT - + tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 7 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
287
413
427

query I rowsort
SELECT - cor0.col0 * cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-210
-8190
-8372

query I rowsort
SELECT ALL - 49 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-49
-49
-49

query I rowsort
SELECT DISTINCT + 76 * - col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1672
-2128
-6232

query I rowsort
SELECT DISTINCT cor0.col0 * 65 FROM tab1 cor0 GROUP BY cor0.col0
----
1430
1820
5330

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 81 col1 FROM tab2 GROUP BY tab2.col1
----
81
81
81

query I rowsort
SELECT ALL tab1.col1 + - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
24
38
79

query I rowsort
SELECT - cor0.col0 * cor0.col1 + - col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3813
-5428
-976

query I rowsort
SELECT DISTINCT + 89 FROM tab1 AS cor0 GROUP BY cor0.col1
----
89

query I rowsort
SELECT DISTINCT - tab1.col0 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT - - 63 AS col2 FROM tab1 GROUP BY col1
----
63
63
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 14 col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
14

query I rowsort
SELECT - col1 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-3772
-5369
-915

query I rowsort
SELECT ALL + col1 * + 44 FROM tab1 GROUP BY tab1.col1
----
1936
2508
264

onlyif mysql # DIV for integer division: 
query I rowsort label-6620
SELECT ALL - cor0.col0 + 95 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-18
-25
-81

skipif mysql # not compatible
query I rowsort label-6620
SELECT ALL - cor0.col0 + 95 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-18
-25
-81

query I rowsort
SELECT ALL cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-6622
SELECT + 47 DIV 72 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6622
SELECT + 47 / 72 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 61 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 45 FROM tab2 GROUP BY col2
----
-45

query I rowsort
SELECT 94 AS col0 FROM tab2 GROUP BY tab2.col2
----
94
94
94

query I rowsort
SELECT ALL + cor0.col1 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL 9 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
9
9
9

query I rowsort
SELECT cor0.col1 * cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1944

query I rowsort
SELECT 17 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
17
17
17

query I rowsort
SELECT + 78 * + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
4524
6162
6786

query I rowsort
SELECT DISTINCT - cor0.col2 + 8 FROM tab1 cor0 GROUP BY col2
----
-37
-63
0

query I rowsort
SELECT ALL + cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 32 FROM tab2 GROUP BY tab2.col1
----
32
32
32

query I rowsort
SELECT DISTINCT + - 56 AS col0 FROM tab1 GROUP BY tab1.col1
----
-56

query I rowsort
SELECT DISTINCT - 58 + + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-1
-14
-52

query I rowsort
SELECT DISTINCT 87 * 4 FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
348

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 4 col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col0
----
4
4
4

query I rowsort
SELECT + 50 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
50
50
50

query I rowsort
SELECT DISTINCT - tab1.col2 * ( 30 ) FROM tab1 GROUP BY tab1.col2
----
-1350
-2130
-240

query I rowsort
SELECT ALL col1 + cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT ALL + 1 * cor0.col0 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL NULLIF ( - cor0.col0, cor0.col0 + - cor0.col0 ) col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT 36 AS col0 FROM tab1 GROUP BY tab1.col1
----
36
36
36

query I rowsort
SELECT ALL - 36 FROM tab0 GROUP BY tab0.col2
----
-36
-36
-36

query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 * - 81 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1760
-2240
-6560

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6648
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1 cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6648
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1 cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT cor0.col0 * col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
1032
2054
3154

query I rowsort
SELECT ALL + 16 AS col2 FROM tab1 GROUP BY tab1.col0
----
16
16
16

query I rowsort
SELECT DISTINCT + tab0.col0 * - tab0.col0 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT col2 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT + 49 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1176
1862
3871

query I rowsort
SELECT DISTINCT - 92 AS col2 FROM tab0 GROUP BY tab0.col1
----
-92

query I rowsort
SELECT 62 FROM tab0 AS cor0 GROUP BY cor0.col0
----
62
62
62

query I rowsort
SELECT + 69 AS col2 FROM tab0 GROUP BY tab0.col1
----
69
69

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col2, + cor0.col2 + cor0.col2 ) * col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT 88 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
88
88
88

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1 cor0 GROUP BY col2, cor0.col2
----
45
71
8

query I rowsort
SELECT 89 - + 42 AS col1 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
47
47
47

query I rowsort
SELECT DISTINCT - + 90 FROM tab0 GROUP BY tab0.col0
----
-90

query I rowsort
SELECT ALL tab0.col2 * 34 AS col1 FROM tab0 GROUP BY tab0.col2
----
1292
2686
816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 84 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
84

query I rowsort
SELECT ALL + 9 FROM tab0 GROUP BY tab0.col0
----
9
9
9

query I rowsort
SELECT DISTINCT - 62 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-62

query I rowsort
SELECT ALL - - 50 AS col1 FROM tab2 GROUP BY tab2.col0
----
50
50
50

query I rowsort
SELECT ALL - + ( tab1.col2 ) * + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL - 90 AS col2 FROM tab2 GROUP BY tab2.col2
----
-90
-90
-90

query I rowsort
SELECT - - tab0.col2 * tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT ALL 47 FROM tab0 AS cor0 GROUP BY cor0.col2
----
47
47
47

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL + 86 FROM tab1 AS cor0 GROUP BY cor0.col2
----
86
86
86

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1444
576
6241

query I rowsort
SELECT ALL - tab2.col0 * 85 FROM tab2 GROUP BY tab2.col0
----
-1275
-7735
-7820

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * + 24 col2 FROM tab0 AS cor0 GROUP BY col0
----
1032
1992
624

query I rowsort
SELECT DISTINCT - 34 FROM tab2 GROUP BY tab2.col2
----
-34

query I rowsort
SELECT 0 FROM tab0 AS cor0 GROUP BY col1
----
0
0

query I rowsort
SELECT DISTINCT - tab1.col0 * col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT - cor0.col0 * - cor0.col0 + + cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
240
8372
8556

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 * tab2.col2 col1 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL 56 * 69 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3864
3864
3864

query I rowsort
SELECT 31 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
31
31
31

query I rowsort
SELECT DISTINCT COALESCE ( + 52, cor0.col2 ) * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1248
-1976
-4108

query I rowsort
SELECT DISTINCT + ( - 39 ) FROM tab1 GROUP BY tab1.col2
----
-39

query I rowsort
SELECT ALL + + 94 * ( - col2 + - tab0.col2 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
-14852
-4512
-7144

query I rowsort
SELECT DISTINCT - + ( + 84 ) + - 45 FROM tab1 GROUP BY tab1.col2
----
-129

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 50 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-50
-50
-50

query I rowsort
SELECT ALL cor0.col2 - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 93 FROM tab1 GROUP BY tab1.col2
----
93
93
93

query I rowsort
SELECT DISTINCT + col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT - 5 FROM tab2 cor0 GROUP BY cor0.col1
----
-5
-5
-5

query I rowsort
SELECT + tab1.col1 + - col1 AS col0 FROM tab1 GROUP BY col1
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6693
SELECT DISTINCT + + tab1.col2 + tab1.col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-6693
SELECT DISTINCT + + tab1.col2 + tab1.col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY col2
----
NULL

query I rowsort
SELECT + cor0.col1 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3772
5369
915

query I rowsort
SELECT ALL tab2.col2 AS col1 FROM tab2 WHERE ( col0 ) <= + tab2.col0 / - tab2.col2 GROUP BY tab2.col2
----

query I rowsort
SELECT DISTINCT - tab2.col1 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT + cor0.col1 * - 43 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3483
0
0

query I rowsort
SELECT 21 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1701

onlyif mysql # DIV for integer division: 
query I rowsort label-6699
SELECT + col1 DIV + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6699
SELECT + col1 / + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1
1
1

query I rowsort
SELECT DISTINCT cor0.col0 * + col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT - col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + 1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 84 col2 FROM tab1 cor0 GROUP BY cor0.col2
----
84

query I rowsort
SELECT DISTINCT - 82 AS col0 FROM tab0 GROUP BY col0
----
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - 14 FROM tab0 AS cor0 GROUP BY col1
----
-14
-14

query I rowsort
SELECT 90 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
90
90
90

query I rowsort
SELECT 10 FROM tab1 AS cor0 GROUP BY cor0.col1
----
10
10
10

query I rowsort
SELECT 11 AS col2 FROM tab1 GROUP BY tab1.col0
----
11
11
11

query I rowsort
SELECT - col0 - col0 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1806
650
6806

query I rowsort
SELECT DISTINCT 41 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
41

query I rowsort
SELECT + 69 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
69
69
69

query I rowsort
SELECT DISTINCT - 89 + - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-170
-89

query I rowsort
SELECT - - 67 AS col2 FROM tab1 GROUP BY col1
----
67
67
67

query I rowsort
SELECT 8 AS col2 FROM tab2 GROUP BY col1
----
8
8
8

query I rowsort
SELECT 56 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
101
127
64

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col2 * 92 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5336
7268
8004

query I rowsort
SELECT + 64 AS col0 FROM tab1 GROUP BY tab1.col1
----
64
64
64

query I rowsort
SELECT + tab2.col1 * + tab2.col1 - tab2.col1 * + 75 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1394
-854
-944

query I rowsort
SELECT - tab2.col0 + + 57 AS col2 FROM tab2 GROUP BY tab2.col0
----
-34
-35
42

onlyif mysql # DIV for integer division: 
query I rowsort label-6722
SELECT + 39 - + tab1.col1 DIV - 60 FROM tab1 GROUP BY tab1.col1
----
39
39
39

skipif mysql # not compatible
query I rowsort label-6722
SELECT + 39 - + tab1.col1 / - 60 FROM tab1 GROUP BY tab1.col1
----
39
39
39

query I rowsort
SELECT ALL + + 11 - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-30
-48
-50

query I rowsort
SELECT ALL COALESCE ( - cor0.col0, + 52 ) FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT + tab1.col1 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL - 42 AS col2 FROM tab0 GROUP BY tab0.col1
----
-42
-42

query I rowsort
SELECT - NULLIF ( - tab1.col1, col1 ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 21 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
21

query I rowsort
SELECT ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY col1, cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
0
81

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT + 56 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT DISTINCT cor0.col1 * 76 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3344
4332
456

query I rowsort
SELECT DISTINCT + 42 FROM tab1 GROUP BY col1
----
42

query I rowsort
SELECT DISTINCT - 41 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1845
-2911
-328

query I rowsort
SELECT - 56 AS col0 FROM tab0 GROUP BY tab0.col2
----
-56
-56
-56

query I rowsort
SELECT - 98 FROM tab1 cor0 GROUP BY cor0.col1
----
-98
-98
-98

query I rowsort
SELECT DISTINCT 97 AS col2 FROM tab0 GROUP BY tab0.col2
----
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 61 col2 FROM tab0 GROUP BY tab0.col1
----
61
61

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT - col0 - ( - 27 ) * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2366
2392
390

query I rowsort
SELECT - 59 FROM tab0 GROUP BY col1
----
-59
-59

query I rowsort
SELECT ALL - 49 FROM tab2 GROUP BY col2
----
-49
-49
-49

query I rowsort
SELECT ALL + - 59 FROM tab2 GROUP BY tab2.col0
----
-59
-59
-59

query I rowsort
SELECT ALL + 63 * col0 FROM tab2 GROUP BY tab2.col0
----
5733
5796
945

query I rowsort
SELECT ALL - + 65 AS col0 FROM tab0 GROUP BY tab0.col1
----
-65
-65

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT + col1 + - 90 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-33
-46
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 26 col2 FROM tab1 GROUP BY tab1.col2
----
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 95 * cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-4180
-5415
-570

query I rowsort
SELECT + 25 FROM tab0 AS cor0 GROUP BY col0
----
25
25
25

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6753
SELECT ALL + cor0.col1 / - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6753
SELECT ALL + cor0.col1 / - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 + - 14 * + col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
-1066
-286
-364

query I rowsort
SELECT 96 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
7776

query I rowsort
SELECT - 91 FROM tab1 cor0 GROUP BY cor0.col0
----
-91
-91
-91

query I rowsort
SELECT + 2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2
2
2

query I rowsort
SELECT ALL - 5 FROM tab1 GROUP BY tab1.col0
----
-5
-5
-5

query I rowsort
SELECT ALL + + tab0.col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT + 54 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
54
54
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT + - 36 FROM tab1 GROUP BY col2
----
-36
-36
-36

query I rowsort
SELECT ALL - col2 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
1032
2054
3154

query I rowsort
SELECT ALL 99 - tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-126
-8182
-8365

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 93 + - 20 col2 FROM tab2 GROUP BY tab2.col1
----
73

query I rowsort
SELECT ALL + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT + 47 AS col2 FROM tab1 GROUP BY tab1.col0
----
47
47
47

query I rowsort
SELECT + 8 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
8
8
8

query I rowsort
SELECT tab0.col2 * - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL - + tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL + + tab1.col1 + - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL + 93 FROM tab1 GROUP BY col1
----
93
93
93

query I rowsort
SELECT 99 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col2
----
99
99
99

query I rowsort
SELECT DISTINCT - 36 AS col2 FROM tab0 GROUP BY tab0.col1
----
-36

query I rowsort
SELECT ALL - tab2.col0 + + 50 * + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
4459
4508
735

query I rowsort
SELECT + 80 AS col0 FROM tab2 GROUP BY tab2.col1
----
80
80
80

query I rowsort
SELECT - tab1.col2 + 8 FROM tab1 GROUP BY tab1.col2
----
-37
-63
0

query I rowsort
SELECT ALL 31 * 71 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
2201
2201
2201

query I rowsort
SELECT DISTINCT + 17 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
17

query I rowsort
SELECT DISTINCT - cor0.col2 * - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL - cor0.col0 + + 73 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-18
-19
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + cor0.col0 * - 3 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2, cor0.col0, cor0.col0
----
-164
-44
-56

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT tab1.col2 / tab1.col2 + tab1.col2 FROM tab1 WHERE NULL NOT IN ( + tab1.col1 ) AND NOT ( NULL ) IN ( tab1.col2 / col1 ) GROUP BY tab1.col2
----

query I rowsort
SELECT + 59 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
59
59
59

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - tab2.col2 - - tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
0

query I rowsort
SELECT ALL + 15 FROM tab0 GROUP BY tab0.col0
----
15
15
15

query I rowsort
SELECT ALL 89 * col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
2136
3382
7031

query I rowsort
SELECT DISTINCT + + 28 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1232
1596
168

query I rowsort
SELECT ALL + 11 FROM tab0 AS cor0 GROUP BY cor0.col0
----
11
11
11

query I rowsort
SELECT + 3 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
3
3
3

query I rowsort
SELECT DISTINCT - 10 * + 71 + + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-618
-619
-695

query I rowsort
SELECT ALL + 87 FROM tab0 cor0 GROUP BY col0
----
87
87
87

query I rowsort
SELECT 51 FROM tab1 AS cor0 GROUP BY col2
----
51
51
51

onlyif mysql # DIV for integer division: 
query I rowsort label-6796
SELECT ALL cor0.col0 DIV + 78 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6796
SELECT ALL cor0.col0 / + 78 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT - 70 FROM tab0 GROUP BY tab0.col2
----
-70
-70
-70

query I rowsort
SELECT - ( 11 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-11
-11
-11

onlyif mysql # DIV for integer division: 
query I rowsort label-6799
SELECT DISTINCT - tab2.col2 DIV - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1

skipif mysql # not compatible
query I rowsort label-6799
SELECT DISTINCT - tab2.col2 / - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1

query I rowsort
SELECT DISTINCT cor0.col1 + 0 * 50 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT cor0.col2 * + col2 FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT DISTINCT + 96 AS col0 FROM tab2 GROUP BY tab2.col2
----
96

query I rowsort
SELECT cor0.col0 + 4 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
19
95
96

query I rowsort
SELECT + 6 AS col2 FROM tab2 GROUP BY tab2.col0
----
6
6
6

query I rowsort
SELECT + + 90 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1980
2520
7380

query I rowsort
SELECT ALL 44 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT 84 * 89 + 73 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
7549
7549
7549

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab0 GROUP BY col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT NULLIF ( - cor0.col2, cor0.col2 ) + 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-41
0
14

query I rowsort
SELECT NULLIF ( cor1.col1, cor1.col0 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor1.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + 17 FROM tab0 GROUP BY tab0.col2
----
17

query I rowsort
SELECT ALL 54 FROM tab0 GROUP BY col2
----
54
54
54

query I rowsort
SELECT DISTINCT 59 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
15
2
53

query I rowsort
SELECT + 29 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
1276
1653
174

onlyif mysql # DIV for integer division: 
query I rowsort label-6818
SELECT ALL + - 69 + - 24 DIV - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-69
-69
-69

skipif mysql # not compatible
query I rowsort label-6818
SELECT ALL + - 69 + - 24 / - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-69
-69
-69

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6819
SELECT CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6819
SELECT CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 30 * - 69 + cor0.col2 * 20 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1310
-1590
-490

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 28 col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
28
28
28

query I rowsort
SELECT DISTINCT - ( - cor0.col1 ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 90 col1 FROM tab0 GROUP BY tab0.col2
----
90
90
90

query I rowsort
SELECT 97 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
97
97
97

query I rowsort
SELECT ALL - 31 AS col0 FROM tab2 GROUP BY col1
----
-31
-31
-31

query I rowsort
SELECT DISTINCT + 24 FROM tab2 GROUP BY col1
----
24

query I rowsort
SELECT DISTINCT - 2 FROM tab1 GROUP BY tab1.col2
----
-2

query I rowsort
SELECT - 0 - 57 FROM tab1 GROUP BY tab1.col2
----
-57
-57
-57

query I rowsort
SELECT ALL 17 * 22 FROM tab1 GROUP BY col0
----
374
374
374

onlyif mysql # DIV for integer division: 
query I rowsort label-6830
SELECT DISTINCT + 24 + + cor0.col0 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
25

skipif mysql # not compatible
query I rowsort label-6830
SELECT DISTINCT + 24 + + cor0.col0 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
25

query I rowsort
SELECT ALL + 42 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT - ( 83 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-83
-83
-83

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT + col1 + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT - 55 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-55
-55
-55

query I rowsort
SELECT DISTINCT cor0.col1 * 9 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
396
513
54

query I rowsort
SELECT 5 * - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-455
-460
-75

query I rowsort
SELECT + 79 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
79
79
79

query I rowsort
SELECT ALL + tab1.col1 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT DISTINCT - col1 FROM tab1 GROUP BY col1 HAVING NOT NULL IS NOT NULL OR NOT NULL IS NULL
----
-44
-57
-6

query I rowsort
SELECT - 33 AS col0 FROM tab2 GROUP BY tab2.col0
----
-33
-33
-33

query I rowsort
SELECT + 34 + + 73 FROM tab1 GROUP BY tab1.col0
----
107
107
107

query I rowsort
SELECT ( cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - cor0.col1 - 87 * 57 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-5000
-5018
-5020

query I rowsort
SELECT + cor0.col2 + - 76 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-18
11
3

query I rowsort
SELECT 60 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
60
60
60

onlyif mysql # DIV for integer division: 
query I rowsort label-6848
SELECT ALL tab0.col2 DIV tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6848
SELECT ALL tab0.col2 / tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT tab2.col0 * + tab2.col0 + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
240
8372
8556

query I rowsort
SELECT DISTINCT + col2 * + 8 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
464
632
696

query I rowsort
SELECT ALL - tab2.col0 + + tab2.col0 * 68 FROM tab2 GROUP BY tab2.col0
----
1005
6097
6164

query I rowsort
SELECT - col0 * + col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 47 FROM tab0 AS cor0 GROUP BY cor0.col1
----
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 94 col0 FROM tab0 GROUP BY tab0.col1
----
94
94

query I rowsort
SELECT DISTINCT 20 FROM tab0 AS cor0 GROUP BY cor0.col1
----
20

onlyif mysql # DIV for integer division: 
query I rowsort label-6857
SELECT ALL - + 13 DIV tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6857
SELECT ALL - + 13 / tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - 47 + 25 AS col1 FROM tab1 GROUP BY tab1.col0
----
-22

query I rowsort
SELECT 43 - + 57 FROM tab1 AS cor0 GROUP BY col1
----
-14
-14
-14

query I rowsort
SELECT DISTINCT + tab2.col2 + col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

onlyif mysql # DIV for integer division: 
query I rowsort label-6861
SELECT col1 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6861
SELECT col1 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT + 36 * + col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2088
2844
3132

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 64 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
64
64
64

query I rowsort
SELECT 10 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
10
10
10

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6865
SELECT ALL - tab1.col2 - CAST( - 38 AS SIGNED ) * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1665
2627
296

skipif mysql # not compatible
query I rowsort label-6865
SELECT ALL - tab1.col2 - CAST ( - 38 AS INTEGER ) * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1665
2627
296

query I rowsort
SELECT 36 FROM tab2 AS cor0 GROUP BY col2, col1
----
36
36
36

query I rowsort
SELECT ALL 30 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
30
30
30

query I rowsort
SELECT DISTINCT 53 + - tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1628
-3428
-3668

query I rowsort
SELECT DISTINCT 14 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1106
-336
-532

query I rowsort
SELECT + 56 FROM tab0 GROUP BY tab0.col2
----
56
56
56

query I rowsort
SELECT DISTINCT - COALESCE ( tab1.col2, + 65, tab1.col2 ) FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT 77 - - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
122
148
85

query I rowsort
SELECT + cor0.col2 + col2 * + 74 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3375
5325
600

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6874
SELECT + CAST( + 69 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
69
69
69

skipif mysql # not compatible
query I rowsort label-6874
SELECT + CAST ( + 69 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
69
69
69

onlyif mysql # DIV for integer division: 
query I rowsort label-6875
SELECT 54 DIV + 37 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6875
SELECT 54 / + 37 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT 61 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
61

query I rowsort
SELECT DISTINCT - 78 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-20
1
9

query I rowsort
SELECT DISTINCT - 0 FROM tab1 cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT 29 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-1189
-1711
-1769

query I rowsort
SELECT ALL - 34 + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-19
57
58

query I rowsort
SELECT 63 + - cor0.col1 * + col1 AS col1 FROM tab0 cor0 GROUP BY col1
----
-6498
63

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + 4 AS col1 FROM tab2 GROUP BY tab2.col1
----
4
4
4

query I rowsort
SELECT 15 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
21
59
72

query I rowsort
SELECT 39 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
39
39
39

query I rowsort
SELECT DISTINCT cor0.col2 - 85 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-27
-6
2

query I rowsort
SELECT + col2 + 38 FROM tab2 GROUP BY tab2.col2
----
117
125
96

query I rowsort
SELECT ALL + 13 * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
1183
1196
195

query I rowsort
SELECT ALL - 85 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
3825
6035
680

query I rowsort
SELECT ALL - 50 * + 70 FROM tab1 GROUP BY tab1.col2
----
-3500
-3500
-3500

query I rowsort
SELECT cor0.col0 * col0 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT ALL 74 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
74
74
74

query I rowsort
SELECT tab1.col1 * + 94 FROM tab1 GROUP BY tab1.col1
----
4136
5358
564

onlyif mysql # DIV for integer division: 
query I rowsort label-6894
SELECT + 77 DIV + col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-6894
SELECT + 77 / + col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
0
2
3

query I rowsort
SELECT + 60 - - 60 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
120
120
120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col0 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT tab0.col0 + - 28 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1247
2407
754

query I rowsort
SELECT - tab0.col1 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT - col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 84 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
84
84
84

query I rowsort
SELECT ALL - cor0.col1 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3483
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6902
SELECT - - 53 DIV tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
0
1
2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6902
SELECT - - 53 / tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
0
1
2

query I rowsort
SELECT ALL 18 FROM tab0 GROUP BY tab0.col1
----
18
18

query I rowsort
SELECT - 30 + 61 FROM tab0 AS cor0 GROUP BY cor0.col1
----
31
31

query I rowsort
SELECT DISTINCT + 63 * 92 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
5796

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6906
SELECT CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6906
SELECT CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6907
SELECT CAST( NULL AS DECIMAL ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6907
SELECT CAST ( NULL AS REAL ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + 88 AS col0 FROM tab0 GROUP BY tab0.col2
----
88
88
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 87 col0 FROM tab0 GROUP BY tab0.col0
----
87
87
87

onlyif mysql # DIV for integer division: 
query I rowsort label-6910
SELECT + cor0.col2 DIV + cor0.col2 col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6910
SELECT + cor0.col2 / + cor0.col2 col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2 HAVING NOT ( + tab1.col2 ) NOT IN ( tab1.col2 + + tab1.col2 )
----

query I rowsort
SELECT DISTINCT - 86 AS col0 FROM tab1 GROUP BY tab1.col0
----
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 46 col1 FROM tab0 GROUP BY tab0.col1
----
-46

query I rowsort
SELECT - 15 FROM tab0 GROUP BY tab0.col1
----
-15
-15

query I rowsort
SELECT DISTINCT + 56 * 33 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
1848

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( - 27, + 19 - tab2.col2, col2 + + tab2.col1 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
-27
-27
-27

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
22
28
82

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6918
SELECT + CAST( NULL AS DECIMAL ) AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6918
SELECT + CAST ( NULL AS REAL ) AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
45
71
8

query I rowsort
SELECT 50 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
50
50
50

query I rowsort
SELECT cor0.col0 * col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

onlyif mysql # DIV for integer division: 
query I rowsort label-6922
SELECT DISTINCT + cor0.col0 DIV cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
1

skipif mysql # not compatible
query I rowsort label-6922
SELECT DISTINCT + cor0.col0 / cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
1

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6923
SELECT DISTINCT CAST( NULL AS DECIMAL ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6923
SELECT DISTINCT CAST ( NULL AS REAL ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT + - 37 AS col2 FROM tab1 GROUP BY col1
----
-37
-37
-37

query I rowsort
SELECT DISTINCT 60 FROM tab0 GROUP BY col1
----
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT - 7 FROM tab2 GROUP BY col0
----
-7
-7
-7

onlyif mysql # DIV for integer division: 
query I rowsort label-6928
SELECT - cor0.col0 DIV + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6928
SELECT - cor0.col0 / + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
-1
-1
-1

query I rowsort
SELECT col1 * + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1944

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor0.col0
----
9 values hashing to 4fe903723f7427a19598c1293ff90703

query I rowsort
SELECT ALL - tab0.col2 * + 1 AS col0 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL + cor0.col1 * 31 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1271
1829
1891

query I rowsort
SELECT ALL - cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

onlyif mysql # DIV for integer division: 
query I rowsort label-6934
SELECT 27 DIV + 49 AS col1 FROM tab1 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6934
SELECT 27 / + 49 AS col1 FROM tab1 GROUP BY col0
----
0
0
0

query I rowsort
SELECT tab0.col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab2 WHERE NOT NULL NOT BETWEEN NULL AND ( + col2 + + tab2.col1 ) GROUP BY tab2.col2
----

query I rowsort
SELECT ALL 44 FROM tab1 GROUP BY tab1.col0
----
44
44
44

query I rowsort
SELECT ALL - tab1.col0 - - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT ALL - 9 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-234
-387
-747

query I rowsort
SELECT ALL + - 67 AS col1 FROM tab1 GROUP BY tab1.col2
----
-67
-67
-67

query I rowsort
SELECT + cor0.col1 + - col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0

query I rowsort
SELECT ALL + 21 FROM tab0 AS cor0 GROUP BY cor0.col2
----
21
21
21

query I rowsort
SELECT + NULLIF ( + cor0.col0, + cor0.col0 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 95 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-34
-36
-54

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT DISTINCT - ( - 70 ) FROM tab1 GROUP BY col1
----
70

query I rowsort
SELECT - cor0.col0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT DISTINCT 18 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
18

query I rowsort
SELECT 5 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
5
5
5

query I rowsort
SELECT + + 33 * + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
1914
2607
2871

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 96 * tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
4224
5472
576

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT - - tab1.col0 + + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

onlyif mysql # DIV for integer division: 
query I rowsort label-6957
SELECT ALL cor0.col1 DIV + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6957
SELECT ALL cor0.col1 / + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT - 23 AS col0 FROM tab1 GROUP BY tab1.col1
----
-23

query I rowsort
SELECT DISTINCT + tab2.col1 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT + 53 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4823
4876
795

query I rowsort
SELECT cor0.col0 * 49 FROM tab1 cor0 GROUP BY cor0.col0
----
1078
1372
4018

query I rowsort
SELECT - ( + 79 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-79
-79
-79

query I rowsort
SELECT tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL - tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT ( NULL ) < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 col2 FROM tab1 GROUP BY col2 HAVING NOT ( NULL ) NOT IN ( + tab1.col2 + tab1.col2 )
----

query I rowsort
SELECT DISTINCT - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL - - tab1.col0 * 36 FROM tab1 GROUP BY tab1.col0
----
1008
2952
792

query I rowsort
SELECT - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 92 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0, cor0.col0
----
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 69 col0 FROM tab0 GROUP BY col2
----
-69
-69
-69

query I rowsort
SELECT DISTINCT - cor0.col1 + + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-46
32
51

query I rowsort
SELECT ALL cor0.col2 * - cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-2025
-5041
-64

query I rowsort
SELECT COALESCE ( 97, - col2 ) FROM tab1 cor0 GROUP BY col2
----
97
97
97

query I rowsort
SELECT - 50 FROM tab0 AS cor0 GROUP BY col1, cor0.col1, col1
----
-50
-50

query I rowsort
SELECT ALL 57 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
57
57
57

query I rowsort
SELECT - 94 * 75 FROM tab2 GROUP BY tab2.col0
----
-7050
-7050
-7050

query I rowsort
SELECT + 77 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
6237

query I rowsort
SELECT ALL col0 * cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1892
6972
702

query I rowsort
SELECT ALL - + 89 AS col0 FROM tab0 GROUP BY tab0.col2
----
-89
-89
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col2 ) col0 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 7 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 81 col1 FROM tab2 GROUP BY col2
----
81

query I rowsort
SELECT - 32 AS col2 FROM tab0 GROUP BY tab0.col1
----
-32
-32

query I rowsort
SELECT + + col1 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT + - 52 FROM tab0 GROUP BY tab0.col0
----
-52
-52
-52

query I rowsort
SELECT - 94 FROM tab0 GROUP BY tab0.col0
----
-94
-94
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 5 col0 FROM tab0 GROUP BY tab0.col0
----
5

query I rowsort
SELECT ALL 95 FROM tab0 cor0 GROUP BY cor0.col2
----
95
95
95

query I rowsort
SELECT - 65 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-65
-65
-65

onlyif mysql # DIV for integer division: 
query I rowsort label-6991
SELECT ALL + cor0.col0 - 36 DIV - 31 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
23
29
83

skipif mysql # not compatible
query I rowsort label-6991
SELECT ALL + cor0.col0 - 36 / - 31 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
23
29
83

query I rowsort
SELECT ALL + tab0.col2 * - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT cor0.col0 + - 36 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-21
55
56

query I rowsort
SELECT + - 77 FROM tab2 GROUP BY tab2.col1
----
-77
-77
-77

query I rowsort
SELECT - 38 AS col1 FROM tab0 GROUP BY tab0.col0
----
-38
-38
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT cor0.col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 66 FROM tab1 cor0 GROUP BY cor0.col0
----
66
66
66

query I rowsort
SELECT ALL + 88 * 27 AS col1 FROM tab2 GROUP BY tab2.col2
----
2376
2376
2376

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( 78 ) col0 FROM tab0 GROUP BY tab0.col2
----
78
78
78

query I rowsort
SELECT ALL 55 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-16
10
47

query I rowsort
SELECT ALL - - tab1.col0 + - 91 AS col2 FROM tab1 GROUP BY tab1.col0
----
-63
-69
-9

query I rowsort
SELECT ALL - - tab1.col2 + - tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1980
-4970
-56

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT 53 AS col0 FROM tab2 GROUP BY tab2.col1
----
53
53
53

query I rowsort
SELECT cor0.col2 + + 99 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
123
137
178

query I rowsort
SELECT DISTINCT 47 FROM tab1 AS cor0 GROUP BY cor0.col2
----
47

onlyif mysql # DIV for integer division: 
query I rowsort label-7008
SELECT DISTINCT - cor0.col1 + + 44 DIV cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-40
-59
-61

skipif mysql # not compatible
query I rowsort label-7008
SELECT DISTINCT - cor0.col1 + + 44 / cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-40
-59
-61

query I rowsort
SELECT - 71 AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-71
-71
-71

query I rowsort
SELECT DISTINCT + 88 + - 3 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
85

query I rowsort
SELECT + 59 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
59
59
59

query I rowsort
SELECT ALL + 5 * 68 FROM tab1 cor0 GROUP BY cor0.col1
----
340
340
340

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
58
79
87

query I rowsort
SELECT ALL + cor0.col2 + - 49 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
30
38
9

query I rowsort
SELECT + 87 FROM tab0 GROUP BY col1
----
87
87

query I rowsort
SELECT DISTINCT 68 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
68

query I rowsort
SELECT DISTINCT - 27 FROM tab1 cor0 GROUP BY col2
----
-27

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7018
SELECT tab1.col2 / - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7018
SELECT tab1.col2 / - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 + - 86 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-48
-62
-7

query I rowsort
SELECT - 69 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-69
-69
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col0
----
9 values hashing to 4fe903723f7427a19598c1293ff90703

query I rowsort
SELECT ALL - 15 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-15
-15
-15

query I rowsort
SELECT - 93 AS col1 FROM tab2 GROUP BY tab2.col1
----
-93
-93
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * 42 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
3402

query I rowsort
SELECT - cor0.col2 * 82 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3690
-5822
-656

query I rowsort
SELECT DISTINCT - 19 AS col1 FROM tab1 GROUP BY tab1.col2
----
-19

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT 83 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col2
----
83
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT COALESCE ( + 89, - tab0.col0 * tab0.col1 ) + 68 col0 FROM tab0 GROUP BY col1
----
157
157

query I rowsort
SELECT ALL tab0.col1 * 22 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
1782

onlyif mysql # DIV for integer division: 
query I rowsort label-7031
SELECT 58 DIV - 38 AS col2 FROM tab2 AS cor0 GROUP BY col2, col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7031
SELECT 58 / - 38 AS col2 FROM tab2 AS cor0 GROUP BY col2, col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 64 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
64

query I rowsort
SELECT - - 23 AS col0 FROM tab2 GROUP BY tab2.col2
----
23
23
23

query I rowsort
SELECT - + 30 FROM tab1 GROUP BY tab1.col2
----
-30
-30
-30

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7035
SELECT - CAST( NULL AS DECIMAL ) * col1 FROM tab0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7035
SELECT - CAST ( NULL AS REAL ) * col1 FROM tab0 GROUP BY col1
----
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 51 col0 FROM tab0 GROUP BY tab0.col1
----
51

query I rowsort
SELECT 27 FROM tab1 AS cor0 GROUP BY col2, cor0.col2, cor0.col2
----
27
27
27

query I rowsort
SELECT + 63 + - tab0.col0 * - tab0.col0 FROM tab0 GROUP BY col0
----
1912
6952
739

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 55, tab1.col1 * tab1.col2 ) * + 24 FROM tab1 GROUP BY tab1.col2
----
1320
1320
1320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 97 col0 FROM tab2 GROUP BY tab2.col2
----
-97
-97
-97

onlyif mysql # DIV for integer division: 
query I rowsort label-7041
SELECT ALL - - tab1.col2 DIV - tab1.col2 FROM tab1 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7041
SELECT ALL - - tab1.col2 / - tab1.col2 FROM tab1 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT + COALESCE ( 76, tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
76
76
76

query I rowsort
SELECT DISTINCT - 86 AS col2 FROM tab0 GROUP BY tab0.col1
----
-86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7044
SELECT cor0.col2 + - CAST( 76 AS SIGNED ) FROM tab1 cor0 GROUP BY cor0.col2
----
-31
-5
-68

skipif mysql # not compatible
query I rowsort label-7044
SELECT cor0.col2 + - CAST ( 76 AS INTEGER ) FROM tab1 cor0 GROUP BY cor0.col2
----
-31
-5
-68

query I rowsort
SELECT cor0.col1 * + 28 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
1148
1652
1708

query I rowsort
SELECT DISTINCT - 73 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-73

query I rowsort
SELECT + + tab0.col2 * + tab0.col2 + 91 * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1608
-2014
-948

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7048
SELECT + CAST( 45 AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col2
----
45
45
45

skipif mysql # not compatible
query I rowsort label-7048
SELECT + CAST ( 45 AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col2
----
45
45
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 75 col2 FROM tab0 GROUP BY tab0.col0
----
-75
-75
-75

query I rowsort
SELECT DISTINCT - - ( + 73 ) FROM tab2 GROUP BY tab2.col2
----
73

query I rowsort
SELECT ALL 84 AS col1 FROM tab1 GROUP BY tab1.col1
----
84
84
84

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7052
SELECT + CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7052
SELECT + CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 71 AS col0 FROM tab2 GROUP BY col0
----
71

query I rowsort
SELECT - col1 AS col2 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + tab2.col1 * col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT tab1.col0 - + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + 0 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT - cor1.col1 AS col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-41
-59
-61

query I rowsort
SELECT + 89 AS col0 FROM tab1 GROUP BY tab1.col2
----
89
89
89

query I rowsort
SELECT ALL 16 + + 37 AS col0 FROM tab1 GROUP BY tab1.col1
----
53
53
53

query I rowsort
SELECT ALL - 59 AS col2 FROM tab0 GROUP BY tab0.col1
----
-59
-59

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1444
576
6241

query I rowsort
SELECT ALL 66 AS col1 FROM tab2 GROUP BY tab2.col1
----
66
66
66

query I rowsort
SELECT cor0.col2 * 99 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
4455
7029
792

query I rowsort
SELECT + col2 + + col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
153
30
73

query I rowsort
SELECT ALL - ( 90 ) FROM tab1 GROUP BY tab1.col1
----
-90
-90
-90

query I rowsort
SELECT ALL 97 AS col1 FROM tab2 GROUP BY col0
----
97
97
97

query I rowsort
SELECT col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL cor0.col1 * - 42 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-1722
-2478
-2562

query I rowsort
SELECT - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT - - ( + tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT - 53 AS col1 FROM tab0 GROUP BY tab0.col0
----
-53
-53
-53

query I rowsort
SELECT ALL - 15 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1230
-330
-420

query I rowsort
SELECT ALL 90 FROM tab0 cor0 GROUP BY cor0.col2, col0, cor0.col2
----
90
90
90

query I rowsort
SELECT - 94 FROM tab1 cor0 GROUP BY cor0.col1
----
-94
-94
-94

onlyif mysql # DIV for integer division: 
query I rowsort label-7076
SELECT DISTINCT cor0.col0 DIV + 90 - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-90
-91

skipif mysql # not compatible
query I rowsort label-7076
SELECT DISTINCT cor0.col0 / + 90 - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-90
-91

query I rowsort
SELECT cor0.col1 + 27 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
108
27
27

query I rowsort
SELECT ALL + - 3 FROM tab0 GROUP BY tab0.col1
----
-3
-3

query I rowsort
SELECT DISTINCT ( - col1 ) FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT 26 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
26
26

query I rowsort
SELECT DISTINCT + + col2 AS col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - - tab1.col1 * ( - tab1.col1 ) + - tab1.col1 * + 21 FROM tab1 GROUP BY tab1.col1
----
-162
-2860
-4446

query I rowsort
SELECT DISTINCT + - tab0.col2 * 1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT 22 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
22

onlyif mysql # DIV for integer division: 
query I rowsort label-7085
SELECT + col0 DIV - 26 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-7085
SELECT + col0 / - 26 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1
-3
0

query I rowsort
SELECT ALL - 6 + + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
0
38
51

query I rowsort
SELECT 27 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
27
27
27

query I rowsort
SELECT col2 + 59 FROM tab1 AS cor0 GROUP BY cor0.col2
----
104
130
67

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT 81 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
105
119
160

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 54 * + 72 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3888
-3888
-3888

query I rowsort
SELECT ALL + col1 + tab0.col1 FROM tab0 GROUP BY col1
----
0
162

query I rowsort
SELECT tab2.col2 + + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 33 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1419
-2739
-858

query I rowsort
SELECT ALL + cor0.col1 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1681
3481
3721

query I rowsort
SELECT ALL 10 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
10
10
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + - tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT ALL - 12 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-12
-12
-12

query I rowsort
SELECT cor0.col1 + - 24 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
-18
20
33

query I rowsort
SELECT DISTINCT + 25 FROM tab1 GROUP BY tab1.col1
----
25

query I rowsort
SELECT + col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
484
6724
784

query I rowsort
SELECT ALL + tab2.col2 - - 19 AS col0 FROM tab2 GROUP BY tab2.col2
----
106
77
98

query I rowsort
SELECT - - 14 FROM tab1 GROUP BY col2
----
14
14
14

query I rowsort
SELECT + 92 FROM tab0 GROUP BY col2
----
92
92
92

query I rowsort
SELECT ALL 3 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT DISTINCT + tab1.col0 * - tab1.col0 - + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-506
-6806
-812

query I rowsort
SELECT tab0.col2 * + tab0.col2 FROM tab0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT ALL - col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL - 38 FROM tab1 GROUP BY tab1.col2
----
-38
-38
-38

query I rowsort
SELECT ALL + 88 FROM tab1 GROUP BY tab1.col2
----
88
88
88

query I rowsort
SELECT + col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
15
91
92

query I rowsort
SELECT DISTINCT + col0 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
102
150
170

query I rowsort
SELECT - + 34 AS col2 FROM tab2 GROUP BY tab2.col1
----
-34
-34
-34

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT - ( - cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT ALL + 12 - + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-14
-31
-71

query I rowsort
SELECT + 33 * 55 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1815
1815
1815

query I rowsort
SELECT - - tab0.col2 * tab0.col2 + - 23 FROM tab0 GROUP BY tab0.col2
----
1421
553
6218

query I rowsort
SELECT + 83 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
83
83
83

query I rowsort
SELECT ALL 6 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT + - 1 AS col2 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

query I rowsort
SELECT 89 * 38 FROM tab0 AS cor0 GROUP BY cor0.col1
----
3382
3382

query I rowsort
SELECT - 90 * - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7290

query I rowsort
SELECT DISTINCT + tab2.col1 * tab2.col1 + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1722
3540
3782

query I rowsort
SELECT ALL + - col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 + + 92 col2 FROM tab1 GROUP BY tab1.col1
----
136
149
98

query I rowsort
SELECT ALL + tab0.col0 + 62 FROM tab0 GROUP BY col0
----
105
145
88

query I rowsort
SELECT cor0.col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT 4 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4
4
4

onlyif mysql # DIV for integer division: 
query I rowsort label-7133
SELECT DISTINCT tab2.col0 DIV tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1

skipif mysql # not compatible
query I rowsort label-7133
SELECT DISTINCT tab2.col0 / tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1

query I rowsort
SELECT DISTINCT + - ( + tab2.col1 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 91 - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, col0
----
48
65
8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7136
SELECT ALL CASE cor0.col0 WHEN - cor0.col0 THEN NULL ELSE - CAST( NULL AS SIGNED ) END + - 29 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7136
SELECT ALL CASE cor0.col0 WHEN - cor0.col0 THEN NULL ELSE - CAST ( NULL AS INTEGER ) END + - 29 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - ( tab1.col0 ) * + 45 AS col0 FROM tab1 GROUP BY tab1.col0
----
1260
3690
990

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 67 col0 FROM tab0 GROUP BY tab0.col0
----
67
67
67

query I rowsort
SELECT ALL + ( tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT ( 67 ) AS col2 FROM tab1 AS cor0 GROUP BY col0
----
67

query I rowsort
SELECT col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-7142
SELECT ALL + + 13 DIV - 84 FROM tab0 GROUP BY col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7142
SELECT ALL + + 13 / - 84 FROM tab0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + 10 ) col1 FROM tab1 GROUP BY tab1.col0
----
10

query I rowsort
SELECT ALL + 88 + 45 FROM tab0 GROUP BY tab0.col1
----
133
133

query I rowsort
SELECT ALL - + 31 AS col2 FROM tab1 GROUP BY tab1.col0
----
-31
-31
-31

query I rowsort
SELECT DISTINCT - col2 FROM tab0 AS cor0 GROUP BY col2, col0
----
-24
-38
-79

query I rowsort
SELECT + ( + cor0.col0 ) * cor0.col0 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1873
6927
755

query I rowsort
SELECT DISTINCT - tab0.col0 * - 91 FROM tab0 GROUP BY tab0.col0
----
2366
3913
7553

query I rowsort
SELECT - - 36 FROM tab1 GROUP BY tab1.col2
----
36
36
36

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT CASE 95 WHEN 81 THEN tab0.col0 ELSE NULL END * 55 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 49 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-49

query I rowsort
SELECT - - col1 AS col0 FROM tab2 GROUP BY col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-7154
SELECT DISTINCT col0 * cor0.col2 + cor0.col0 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
1306
5337
7190

skipif mysql # not compatible
query I rowsort label-7154
SELECT DISTINCT col0 * cor0.col2 + cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
1306
5337
7190

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-3306
-6162
-7482

query I rowsort
SELECT + 80 - col1 FROM tab1 cor0 GROUP BY cor0.col1
----
23
36
74

query I rowsort
SELECT + - tab2.col1 * tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT ( + tab0.col2 ) AS col0 FROM tab0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 91 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
91

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7160
SELECT DISTINCT + CAST( + col0 AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

skipif mysql # not compatible
query I rowsort label-7160
SELECT DISTINCT + CAST ( + col0 AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 51 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
51

query I rowsort
SELECT DISTINCT - - tab1.col1 + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT tab0.col1 * - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT ALL - cor0.col2 + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-105
-121
-67

onlyif mysql # DIV for integer division: 
query I rowsort label-7165
SELECT - cor0.col1 DIV - 62 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7165
SELECT - cor0.col1 / - 62 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
0
0
0

query I rowsort
SELECT + col1 * col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6642

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7168
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-7168
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT + 86 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
86
86
86

query I rowsort
SELECT ALL + col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT - 19 FROM tab0 GROUP BY tab0.col2
----
-19
-19
-19

query I rowsort
SELECT DISTINCT + - tab2.col2 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - + 79 AS col1 FROM tab1 GROUP BY col0
----
-79
-79
-79

query I rowsort
SELECT 81 FROM tab0 GROUP BY tab0.col2
----
81
81
81

onlyif mysql # DIV for integer division: 
query I rowsort label-7175
SELECT DISTINCT - tab0.col1 DIV + 35 AS col0 FROM tab0 GROUP BY tab0.col1
----
-2
0

skipif mysql # not compatible
query I rowsort label-7175
SELECT DISTINCT - tab0.col1 / + 35 AS col0 FROM tab0 GROUP BY tab0.col1
----
-2
0

query I rowsort
SELECT - + 66 + + 58 AS col2 FROM tab1 GROUP BY tab1.col1
----
-8
-8
-8

query I rowsort
SELECT ALL 57 FROM tab1 GROUP BY col0
----
57
57
57

query I rowsort
SELECT ALL + ( 27 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
27
27
27

query I rowsort
SELECT DISTINCT col1 + col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
118
122
82

query I rowsort
SELECT 58 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
58
58

query I rowsort
SELECT DISTINCT 49 * - 88 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4312

query I rowsort
SELECT ALL - 25 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-25
-25
-25

query I rowsort
SELECT - - 34 AS col1 FROM tab2 GROUP BY tab2.col0
----
34
34
34

query I rowsort
SELECT + - 91 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-2184
-3458
-7189

query I rowsort
SELECT + cor0.col1 + cor0.col0 FROM tab1 AS cor0 GROUP BY col0, col1
----
126
28
85

query I rowsort
SELECT DISTINCT - + 61 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-61

query I rowsort
SELECT - 82 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-82
-82
-82

query I rowsort
SELECT DISTINCT 16 FROM tab0 AS cor0 GROUP BY cor0.col0
----
16

query I rowsort
SELECT ALL tab0.col1 + + ( 36 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
117
36

query I rowsort
SELECT - 62 FROM tab1 GROUP BY tab1.col1
----
-62
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 9 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-9

query I rowsort
SELECT DISTINCT 50 FROM tab0 GROUP BY tab0.col2
----
50

query I rowsort
SELECT DISTINCT + 98 * tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
1470
8918
9016

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 39 col0 FROM tab0 GROUP BY tab0.col2
----
39
39
39

query I rowsort
SELECT + + 94 AS col1 FROM tab2 GROUP BY tab2.col0
----
94
94
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 col1 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - ( - 29 ) - + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-62
-63
14

query I rowsort
SELECT - cor0.col2 * ( 62 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-1488
-2356
-4898

query I rowsort
SELECT + 74 FROM tab2 AS cor0 GROUP BY col1
----
74
74
74

query I rowsort
SELECT ALL - 7 FROM tab0 GROUP BY tab0.col0
----
-7
-7
-7

query I rowsort
SELECT ALL 80 FROM tab2 cor0 GROUP BY col0
----
80
80
80

query I rowsort
SELECT - 30 + 23 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-7
-7
-7

query I rowsort
SELECT - tab1.col2 + 94 FROM tab1 GROUP BY col2
----
23
49
86

query I rowsort
SELECT tab1.col2 * + tab1.col2 - + 45 FROM tab1 GROUP BY col2
----
19
1980
4996

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * + 74 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3034
4366
4514

query I rowsort
SELECT ALL col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL + 31 AS col2 FROM tab1 GROUP BY tab1.col1
----
31
31
31

query I rowsort
SELECT ALL + 16 AS col1 FROM tab0 GROUP BY tab0.col0
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + NULLIF ( cor0.col2, 13 * - 88 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT 22 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
22
22
22

query I rowsort
SELECT ALL tab0.col0 - - 77 * col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
2028
3354
6474

onlyif mysql # DIV for integer division: 
query I rowsort label-7212
SELECT ALL cor0.col2 DIV 75 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7212
SELECT ALL cor0.col2 / 75 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
1
1

query I rowsort
SELECT DISTINCT - 81 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1782
2268
6642

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 86 col1 FROM tab2 GROUP BY tab2.col0
----
-86

query I rowsort
SELECT - 6 AS col0 FROM tab1 GROUP BY tab1.col0
----
-6
-6
-6

query I rowsort
SELECT DISTINCT - 32 FROM tab1 GROUP BY tab1.col0
----
-32

query I rowsort
SELECT DISTINCT + tab2.col2 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT + + 32 * 59 AS col1 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
1888
1888
1888

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 61 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
61

query I rowsort
SELECT ALL + 14 AS col0 FROM tab2 GROUP BY col1
----
14
14
14

query I rowsort
SELECT DISTINCT 63 FROM tab2 GROUP BY tab2.col2
----
63

query I rowsort
SELECT DISTINCT - - 85 FROM tab1 GROUP BY tab1.col2
----
85

query I rowsort
SELECT + 9 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
9
9
9

query I rowsort
SELECT - tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL IS NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-7225
SELECT tab2.col0 DIV tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7225
SELECT tab2.col0 / tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT DISTINCT col0 * tab2.col0 - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
210
8190
8372

onlyif mysql # DIV for integer division: 
query I rowsort label-7227
SELECT - tab1.col1 DIV 41 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-7227
SELECT - tab1.col1 / 41 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1
-1
0

query I rowsort
SELECT col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
45
71
8

query I rowsort
SELECT DISTINCT 94 AS col1 FROM tab0 GROUP BY tab0.col2
----
94

query I rowsort
SELECT DISTINCT - + 92 AS col1 FROM tab1 GROUP BY tab1.col2
----
-92

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT ALL + ( + 30 ) FROM tab2 GROUP BY tab2.col2
----
30
30
30

query I rowsort
SELECT ALL - - 59 AS col0 FROM tab1 GROUP BY tab1.col1
----
59
59
59

query I rowsort
SELECT DISTINCT + + NULLIF ( 8, tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
8

query I rowsort
SELECT DISTINCT + + 19 AS col2 FROM tab0 GROUP BY tab0.col1
----
19

query I rowsort
SELECT ALL 64 AS col2 FROM tab1 GROUP BY tab1.col1
----
64
64
64

onlyif mysql # DIV for integer division: 
query I rowsort label-7237
SELECT ALL + cor0.col0 DIV - 87 FROM tab2 cor0 GROUP BY cor0.col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-7237
SELECT ALL + cor0.col0 / - 87 FROM tab2 cor0 GROUP BY cor0.col0
----
-1
-1
0

query I rowsort
SELECT + 77 AS col2 FROM tab1 GROUP BY tab1.col0
----
77
77
77

query I rowsort
SELECT 63 AS col2 FROM tab2 GROUP BY tab2.col1
----
63
63
63

query I rowsort
SELECT ( + cor0.col1 ) FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT - ( tab1.col1 ) * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL 97 FROM tab0 AS cor0 GROUP BY cor0.col1
----
97
97

query I rowsort
SELECT DISTINCT + - col2 + + col2 FROM tab2 GROUP BY tab2.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 47 + - 86 col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-133
-133
-133

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL cor0.col2 - COALESCE ( - 49, + cor0.col1 * - cor0.col1, cor0.col0 + 53 ) FROM tab1 cor0 GROUP BY cor0.col2
----
120
57
94

query I rowsort
SELECT + 26 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
26
26

query I rowsort
SELECT ALL 67 FROM tab0 GROUP BY tab0.col1
----
67
67

query I rowsort
SELECT DISTINCT - ( - 55 ) FROM tab1 GROUP BY tab1.col1
----
55

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7249
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col2 FROM tab0 GROUP BY tab0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-7249
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY tab0.col2
----
NULL

query I rowsort
SELECT - 50 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
-50
-50
-50

onlyif mysql # DIV for integer division: 
query I rowsort label-7251
SELECT + cor1.col1 DIV + cor1.col1 col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7251
SELECT + cor1.col1 / + cor1.col1 col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
1
1
1

query I rowsort
SELECT 92 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
92
92
92

query I rowsort
SELECT cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT 69 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
107
148
93

query I rowsort
SELECT ALL 24 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
24
24
24

query I rowsort
SELECT + 85 - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
3
57
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 76 * + tab1.col1 col0 FROM tab1 GROUP BY col1
----
3344
4332
456

query I rowsort
SELECT DISTINCT + 82 FROM tab2 GROUP BY tab2.col2
----
82

onlyif mysql # DIV for integer division: 
query I rowsort label-7259
SELECT - COALESCE ( cor0.col1, - ( - 86 ) ) DIV + col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7259
SELECT - COALESCE ( cor0.col1, - ( - 86 ) ) / + col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-7260
SELECT DISTINCT 87 DIV cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
10

skipif mysql # not compatible
query I rowsort label-7260
SELECT DISTINCT 87 / cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
10

query I rowsort
SELECT DISTINCT + ( - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT + 30 FROM tab1 GROUP BY tab1.col0
----
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col0 * - tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 36 col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 * 49 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
1300
2150
4150

query I rowsort
SELECT DISTINCT + tab0.col1 * 29 + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
2430

onlyif mysql # DIV for integer division: 
query I rowsort label-7270
SELECT ALL - - tab1.col2 DIV + NULLIF ( 40, + tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7270
SELECT ALL - - tab1.col2 / + NULLIF ( 40, + tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
0
1
1

query I rowsort
SELECT + + col0 + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT DISTINCT + tab1.col2 * - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT + + 19 FROM tab1 GROUP BY tab1.col0
----
19

query I rowsort
SELECT DISTINCT - 83 FROM tab1 AS cor0 GROUP BY col2
----
-83

query I rowsort
SELECT + - 35 FROM tab1 GROUP BY tab1.col1
----
-35
-35
-35

query I rowsort
SELECT DISTINCT - col2 + - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-142
-16
-90

query I rowsort
SELECT + tab0.col0 * col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT ALL - col1 * + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT + 12 * 22 FROM tab0 AS cor0 GROUP BY col0
----
264
264
264

query I rowsort
SELECT DISTINCT ( - 7 ) FROM tab0 AS cor0 GROUP BY col1
----
-7

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
0
6561

query I rowsort
SELECT - cor0.col0 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-1260
-176
-5822

query I rowsort
SELECT ALL cor0.col1 + 30 * - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-2671
-2719
-389

onlyif mysql # DIV for integer division: 
query I rowsort label-7284
SELECT - + tab2.col1 DIV tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7284
SELECT - + tab2.col1 / tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 35 col0 FROM tab0 AS cor0 GROUP BY col2
----
35
35
35

query I rowsort
SELECT DISTINCT 1 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
1

onlyif mysql # DIV for integer division: 
query I rowsort label-7288
SELECT col0 DIV - 64 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-7288
SELECT col0 / - 64 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

query I rowsort
SELECT + - 15 FROM tab2 GROUP BY tab2.col1
----
-15
-15
-15

query I rowsort
SELECT ALL - - tab0.col2 - - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT - 69 AS col1 FROM tab0 GROUP BY tab0.col1
----
-69

query I rowsort
SELECT tab2.col1 * 63 FROM tab2 GROUP BY tab2.col1
----
2583
3717
3843

query I rowsort
SELECT ALL 6 + 3 FROM tab1 GROUP BY tab1.col0
----
9
9
9

query I rowsort
SELECT DISTINCT + - 52 FROM tab0 GROUP BY tab0.col1
----
-52

query I rowsort
SELECT ALL - 12 * 14 + - cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
-168
-249

query I rowsort
SELECT DISTINCT 8 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
8

query I rowsort
SELECT DISTINCT - - 37 AS col1 FROM tab0 GROUP BY col1
----
37

query I rowsort
SELECT ALL + 11 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
35
49
90

query I rowsort
SELECT - 96 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-96
-96
-96

query I rowsort
SELECT + 1 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-7301
SELECT ALL + tab1.col2 DIV + 88 AS col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7301
SELECT ALL + tab1.col2 / + 88 AS col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab2.col0 + tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT ( + 20 ) FROM tab2 GROUP BY tab2.col0
----
20
20
20

query I rowsort
SELECT ALL 56 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 20 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
20

query I rowsort
SELECT DISTINCT + - 33 FROM tab2 GROUP BY tab2.col1
----
-33

query I rowsort
SELECT + tab2.col1 + - 30 FROM tab2 GROUP BY tab2.col1
----
11
29
31

query I rowsort
SELECT ALL - 87 * + cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-3870
-6106
-688

query I rowsort
SELECT DISTINCT + col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT ALL - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IN ( col2 )
----

query I rowsort
SELECT + tab0.col1 FROM tab0 WHERE col0 IN ( + tab0.col2 + - col0 * tab0.col1 ) GROUP BY tab0.col1
----

query I rowsort
SELECT tab2.col1 - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + tab1.col1 * - col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL + 63 FROM tab0 GROUP BY tab0.col1
----
63
63

query I rowsort
SELECT ALL + ( 6 ) * - 27 FROM tab0 GROUP BY tab0.col1
----
-162
-162

query I rowsort
SELECT + 52 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
52
52
52

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + - tab0.col1 + 36 AS col2 FROM tab0 GROUP BY tab0.col1
----
-45
36

onlyif mysql # DIV for integer division: 
query I rowsort label-7321
SELECT + cor0.col2 DIV cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-23
-37
-78

skipif mysql # not compatible
query I rowsort label-7321
SELECT + cor0.col2 / cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-23
-37
-78

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT ALL - 29 AS col0 FROM tab0 GROUP BY tab0.col0
----
-29
-29
-29

query I rowsort
SELECT ALL + 24 * + tab2.col1 FROM tab2 GROUP BY col1
----
1416
1464
984

query I rowsort
SELECT - + 75 AS col0 FROM tab2 GROUP BY tab2.col1
----
-75
-75
-75

query I rowsort
SELECT DISTINCT + ( 57 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
57

onlyif mysql # DIV for integer division: 
query I rowsort label-7327
SELECT DISTINCT cor0.col1 DIV - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-7327
SELECT DISTINCT cor0.col1 / - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1

query I rowsort
SELECT - - 27 AS col0 FROM tab0 GROUP BY tab0.col1
----
27
27

query I rowsort
SELECT - 80 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-80
-80
-80

query I rowsort
SELECT ALL + 15 * 29 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
435
435
435

query I rowsort
SELECT ALL 50 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT - col0 + - ( + 53 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-135
-75
-81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7333
SELECT ALL + CAST( NULL AS SIGNED ) * col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7333
SELECT ALL + CAST ( NULL AS INTEGER ) * col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7334
SELECT ALL + + CAST( NULL AS SIGNED ) col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7334
SELECT ALL + + CAST ( NULL AS INTEGER ) col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + 19 AS col2 FROM tab0 GROUP BY tab0.col0
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 15 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-15
-15
-15

query I rowsort
SELECT ALL - - tab0.col2 * - 89 AS col1 FROM tab0 GROUP BY tab0.col2
----
-2136
-3382
-7031

query I rowsort
SELECT + 38 FROM tab0 GROUP BY col0
----
38
38
38

query I rowsort
SELECT + tab2.col1 + 83 AS col2 FROM tab2 GROUP BY tab2.col1
----
124
142
144

query I rowsort
SELECT tab0.col2 * - 71 FROM tab0 GROUP BY tab0.col2
----
-1704
-2698
-5609

query I rowsort
SELECT 71 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3195
-5041
-568

query I rowsort
SELECT ALL - 63 FROM tab2 GROUP BY tab2.col1
----
-63
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col0 FROM tab0 cor0 GROUP BY col1, cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT 46 * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4186
4232
690

query I rowsort
SELECT DISTINCT 87 FROM tab2 AS cor0 GROUP BY cor0.col1
----
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 + 54 col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-29
11
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7348
SELECT COALESCE ( + 47, col2, CAST( NULL AS SIGNED ) ) + + 84 FROM tab2 GROUP BY tab2.col2
----
131
131
131

skipif mysql # not compatible
query I rowsort label-7348
SELECT COALESCE ( + 47, col2, CAST ( NULL AS INTEGER ) ) + + 84 FROM tab2 GROUP BY tab2.col2
----
131
131
131

query I rowsort
SELECT ALL 0 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 46 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
128
68
74

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( + 2, tab1.col1 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
-2

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7352
SELECT ALL + CAST( NULL AS DECIMAL ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7352
SELECT ALL + CAST ( NULL AS REAL ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 35 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
-35
-35
-35

onlyif mysql # DIV for integer division: 
query I rowsort label-7354
SELECT - ( + 83 ) DIV cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-7354
SELECT - ( + 83 ) / cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-2
-3

query I rowsort
SELECT ALL col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT - + 45 AS col2 FROM tab0, tab0 cor0 GROUP BY tab0.col1
----
-45
-45

query I rowsort
SELECT DISTINCT - 90 FROM tab0 GROUP BY tab0.col1
----
-90

query I rowsort
SELECT 45 + cor0.col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-180
-8236
-8419

onlyif mysql # DIV for integer division: 
query I rowsort label-7359
SELECT DISTINCT 83 DIV col2 FROM tab0 AS cor0 GROUP BY col2
----
1
2
3

skipif mysql # not compatible
query I rowsort label-7359
SELECT DISTINCT 83 / col2 FROM tab0 AS cor0 GROUP BY col2
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col1 + tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT - cor0.col2 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL 15 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1365
1380
225

query I rowsort
SELECT ALL 8 AS col2 FROM tab1 GROUP BY tab1.col0
----
8
8
8

query I rowsort
SELECT ALL - cor0.col1 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-1936
-3249
-36

query I rowsort
SELECT ALL - 58 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
-58
-58

onlyif mysql # DIV for integer division: 
query I rowsort label-7366
SELECT ALL - col1 DIV + cor0.col1 FROM tab2 cor0 GROUP BY col1, cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7366
SELECT ALL - col1 / + cor0.col1 FROM tab2 cor0 GROUP BY col1, cor0.col1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - 73 * tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
-1584
-2016
-5904

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT + 40 FROM tab1 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT + ( 30 ) + - tab1.col1 * - tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
1966
3279
66

query I rowsort
SELECT DISTINCT cor0.col2 * 69 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3105
4899
552

query I rowsort
SELECT - 23 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-23
-23
-23

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
45
71
8

query I rowsort
SELECT DISTINCT 38 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
38

query I rowsort
SELECT ALL 24 FROM tab2 AS cor0 GROUP BY col1
----
24
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 48 col0 FROM tab1 GROUP BY tab1.col2
----
-48
-48
-48

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
45
71
8

query I rowsort
SELECT + 77 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
77
77
77

query I rowsort
SELECT - ( + 11 ) + col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-11
70

query I rowsort
SELECT - 35 AS col1 FROM tab0 GROUP BY tab0.col0
----
-35
-35
-35

query I rowsort
SELECT DISTINCT 89 + col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
147
168
176

query I rowsort
SELECT DISTINCT - cor0.col1 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-118
-122
-82

query I rowsort
SELECT ALL + 92 FROM tab1 AS cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT + ( 57 ) AS col2 FROM tab1 GROUP BY col0
----
57
57
57

query I rowsort
SELECT DISTINCT + 32 AS col0 FROM tab0 GROUP BY tab0.col2
----
32

query I rowsort
SELECT DISTINCT - tab0.col2 * + tab0.col2 + - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1482
-600
-6320

query I rowsort
SELECT tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NOT NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-7388
SELECT tab1.col2 DIV 92 FROM tab1, tab0 cor0 GROUP BY tab1.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7388
SELECT tab1.col2 / 92 FROM tab1, tab0 cor0 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT 57 + - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-2
-4
16

query I rowsort
SELECT ALL + 39 AS col0 FROM tab2 GROUP BY tab2.col2
----
39
39
39

query I rowsort
SELECT ALL cor0.col1 - 17 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-17
-17
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * 82 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-1968
-3116
-6478

query I rowsort
SELECT - cor0.col2 + 77 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-10
-2
19

query I rowsort
SELECT - + 71 AS col0 FROM tab1 GROUP BY tab1.col1
----
-71
-71
-71

query I rowsort
SELECT DISTINCT cor0.col2 * - 44 + 33 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1023
-1639
-3443

query I rowsort
SELECT DISTINCT - ( - tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + 48 + col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
130
70
76

query I rowsort
SELECT DISTINCT - 73 * 25 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1825

query I rowsort
SELECT ALL - + 3 FROM tab1 GROUP BY col0
----
-3
-3
-3

query I rowsort
SELECT + 54 FROM tab2 AS cor0 GROUP BY cor0.col1
----
54
54
54

query I rowsort
SELECT + 95 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
101
139
152

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 76 col1 FROM tab2 GROUP BY col0
----
76

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7403
SELECT - tab2.col1 * CAST( 60 AS SIGNED ) AS col0 FROM tab2 GROUP BY col1
----
-2460
-3540
-3660

skipif mysql # not compatible
query I rowsort label-7403
SELECT - tab2.col1 * CAST ( 60 AS INTEGER ) AS col0 FROM tab2 GROUP BY col1
----
-2460
-3540
-3660

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 7 col0 FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
-7

query I rowsort
SELECT - 37 FROM tab0 GROUP BY tab0.col1
----
-37
-37

query I rowsort
SELECT + 61 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
61
61
61

query I rowsort
SELECT - ( 18 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
-18
-18
-18

query I rowsort
SELECT + 19 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT 29 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
29
29
29

query I rowsort
SELECT 77 AS col1 FROM tab0 GROUP BY tab0.col0
----
77
77
77

query I rowsort
SELECT ALL 62 FROM tab1 GROUP BY tab1.col2
----
62
62
62

onlyif mysql # DIV for integer division: 
query I rowsort label-7412
SELECT 60 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7412
SELECT 60 / cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
0
1
2

query I rowsort
SELECT DISTINCT - + tab1.col1 - 38 FROM tab1 GROUP BY tab1.col1
----
-44
-82
-95

query I rowsort
SELECT + col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
24
38
79

query I rowsort
SELECT 35 + - cor0.col2 * col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1409
-541
-6206

onlyif mysql # DIV for integer division: 
query I rowsort label-7416
SELECT + cor0.col2 DIV + 54 + + cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
226
8282
8465

skipif mysql # not compatible
query I rowsort label-7416
SELECT + cor0.col2 / + 54 + + cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
226
8282
8465

query I rowsort
SELECT DISTINCT - 51 FROM tab1 AS cor0 GROUP BY col1
----
-51

query I rowsort
SELECT DISTINCT - 75 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-75

query I rowsort
SELECT ALL - ( - col1 ) FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL 83 FROM tab2 GROUP BY tab2.col1
----
83
83
83

query I rowsort
SELECT ALL - tab0.col2 * 37 FROM tab0 GROUP BY tab0.col2
----
-1406
-2923
-888

query I rowsort
SELECT - 98 FROM tab2 GROUP BY col0
----
-98
-98
-98

onlyif mysql # DIV for integer division: 
query I rowsort label-7423
SELECT DISTINCT + 68 DIV cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7423
SELECT DISTINCT + 68 / cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
2

query I rowsort
SELECT ALL + tab0.col0 * 90 AS col1 FROM tab0 GROUP BY tab0.col0
----
2340
3870
7470

query I rowsort
SELECT - - 13 AS col2 FROM tab0 GROUP BY tab0.col0
----
13
13
13

onlyif mysql # DIV for integer division: 
query I rowsort label-7426
SELECT COALESCE ( 67, cor0.col2 + + cor0.col0 DIV cor0.col1, + cor0.col0 + cor0.col0 ) + ( 61 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
128
128
128

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7426
SELECT COALESCE ( 67, cor0.col2 + + cor0.col0 / cor0.col1, + cor0.col0 + cor0.col0 ) + ( 61 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
128
128
128

query I rowsort
SELECT ALL - ( 90 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-90
-90
-90

query I rowsort
SELECT DISTINCT - 28 AS col0 FROM tab2 GROUP BY col2
----
-28

query I rowsort
SELECT ALL 45 FROM tab1 GROUP BY tab1.col0
----
45
45
45

query I rowsort
SELECT cor0.col0 + + col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
124
26
83

query I rowsort
SELECT 81 + col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
162
81

query I rowsort
SELECT ALL + - 10 + + 60 * 12 AS col2 FROM tab0 GROUP BY tab0.col1
----
710
710

query I rowsort
SELECT DISTINCT + col2 * ( + cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
2025
5041
64

query I rowsort
SELECT ALL 21 FROM tab1 GROUP BY tab1.col0
----
21
21
21

query I rowsort
SELECT - 82 FROM tab2 AS cor0 GROUP BY col0
----
-82
-82
-82

query I rowsort
SELECT + + tab1.col0 * - col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 52 * cor0.col0 col1 FROM tab1 cor0 GROUP BY cor0.col0
----
1144
1456
4264

query I rowsort
SELECT ALL - + 56 AS col1 FROM tab0 GROUP BY tab0.col0
----
-56
-56
-56

query I rowsort
SELECT ALL 26 FROM tab2 AS cor0 GROUP BY col2
----
26
26
26

query I rowsort
SELECT DISTINCT - tab1.col0 - - 31 AS col1 FROM tab1 GROUP BY tab1.col0
----
-51
3
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT cor0.col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
164
44
56

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + + tab0.col1 * COALESCE ( 74, - tab0.col2, 4 ) FROM tab0 GROUP BY tab0.col1
----
0
5994

query I rowsort
SELECT - 7 * 47 AS col2 FROM tab1 GROUP BY col1
----
-329
-329
-329

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7445
SELECT - CAST( col1 AS SIGNED ) AS col2 FROM tab0 GROUP BY col1
----
-81
0

skipif mysql # not compatible
query I rowsort label-7445
SELECT - CAST ( col1 AS INTEGER ) AS col2 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT 14 FROM tab2 AS cor0 GROUP BY cor0.col1
----
14
14
14

query I rowsort
SELECT ALL 42 FROM tab1 AS cor0 GROUP BY cor0.col1
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 11 col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0, cor0.col2
----
-11
-11
-11

query I rowsort
SELECT ALL + col2 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( COALESCE ( + 30, cor0.col0 ), - cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-30
-30
-30

query I rowsort
SELECT ALL + 75 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
75
75
75

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + 79 * - 49 + - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-3886
-3962
-3963

query I rowsort
SELECT + 49 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
49
49
49

query I rowsort
SELECT - cor0.col0 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1260
176
5822

query I rowsort
SELECT ALL - 45 FROM tab2 AS cor0 GROUP BY col2
----
-45
-45
-45

query I rowsort
SELECT DISTINCT - 15 AS col2 FROM tab2 GROUP BY tab2.col1
----
-15

query I rowsort
SELECT ALL + tab2.col1 * 38 - - 83 AS col1 FROM tab2 GROUP BY tab2.col1
----
1641
2325
2401

query I rowsort
SELECT DISTINCT 30 * col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1320
1710
180

query I rowsort
SELECT ALL 52 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
52
52
52

query I rowsort
SELECT DISTINCT 56 FROM tab1 AS cor0 GROUP BY cor0.col0
----
56

query I rowsort
SELECT - 6 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-6
-6
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 42 col2 FROM tab0 GROUP BY tab0.col2
----
42
42
42

query I rowsort
SELECT DISTINCT 9 AS col2 FROM tab0 GROUP BY col1
----
9

query I rowsort
SELECT ALL - 64 * tab2.col2 - 82 AS col1 FROM tab2 GROUP BY tab2.col2
----
-3794
-5138
-5650

query I rowsort
SELECT - 76 FROM tab1 AS cor0 GROUP BY col0
----
-76
-76
-76

query I rowsort
SELECT 83 + - col2 AS col0 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
12
38
75

query I rowsort
SELECT col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-7469
SELECT + cor0.col1 DIV col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
0
0
3

skipif mysql # not compatible
query I rowsort label-7469
SELECT + cor0.col1 / col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
0
0
3

query I rowsort
SELECT + tab1.col1 * - tab1.col1 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1892
-30
-3192

query I rowsort
SELECT tab1.col2 * + tab1.col2 - 40 FROM tab1 GROUP BY col2
----
1985
24
5001

query I rowsort
SELECT ALL + 15 FROM tab0 GROUP BY tab0.col1
----
15
15

query I rowsort
SELECT 33 AS col0 FROM tab0 GROUP BY tab0.col2
----
33
33
33

query I rowsort
SELECT ALL tab1.col0 * tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + tab2.col0 * 29 FROM tab2 GROUP BY tab2.col0
----
2639
2668
435

query I rowsort
SELECT DISTINCT + 59 FROM tab1 AS cor0 GROUP BY cor0.col2
----
59

query I rowsort
SELECT + 70 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( 87 ) * 18 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1566
1566
1566

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7479
SELECT CAST( NULL AS DECIMAL ) col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7479
SELECT CAST ( NULL AS REAL ) col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
NULL
NULL

query I rowsort
SELECT + + 89 + 63 FROM tab1 GROUP BY tab1.col2
----
152
152
152

query I rowsort
SELECT DISTINCT - 18 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-18

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( 66, cor0.col2, cor0.col1, cor0.col0 * - 39 ) AS col2 FROM tab0 AS cor0 GROUP BY col0
----
66

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
26
43
83

query I rowsort
SELECT 49 FROM tab2 GROUP BY tab2.col0
----
49
49
49

query I rowsort
SELECT - col2 * - ( 18 * cor0.col0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
129402
23490
96048

query I rowsort
SELECT DISTINCT + + 63 FROM tab0 GROUP BY tab0.col2
----
63

query I rowsort
SELECT ALL - col0 + + cor0.col0 * + 54 FROM tab2 cor0 GROUP BY cor0.col0
----
4823
4876
795

query I rowsort
SELECT ALL cor1.col0 * 7 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col0, cor0.col1
----
9 values hashing to d57c5b40f521f71dccf5dc629c13b550

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 89 + - 62 col0 FROM tab0 GROUP BY tab0.col0
----
27

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 + - tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT + - 83 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-2158
-3569
-6889

query I rowsort
SELECT - 84 FROM tab2 AS cor0 GROUP BY col1
----
-84
-84
-84

query I rowsort
SELECT ALL - tab1.col1 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-7495
SELECT + cor0.col0 DIV - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7495
SELECT + cor0.col0 / - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col2 col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-7497
SELECT - tab0.col0 DIV 36 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-7497
SELECT - tab0.col0 / 36 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1
-2
0

query I rowsort
SELECT - 90 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-90
-90
-90

query I rowsort
SELECT DISTINCT + 98 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 40 col0 FROM tab2 GROUP BY col2
----
40
40
40

query I rowsort
SELECT - 85 FROM tab0 GROUP BY tab0.col0
----
-85
-85
-85

query I rowsort
SELECT DISTINCT 33 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
33

query I rowsort
SELECT 3 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT ALL - - 24 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
24
24

query I rowsort
SELECT ALL col0 - - cor0.col0 * - col0 FROM tab0 cor0 GROUP BY col0
----
-1806
-650
-6806

query I rowsort
SELECT tab1.col0 * - tab1.col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-462
-6642
-756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * 33 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1452
1881
198

onlyif mysql # DIV for integer division: 
query I rowsort label-7508
SELECT ALL + cor0.col2 DIV 2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
22
35
4

skipif mysql # not compatible
query I rowsort label-7508
SELECT ALL + cor0.col2 / 2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
22
35
4

query I rowsort
SELECT + 28 AS col0 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
28
28
28

query I rowsort
SELECT + cor0.col1 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT - cor0.col2 * 18 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1422
-432
-684

query I rowsort
SELECT + - 53 FROM tab2 GROUP BY tab2.col2
----
-53
-53
-53

query I rowsort
SELECT cor0.col0 + + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT 21 FROM tab0 AS cor0 GROUP BY cor0.col0
----
21

query I rowsort
SELECT DISTINCT + 0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT 28 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-10
-51
4

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + 70 + + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
115
141
78

query I rowsort
SELECT DISTINCT 2 + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
60
81
89

query I rowsort
SELECT cor1.col0 * 60 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
5460
5520
900

query I rowsort
SELECT DISTINCT + tab0.col2 * 40 FROM tab0 GROUP BY col2
----
1520
3160
960

query I rowsort
SELECT DISTINCT 67 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
112
138
75

query I rowsort
SELECT ALL - - 14 FROM tab0 GROUP BY tab0.col0
----
14
14
14

query I rowsort
SELECT DISTINCT col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + 57 * col1 FROM tab0 AS cor0 GROUP BY col1
----
0
4617

query I rowsort
SELECT + col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT - cor0.col0 + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + - 37 * - 92 FROM tab1 GROUP BY col2
----
3404
3404
3404

query I rowsort
SELECT DISTINCT - 74 AS col2 FROM tab0 GROUP BY tab0.col0
----
-74

query I rowsort
SELECT DISTINCT - 57 * tab2.col0 - - 20 AS col0 FROM tab2 GROUP BY tab2.col0
----
-5167
-5224
-835

query I rowsort
SELECT DISTINCT - 21 FROM tab2 GROUP BY tab2.col0
----
-21

query I rowsort
SELECT - 36 FROM tab2 cor0 GROUP BY cor0.col0
----
-36
-36
-36

query I rowsort
SELECT ALL - - 71 - - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
115
128
77

query I rowsort
SELECT col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
118
122
82

query I rowsort
SELECT + cor0.col0 + NULLIF ( cor0.col1, cor0.col1 * - col0 + - 71 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
133
150
76

query I rowsort
SELECT ALL 50 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
50
50
50

query I rowsort
SELECT ALL - - 3 AS col0 FROM tab2 GROUP BY tab2.col2
----
3
3
3

query I rowsort
SELECT ALL + 95 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2, cor1.col2
----
95
95
95

query I rowsort
SELECT ALL - - 4 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
324

query I rowsort
SELECT + 18 * 72 - + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1204
1205
1281

query I rowsort
SELECT + cor0.col1 * - 51 + - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-2326
-2935
-328

query I rowsort
SELECT ALL + 81 AS col2 FROM tab0 GROUP BY tab0.col1
----
81
81

query I rowsort
SELECT ALL + 31 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
31
31
31

query I rowsort
SELECT DISTINCT - 49 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 94 + 3 col1 FROM tab0 GROUP BY tab0.col2
----
97
97
97

query I rowsort
SELECT - 34 AS col2 FROM tab2 GROUP BY tab2.col0
----
-34
-34
-34

onlyif mysql # DIV for integer division: 
query I rowsort label-7548
SELECT 48 DIV col2 + + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

skipif mysql # not compatible
query I rowsort label-7548
SELECT 48 / col2 + + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL 76 AS col0 FROM tab2 GROUP BY tab2.col1
----
76
76
76

query I rowsort
SELECT ALL ( - 55 ) FROM tab0 GROUP BY tab0.col2
----
-55
-55
-55

query I rowsort
SELECT ALL - 30 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-30
-30
-30

query I rowsort
SELECT - col1 AS col0 FROM tab0 cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT 72 - - 7 FROM tab2 GROUP BY tab2.col0
----
79
79
79

query I rowsort
SELECT - 33 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-33
-33
-33

query I rowsort
SELECT 25 + + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
106
25

query I rowsort
SELECT ALL cor0.col1 * col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT col1 + 93 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
134
152
154

query I rowsort
SELECT COALESCE ( + 20, - cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 15 * 46 col1 FROM tab0 GROUP BY tab0.col2
----
-690
-690
-690

query I rowsort
SELECT ALL + cor0.col1 * - 16 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1296
0

query I rowsort
SELECT - cor0.col2 * cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-3364
-6241
-7569

query I rowsort
SELECT col0 + 42 FROM tab1 GROUP BY tab1.col0
----
124
64
70

query I rowsort
SELECT + 82 AS col2 FROM tab1 GROUP BY tab1.col0
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 59 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 94 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
94
94
94

query I rowsort
SELECT + cor0.col0 * + 4 FROM tab1 AS cor0 GROUP BY cor0.col0
----
112
328
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( - tab1.col1 ) col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT - col2 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - + tab0.col0 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT tab1.col0 - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT DISTINCT - - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL 27 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
27
27
27

query I rowsort
SELECT ALL + 6 AS col1 FROM tab0 GROUP BY tab0.col1
----
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col1 * + tab0.col1 + 32 col2 FROM tab0 GROUP BY tab0.col1
----
-6529
32

query I rowsort
SELECT ALL - 48 FROM tab2 GROUP BY tab2.col2
----
-48
-48
-48

query I rowsort
SELECT DISTINCT + 6 AS col1 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + cor0.col2 * - 47 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2115
-3337
-376

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 89 col2 FROM tab1 GROUP BY tab1.col0
----
-89
-89
-89

query I rowsort
SELECT ALL - tab0.col2 * 14 FROM tab0 GROUP BY tab0.col2
----
-1106
-336
-532

query I rowsort
SELECT DISTINCT tab1.col2 * 35 + tab1.col2 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
344
3600
7526

query I rowsort
SELECT 50 FROM tab0 GROUP BY col0
----
50
50
50

query I rowsort
SELECT - + 0 * 93 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT 26 FROM tab2 GROUP BY tab2.col0
----
26
26
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 91 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
91
91
91

query I rowsort
SELECT DISTINCT 5 * tab2.col1 + + col1 FROM tab2 GROUP BY tab2.col1
----
246
354
366

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col2 col0 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NULL
----
-45
-71
-8

query I rowsort
SELECT DISTINCT tab2.col1 AS col1 FROM tab2 WHERE NULL BETWEEN tab2.col0 * col0 + col0 AND col1 GROUP BY tab2.col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 27 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
27
27
27

query I rowsort
SELECT - 25 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-25
-25
-25

query I rowsort
SELECT + col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * cor0.col2 col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
1305
5336
7189

query I rowsort
SELECT DISTINCT - - 17 AS col0 FROM tab0 GROUP BY tab0.col0
----
17

query I rowsort
SELECT DISTINCT + + 10 FROM tab2 GROUP BY tab2.col2
----
10

query I rowsort
SELECT DISTINCT - 79 FROM tab0 GROUP BY tab0.col2
----
-79

query I rowsort
SELECT DISTINCT + col1 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT + 0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT 11 + cor0.col2 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, col2, cor0.col2
----
1043
2065
3165

query I rowsort
SELECT 3 + cor0.col2 * 15 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1188
1308
873

query I rowsort
SELECT ALL NULLIF ( - cor0.col1, 8 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT - - 16 * + 84 AS col2 FROM tab1 GROUP BY tab1.col0
----
1344
1344
1344

query I rowsort
SELECT DISTINCT + - tab1.col0 + - tab1.col0 FROM tab1 GROUP BY col0
----
-164
-44
-56

query I rowsort
SELECT + + 35 * tab0.col2 + + 6 AS col2 FROM tab0 GROUP BY tab0.col2
----
1336
2771
846

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 79 col2 FROM tab2 GROUP BY tab2.col2
----
79
79
79

query I rowsort
SELECT DISTINCT 45 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
45

query I rowsort
SELECT DISTINCT 40 AS col2 FROM tab2 GROUP BY tab2.col1
----
40

query I rowsort
SELECT 28 * + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
2268

query I rowsort
SELECT DISTINCT + - 51 FROM tab0 GROUP BY tab0.col0
----
-51

query I rowsort
SELECT DISTINCT - 19 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
-1121
-1159
-779

query I rowsort
SELECT DISTINCT cor0.col1 - ( 99 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-38
-40
-58

query I rowsort
SELECT - cor0.col1 - - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0
0

query I rowsort
SELECT - cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT + 85 AS col2 FROM tab0 GROUP BY tab0.col2
----
85

query I rowsort
SELECT ALL - 15 FROM tab1 GROUP BY col0
----
-15
-15
-15

query I rowsort
SELECT DISTINCT + + 4 FROM tab2 GROUP BY tab2.col1
----
4

query I rowsort
SELECT + 97 + - 43 FROM tab0 GROUP BY tab0.col0
----
54
54
54

onlyif mysql # DIV for integer division: 
query I rowsort label-7619
SELECT ALL - 65 + cor0.col2 DIV - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-66
-66
-66

skipif mysql # not compatible
query I rowsort label-7619
SELECT ALL - 65 + cor0.col2 / - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-66
-66
-66

query I rowsort
SELECT DISTINCT - 85 AS col1 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0
----
-85

query I rowsort
SELECT 41 AS col0 FROM tab0 GROUP BY tab0.col0
----
41
41
41

query I rowsort
SELECT cor0.col1 * col2 + 83 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2027
83
83

query I rowsort
SELECT ALL col1 * + NULLIF ( - 2 * - 9, + cor0.col1 * cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col1
----
1026
108
792

query I rowsort
SELECT - 96 FROM tab0 GROUP BY tab0.col2
----
-96
-96
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 5 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
5
5
5

query I rowsort
SELECT 22 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
22
22
22

onlyif mysql # DIV for integer division: 
query I rowsort label-7627
SELECT ALL col0 DIV - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7627
SELECT ALL col0 / - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + 73 * + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1898
3139
6059

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 87 col0 FROM tab0 GROUP BY tab0.col1
----
-87
-87

query I rowsort
SELECT col2 * col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT 10 * 7 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
70
70
70

query I rowsort
SELECT ALL - + 64 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-64
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 7 col1 FROM tab0 GROUP BY tab0.col0
----
7
7
7

query I rowsort
SELECT - cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7635
SELECT + 91 DIV cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1
15
2

skipif mysql # not compatible
query I rowsort label-7635
SELECT + 91 / cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1
15
2

query I rowsort
SELECT + 26 FROM tab1 cor0 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT cor0.col1 + + 63 FROM tab0 AS cor0 GROUP BY col1
----
144
63

query I rowsort
SELECT + 84 - cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
46
5
60

query I rowsort
SELECT DISTINCT - ( - tab0.col1 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 93 col0 FROM tab1 GROUP BY tab1.col1
----
-93
-93
-93

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
41
59
61

query I rowsort
SELECT ALL - tab1.col0 * - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT - 12 + 2 FROM tab0 GROUP BY tab0.col1
----
-10
-10

query I rowsort
SELECT ALL - 27 AS col2 FROM tab0 GROUP BY tab0.col2
----
-27
-27
-27

query I rowsort
SELECT DISTINCT - col2 + + tab0.col2 * 34 FROM tab0 GROUP BY col2
----
1254
2607
792

query I rowsort
SELECT - 79 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-79
-79
-79

query I rowsort
SELECT + 32 FROM tab0 AS cor0 GROUP BY cor0.col0
----
32
32
32

onlyif mysql # DIV for integer division: 
query I rowsort label-7648
SELECT - tab2.col0 DIV - 85 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7648
SELECT - tab2.col0 / - 85 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
1
1

query I rowsort
SELECT DISTINCT 16 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 * - ( 67 ) col1 FROM tab1 GROUP BY tab1.col0
----
-1474
-1876
-5494

query I rowsort
SELECT col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
1849
676
6889

query I rowsort
SELECT DISTINCT - + tab1.col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 93 col2 FROM tab1 GROUP BY tab1.col2
----
93
93
93

query I rowsort
SELECT ALL tab2.col2 * + tab2.col2 FROM tab2 GROUP BY col2 HAVING ( + tab2.col2 ) IS NOT NULL OR NULL IS NOT NULL
----
3364
6241
7569

query I rowsort
SELECT DISTINCT 19 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
19

query I rowsort
SELECT - + 83 AS col1 FROM tab0 GROUP BY tab0.col2
----
-83
-83
-83

query I rowsort
SELECT DISTINCT + + 44 FROM tab0 GROUP BY tab0.col0
----
44

query I rowsort
SELECT ALL - - 60 AS col0 FROM tab1 GROUP BY tab1.col2
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + - cor0.col1 col2 FROM tab0 cor0 GROUP BY cor0.col1, col1
----
0
0

query I rowsort
SELECT DISTINCT - 15 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-15

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 38, cor0.col1, col0 + NULLIF ( cor0.col1, + cor0.col2 ) * 74 ) FROM tab2 cor0 GROUP BY cor0.col1
----
-38
-38
-38

query I rowsort
SELECT ALL + 90 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
116
133
173

query I rowsort
SELECT ALL - + tab1.col2 * + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT + 87 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT ALL 12 FROM tab2 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT - 62 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-62
-62
-62

query I rowsort
SELECT + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 col1 FROM tab2 GROUP BY col2 HAVING NULL > tab2.col2
----

query I rowsort
SELECT DISTINCT - + tab0.col2 + + 82 FROM tab0 GROUP BY tab0.col2
----
3
44
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 33 - - 1 col1 FROM tab0 GROUP BY tab0.col2
----
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + 18 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
101
44
61

query I rowsort
SELECT + 92 + - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
1
77

query I rowsort
SELECT DISTINCT 78 * 58 FROM tab0 AS cor0 GROUP BY col0
----
4524

onlyif mysql # DIV for integer division: 
query I rowsort label-7674
SELECT DISTINCT cor0.col0 DIV 18 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
1
2
4

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7674
SELECT DISTINCT cor0.col0 / 18 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
1
2
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 66 + cor0.col1 * cor0.col1 col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
66
6627

query I rowsort
SELECT ALL - 7 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
-7
-7
-7

query I rowsort
SELECT ALL + tab1.col0 - - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT DISTINCT + 89 + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
170
89

query I rowsort
SELECT ALL - col0 * col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT - 15 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15

query I rowsort
SELECT DISTINCT - 16 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-16

onlyif mysql # DIV for integer division: 
query I rowsort label-7682
SELECT DISTINCT - 87 DIV - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1
2

skipif mysql # not compatible
query I rowsort label-7682
SELECT DISTINCT - 87 / - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab1.col2 col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + tab2.col0 * ( + 64 ) FROM tab2 GROUP BY col0
----
5824
5888
960

query I rowsort
SELECT ALL - - tab2.col1 * tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
0
81

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
182
184
30

query I rowsort
SELECT DISTINCT + cor0.col2 - cor0.col1 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
2436
4740
5394

query I rowsort
SELECT DISTINCT - ( - tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT 58 * - col0 FROM tab1 GROUP BY tab1.col0
----
-1276
-1624
-4756

onlyif mysql # DIV for integer division: 
query I rowsort label-7691
SELECT ALL + + 23 DIV + 43 AS col1 FROM tab2 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7691
SELECT ALL + + 23 / + 43 AS col1 FROM tab2 GROUP BY col0
----
0
0
0

query I rowsort
SELECT + ( cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-506
-6806
-812

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 col0 FROM tab0 cor0 GROUP BY cor0.col1
----
74
74

query I rowsort
SELECT DISTINCT 66 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
6006
6072
990

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-7698
SELECT DISTINCT 20 DIV - 34 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-7698
SELECT DISTINCT 20 / - 34 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT ALL + tab0.col2 * tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT 32 FROM tab0 cor0 GROUP BY col2
----
32
32
32

query I rowsort
SELECT - 51 FROM tab1 AS cor0 GROUP BY col2
----
-51
-51
-51

query I rowsort
SELECT DISTINCT + 91 * + 50 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4550

query I rowsort
SELECT tab1.col1 + + 79 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
123
136
85

query I rowsort
SELECT cor0.col1 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2, cor0.col0
----
2378
4661
5307

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col2 * 64 col1 FROM tab2 GROUP BY tab2.col2
----
-3712
-5056
-5568

query I rowsort
SELECT DISTINCT - col0 * 27 + - col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1185
-2279
-781

query I rowsort
SELECT DISTINCT tab1.col1 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT 90 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
90
90
90

query I rowsort
SELECT ALL - 67 FROM tab1 GROUP BY tab1.col1
----
-67
-67
-67

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 17 FROM tab0 GROUP BY tab0.col2
----
17

query I rowsort
SELECT ALL - 94 AS col0 FROM tab1 GROUP BY tab1.col2
----
-94
-94
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 32 col0 FROM tab1 GROUP BY tab1.col2
----
32
32
32

query I rowsort
SELECT ALL - 27 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1107
1593
1647

query I rowsort
SELECT ALL 84 * tab1.col1 + 63 FROM tab1 GROUP BY tab1.col1
----
3759
4851
567

query I rowsort
SELECT ALL - 8 * + 20 FROM tab1 GROUP BY tab1.col1
----
-160
-160
-160

query I rowsort
SELECT DISTINCT - col2 - - col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 1 * cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + tab0.col2 * 9 FROM tab0 GROUP BY tab0.col2
----
216
342
711

query I rowsort
SELECT + 12 AS col0 FROM tab1 GROUP BY col1
----
12
12
12

query I rowsort
SELECT ALL - 1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
-1
-1
-1

query I rowsort
SELECT - cor0.col1 * - 59 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4779

query I rowsort
SELECT DISTINCT - col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT + 39 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * 38 col1 FROM tab2 GROUP BY tab2.col1
----
-1558
-2242
-2318

query I rowsort
SELECT DISTINCT tab2.col0 + + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 8 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
8

query I rowsort
SELECT ALL + ( + cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT ALL ( cor0.col0 ) FROM tab2 cor0 GROUP BY col1, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab1 cor0 CROSS JOIN tab0 GROUP BY cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col0 col1 FROM tab0 WHERE ( + tab0.col2 ) IS NOT NULL GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL IS NOT NULL
----
0
81

query I rowsort
SELECT ALL - 23 - 54 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

query I rowsort
SELECT DISTINCT - cor0.col0 + 49 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-33
21
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + 28 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-28
-28
-28

query I rowsort
SELECT + tab2.col0 * 77 AS col2 FROM tab2 GROUP BY tab2.col0
----
1155
7007
7084

onlyif mysql # DIV for integer division: 
query I rowsort label-7740
SELECT + - 76 DIV 89 AS col2 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7740
SELECT + - 76 / 89 AS col2 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 99 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT cor0.col1 + + 44 FROM tab1 AS cor0 GROUP BY cor0.col1
----
101
50
88

query I rowsort
SELECT DISTINCT - 82 FROM tab0 GROUP BY tab0.col2
----
-82

query I rowsort
SELECT + + 63 AS col1 FROM tab0 GROUP BY tab0.col0
----
63
63
63

query I rowsort
SELECT DISTINCT tab2.col1 + 62 AS col0 FROM tab2 GROUP BY tab2.col1
----
103
121
123

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
-6561
0
0

query I rowsort
SELECT ALL - 2 FROM tab0 cor0 GROUP BY cor0.col0
----
-2
-2
-2

query I rowsort
SELECT + 53 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
4293

query I rowsort
SELECT 62 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
62
62
62

query I rowsort
SELECT col0 * 33 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1419
2739
858

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + 70 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-3150
-4970
-560

query I rowsort
SELECT - tab0.col0 * + 63 FROM tab0 GROUP BY tab0.col0
----
-1638
-2709
-5229

query I rowsort
SELECT ( + 74 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
74
74
74

query I rowsort
SELECT + cor0.col1 - + cor0.col0 * - 1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
126
28
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 4 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
4

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-7757
SELECT + tab2.col1 DIV - CAST( + tab2.col1 AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7757
SELECT + tab2.col1 / - CAST ( + tab2.col1 AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

query I rowsort
SELECT + tab1.col2 + 70 FROM tab1 GROUP BY tab1.col2
----
115
141
78

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7759
SELECT CAST( NULL AS SIGNED ) FROM tab1 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7759
SELECT CAST ( NULL AS INTEGER ) FROM tab1 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT 77 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT - 77 * cor0.col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col2, cor0.col0
----
-2002
-3311
-6391

query I rowsort
SELECT 39 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
39
39
39

query I rowsort
SELECT DISTINCT 21 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
21

query I rowsort
SELECT 57 FROM tab1 GROUP BY tab1.col2
----
57
57
57

query I rowsort
SELECT - 41 AS col1 FROM tab0 GROUP BY tab0.col2
----
-41
-41
-41

query I rowsort
SELECT ALL 89 AS col0 FROM tab2 GROUP BY tab2.col0
----
89
89
89

query I rowsort
SELECT DISTINCT - + tab1.col2 - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-142
-16
-90

query I rowsort
SELECT - + tab1.col0 - 66 AS col0 FROM tab1 GROUP BY tab1.col0
----
-148
-88
-94

query I rowsort
SELECT - 37 FROM tab1 GROUP BY tab1.col1
----
-37
-37
-37

query I rowsort
SELECT - 77 FROM tab2 cor0 GROUP BY cor0.col2
----
-77
-77
-77

query I rowsort
SELECT DISTINCT 12 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
12

query I rowsort
SELECT ALL - cor0.col1 * 12 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-528
-684
-72

query I rowsort
SELECT ALL + 26 FROM tab1 AS cor0 GROUP BY cor0.col1
----
26
26
26

onlyif mysql # DIV for integer division: 
query I rowsort label-7776
SELECT 31 DIV 93 + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-7776
SELECT 31 / 93 + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + 11 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-13
-27
-68

query I rowsort
SELECT ALL - 30 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-30
-30
-30

query I rowsort
SELECT 31 - + col1 FROM tab0 GROUP BY tab0.col1
----
-50
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab1.col2 * + tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT - cor0.col0 * - cor0.col0 + 37 FROM tab2 AS cor0 GROUP BY cor0.col0
----
262
8318
8501

query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 + + 67 FROM tab0 cor0 GROUP BY cor0.col2
----
1511
6308
643

query I rowsort
SELECT DISTINCT - - ( - 1 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
-1

query I rowsort
SELECT DISTINCT - - 32 AS col0 FROM tab1 GROUP BY tab1.col2
----
32

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7786
SELECT ALL - CAST( NULL AS SIGNED ) + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7786
SELECT ALL - CAST ( NULL AS INTEGER ) + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - tab0.col0 + - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

query I rowsort
SELECT DISTINCT - 73 AS col2 FROM tab0 GROUP BY tab0.col0
----
-73

query I rowsort
SELECT DISTINCT 96 FROM tab2 GROUP BY tab2.col0
----
96

query I rowsort
SELECT + 14 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
14
14
14

query I rowsort
SELECT 29 AS col1 FROM tab2 cor0 GROUP BY col2, cor0.col0, cor0.col0
----
29
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 84 col1 FROM tab1 GROUP BY col0
----
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 25 col1 FROM tab1 GROUP BY tab1.col1
----
25
25
25

query I rowsort
SELECT cor0.col0 * 78 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1185
7189
7268

query I rowsort
SELECT + 26 + 5 AS col2 FROM tab1 GROUP BY tab1.col1
----
31
31
31

query I rowsort
SELECT DISTINCT + 44 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
44

query I rowsort
SELECT ALL + - 90 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-3690
-5310
-5490

query I rowsort
SELECT + 89 FROM tab2 GROUP BY tab2.col0
----
89
89
89

query I rowsort
SELECT - 62 FROM tab0 GROUP BY tab0.col0
----
-62
-62
-62

query I rowsort
SELECT 81 AS col1 FROM tab2 GROUP BY tab2.col2
----
81
81
81

query I rowsort
SELECT - 38 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
-14
0
41

query I rowsort
SELECT DISTINCT - - ( 72 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
72

onlyif mysql # DIV for integer division: 
query I rowsort label-7803
SELECT ALL + + tab1.col2 DIV tab1.col2 + 46 AS col1 FROM tab1 GROUP BY col2
----
47
47
47

skipif mysql # not compatible
query I rowsort label-7803
SELECT ALL + + tab1.col2 / tab1.col2 + 46 AS col1 FROM tab1 GROUP BY col2
----
47
47
47

query I rowsort
SELECT DISTINCT + 3 * + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
123
177
183

query I rowsort
SELECT DISTINCT + + 51 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-10
-8
10

query I rowsort
SELECT + 59 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
59
59
59

query I rowsort
SELECT ALL + + 13 FROM tab0 GROUP BY tab0.col0
----
13
13
13

query I rowsort
SELECT - col2 - + 43 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-114
-51
-88

query I rowsort
SELECT - 63 FROM tab2 GROUP BY tab2.col0
----
-63
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 7 * 51 col2 FROM tab2 GROUP BY tab2.col0
----
357
357
357

query I rowsort
SELECT + ( col0 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + 22 AS col0 FROM tab1 GROUP BY tab1.col1
----
22

query I rowsort
SELECT DISTINCT + 71 * - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1846
-3053
-5893

query I rowsort
SELECT DISTINCT tab2.col1 - + 29 AS col1 FROM tab2 GROUP BY col1
----
12
30
32

query I rowsort
SELECT DISTINCT + tab2.col1 - 53 AS col1 FROM tab2 GROUP BY tab2.col1
----
-12
6
8

query I rowsort
SELECT ALL 37 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2146
2923
3219

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7817
SELECT - CAST( NULL AS SIGNED ) * 45 AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7817
SELECT - CAST ( NULL AS INTEGER ) * 45 AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 + + 31 FROM tab2 AS cor0 GROUP BY cor0.col0
----
122
123
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor1.col0 col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + tab2.col0 * - col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

onlyif mysql # DIV for integer division: 
query I rowsort label-7821
SELECT 64 DIV cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-7821
SELECT 64 / cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
4

query I rowsort
SELECT + col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 29 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
29
29
29

query I rowsort
SELECT DISTINCT 21 AS col1 FROM tab1 GROUP BY tab1.col2
----
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 87 col2 FROM tab0 GROUP BY tab0.col1
----
87
87

onlyif mysql # DIV for integer division: 
query I rowsort label-7826
SELECT 79 DIV - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-7826
SELECT 79 / - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
0

query I rowsort
SELECT 31 AS col2 FROM tab1 GROUP BY tab1.col0
----
31
31
31

query I rowsort
SELECT + cor0.col0 * 34 + 94 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1556
2916
978

query I rowsort
SELECT DISTINCT + cor0.col2 - 98 * - col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
5742
7821
8613

query I rowsort
SELECT 26 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2, cor1.col0
----
26
26
26

query I rowsort
SELECT DISTINCT - 69 * - tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
1794
2967
5727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col2 col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL + tab2.col2 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-7834
SELECT DISTINCT + - ( - col1 ) DIV - tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
-1

skipif mysql # not compatible
query I rowsort label-7834
SELECT DISTINCT + - ( - col1 ) / - tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
-1

query I rowsort
SELECT - 62 + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-19
-36
21

query I rowsort
SELECT 36 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT ALL + 85 FROM tab0 GROUP BY tab0.col0
----
85
85
85

query I rowsort
SELECT DISTINCT - 31 AS col2 FROM tab2 GROUP BY tab2.col0
----
-31

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
118
122
82

query I rowsort
SELECT - cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT - - tab0.col2 * + 3 AS col2 FROM tab0 GROUP BY tab0.col2
----
114
237
72

query I rowsort
SELECT ALL - tab1.col2 * + 25 FROM tab1 GROUP BY tab1.col2
----
-1125
-1775
-200

query I rowsort
SELECT DISTINCT - cor0.col0 * col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT + cor0.col1 * 36 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
2916

query I rowsort
SELECT DISTINCT 14 + + 42 FROM tab1 GROUP BY tab1.col2
----
56

query I rowsort
SELECT ALL 28 FROM tab0 GROUP BY tab0.col1
----
28
28

query I rowsort
SELECT DISTINCT 34 FROM tab0 cor0 GROUP BY cor0.col0
----
34

query I rowsort
SELECT ALL + - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL cor0.col1 FROM tab2 cor0 GROUP BY col1 HAVING + col1 IS NULL
----

query I rowsort
SELECT col1 * 12 AS col0 FROM tab2 GROUP BY tab2.col1
----
492
708
732

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - col1 * + ( - COALESCE ( - 51, col2 ) * cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-165699
-1836
-98736

query I rowsort
SELECT DISTINCT - 38 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-38

query I rowsort
SELECT ALL + 93 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
93
93

query I rowsort
SELECT col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
15
91
92

query I rowsort
SELECT DISTINCT - - 81 FROM tab0 GROUP BY tab0.col1
----
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT 58 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-23
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 14 + - tab1.col0 * tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
-470
-6710
-770

query I rowsort
SELECT ALL + 85 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3740
-4845
-510

query I rowsort
SELECT DISTINCT + 26 AS col0 FROM tab1 GROUP BY col0
----
26

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT - 20 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-20
-20
-20

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7865
SELECT ALL - CAST( - col0 AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

skipif mysql # not compatible
query I rowsort label-7865
SELECT ALL - CAST ( - col0 AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT 70 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
70
70
70

query I rowsort
SELECT - 85 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-85
-85
-85

query I rowsort
SELECT DISTINCT 55 FROM tab0 AS cor0 GROUP BY cor0.col2
----
55

query I rowsort
SELECT - 0 FROM tab0 GROUP BY col1
----
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT COALESCE ( 0, cor0.col0 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT ALL - 39 * tab0.col2 + 92 FROM tab0 GROUP BY tab0.col2
----
-1390
-2989
-844

query I rowsort
SELECT ALL - - tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT DISTINCT + 62 * - 93 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-5766

query I rowsort
SELECT - 21 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
-21
-21
-21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - - NULLIF ( 24, col0 * + 40 ) FROM tab2 GROUP BY tab2.col0
----
24
24
24

query I rowsort
SELECT - cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL + col2 * tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 7 col2 FROM tab2 GROUP BY tab2.col2
----
-7
-7
-7

query I rowsort
SELECT ALL - - 6 AS col1 FROM tab2, tab2 AS cor0 GROUP BY tab2.col2
----
6
6
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7882
SELECT cor0.col2 + CAST( NULL AS SIGNED ) * col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7882
SELECT cor0.col2 + CAST ( NULL AS INTEGER ) * col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 56 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-56

query I rowsort
SELECT + 84 AS col1 FROM tab1 GROUP BY tab1.col1
----
84
84
84

query I rowsort
SELECT 47 AS col1 FROM tab1 GROUP BY tab1.col1
----
47
47
47

query I rowsort
SELECT ALL + + 48 FROM tab0 GROUP BY tab0.col0
----
48
48
48

query I rowsort
SELECT DISTINCT tab1.col0 * tab1.col0 + - tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING ( - tab1.col0 ) IS NOT NULL OR NULL IS NULL
----
462
6642
756

query I rowsort
SELECT ALL col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7889
SELECT DISTINCT + + CAST( NULL AS SIGNED ) + 2 FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-7889
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) + 2 FROM tab0 GROUP BY tab0.col1
----
NULL

query I rowsort
SELECT DISTINCT 54 * 90 AS col1 FROM tab1 GROUP BY tab1.col1
----
4860

query I rowsort
SELECT DISTINCT + 73 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
73

query I rowsort
SELECT ALL + 27 FROM tab2 GROUP BY tab2.col1
----
27
27
27

query I rowsort
SELECT ( 52 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
52
52
52

query I rowsort
SELECT - - 4 FROM tab0 GROUP BY tab0.col0
----
4
4
4

query I rowsort
SELECT 2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
2
2
2

query I rowsort
SELECT 4 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col1 - 10 col1 FROM tab2 GROUP BY tab2.col1
----
-51
-69
-71

query I rowsort
SELECT ALL 67 + 84 FROM tab2 GROUP BY tab2.col1
----
151
151
151

query I rowsort
SELECT cor0.col0 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL - cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 3 col1 FROM tab2 GROUP BY tab2.col2
----
-3
-3
-3

query I rowsort
SELECT ALL ( - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - 77 * 80 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-6160
-6160
-6160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT ALL 87 * tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
2262
3741
7221

query I rowsort
SELECT ALL + 83 * - 59 AS col2 FROM tab1 GROUP BY tab1.col0
----
-4897
-4897
-4897

query I rowsort
SELECT + cor0.col2 * col2 FROM tab1 cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT 66 * 92 FROM tab0 AS cor0 GROUP BY cor0.col2
----
6072
6072
6072

query I rowsort
SELECT DISTINCT + 13 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1027
312
494

query I rowsort
SELECT ( tab2.col0 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL - 58 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-58
-58
-58

query I rowsort
SELECT DISTINCT 94 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
94

query I rowsort
SELECT 56 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
56
56
56

query I rowsort
SELECT DISTINCT + tab2.col0 * tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT tab1.col1 + 55 AS col1 FROM tab1 GROUP BY tab1.col1
----
112
61
99

query I rowsort
SELECT ALL 82 AS col1 FROM tab0 GROUP BY tab0.col2
----
82
82
82

query I rowsort
SELECT DISTINCT - 92 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2024
-2576
-7544

query I rowsort
SELECT + cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT - tab0.col0 * + 88 FROM tab0 GROUP BY tab0.col0
----
-2288
-3784
-7304

query I rowsort
SELECT DISTINCT - - 89 FROM tab0 GROUP BY tab0.col0
----
89

query I rowsort
SELECT 89 FROM tab0 AS cor0 GROUP BY cor0.col1
----
89
89

query I rowsort
SELECT + tab1.col1 * - tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab0 cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT + 39 FROM tab1 GROUP BY tab1.col1
----
39
39
39

query I rowsort
SELECT ( 99 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT 3 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
123
177
183

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 col1 FROM tab1 GROUP BY col0
----
47
47
47

query I rowsort
SELECT tab0.col2 + + 49 AS col0 FROM tab0 GROUP BY tab0.col2
----
128
73
87

query I rowsort
SELECT cor0.col2 + - 78 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-33
-7
-70

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
22
28
82

query I rowsort
SELECT + - ( + tab0.col2 ) * tab0.col2 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT + tab0.col2 - tab0.col2 FROM tab0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 52 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
2288
2964
312

onlyif mysql # DIV for integer division: 
query I rowsort label-7934
SELECT DISTINCT cor0.col2 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-7934
SELECT DISTINCT cor0.col2 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
1

query I rowsort
SELECT ALL - 49 * tab2.col0 FROM tab2 GROUP BY col0
----
-4459
-4508
-735

query I rowsort
SELECT - + tab0.col0 * - col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT - + col2 AS col0 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT - - 74 + 51 FROM tab0 GROUP BY tab0.col2
----
125
125
125

query I rowsort
SELECT ALL 15 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1365
1380
225

query I rowsort
SELECT - + tab2.col1 * 80 AS col1 FROM tab2 GROUP BY tab2.col1
----
-3280
-4720
-4880

query I rowsort
SELECT DISTINCT 46 * - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-4186
-4232
-690

query I rowsort
SELECT DISTINCT - 27 FROM tab0 AS cor0 GROUP BY col1
----
-27

query I rowsort
SELECT 22 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
22
22
22

query I rowsort
SELECT + - 86 AS col0 FROM tab1 GROUP BY tab1.col2
----
-86
-86
-86

query I rowsort
SELECT 96 * 79 AS col0 FROM tab2 GROUP BY tab2.col2
----
7584
7584
7584

query I rowsort
SELECT - COALESCE ( + cor0.col2, - cor0.col1, + COALESCE ( NULLIF ( col1, - cor0.col2 * cor0.col2 ), + cor0.col2 ) * cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT - 49 AS col2 FROM tab2 GROUP BY tab2.col1
----
-49
-49
-49

onlyif mysql # DIV for integer division: 
query I rowsort label-7948
SELECT ALL - 52 * + COALESCE ( + col2, + 47 DIV + 25 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-2340
-3692
-416

skipif mysql # not compatible
query I rowsort label-7948
SELECT ALL - 52 * + COALESCE ( + col2, + 47 / + 25 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-2340
-3692
-416

query I rowsort
SELECT - + 60 FROM tab1 GROUP BY tab1.col0
----
-60
-60
-60

query I rowsort
SELECT DISTINCT 43 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
43

query I rowsort
SELECT - 76 FROM tab1 AS cor0 GROUP BY col0, cor0.col1, cor0.col1
----
-76
-76
-76

query I rowsort
SELECT DISTINCT ( - cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL - 77 AS col2 FROM tab0 GROUP BY tab0.col1
----
-77
-77

query I rowsort
SELECT - - 46 FROM tab1 GROUP BY tab1.col2
----
46
46
46

onlyif mysql # DIV for integer division: 
query I rowsort label-7955
SELECT DISTINCT - 43 DIV col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
0

skipif mysql # not compatible
query I rowsort label-7955
SELECT DISTINCT - 43 / col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
0

query I rowsort
SELECT CASE - cor0.col0 WHEN - 12 THEN NULL WHEN - cor0.col0 THEN - cor0.col0 ELSE + cor0.col0 * + 4 END AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL 60 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1440
2280
4740

query I rowsort
SELECT + cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col2
----
9 values hashing to ec1f9c518baf89f5f85dda11171d4494

query I rowsort
SELECT 93 AS col1 FROM tab2 GROUP BY tab2.col0
----
93
93
93

query I rowsort
SELECT + 90 AS col2 FROM tab1 GROUP BY tab1.col2
----
90
90
90

query I rowsort
SELECT DISTINCT + 94 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
2444
4042
7802

query I rowsort
SELECT DISTINCT - cor0.col2 * 8 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-464
-632
-696

query I rowsort
SELECT + 82 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
82
82

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1, cor1.col0
----
9 values hashing to c3fce74ead130ec1d9dde8274d706e34

query I rowsort
SELECT 45 * + col0 FROM tab2 GROUP BY tab2.col0
----
4095
4140
675

query I rowsort
SELECT - col2 + cor0.col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-17
-20
-26

query I rowsort
SELECT 11 AS col0 FROM tab0 GROUP BY tab0.col1
----
11
11

query I rowsort
SELECT DISTINCT 94 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
5452
7426
8178

query I rowsort
SELECT col2 AS col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT 76 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
76
76
76

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT + cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT 79 * + 62 AS col0 FROM tab0 GROUP BY tab0.col2
----
4898
4898
4898

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 37 col2 FROM tab2 GROUP BY tab2.col0
----
37
37
37

onlyif mysql # DIV for integer division: 
query I rowsort label-7975
SELECT DISTINCT 25 DIV 64 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-7975
SELECT DISTINCT 25 / 64 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT + 11 FROM tab0 GROUP BY tab0.col0
----
11
11
11

query I rowsort
SELECT DISTINCT + 52 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
52

query I rowsort
SELECT 51 FROM tab1 AS cor0 GROUP BY cor0.col1
----
51
51
51

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7979
SELECT - CAST( NULL AS SIGNED ) * tab0.col1 FROM tab0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7979
SELECT - CAST ( NULL AS INTEGER ) * tab0.col1 FROM tab0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT ALL - + 67 FROM tab0 GROUP BY col0
----
-67
-67
-67

query I rowsort
SELECT 68 FROM tab2 AS cor0 GROUP BY col1
----
68
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 + tab2.col0 col1 FROM tab2 GROUP BY col0
----
182
184
30

query I rowsort
SELECT + 96 * 88 AS col0 FROM tab0 GROUP BY tab0.col2
----
8448
8448
8448

query I rowsort
SELECT ( - tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT - 67 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
-67
-67
-67

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7986
SELECT + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7986
SELECT + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 97 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-97

query I rowsort
SELECT DISTINCT 35 * - 75 AS col1 FROM tab2 GROUP BY tab2.col1
----
-2625

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + + 0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT - 29 + - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-120
-121
-44

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7992
SELECT + CAST( 5 AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
5
5
5

skipif mysql # not compatible
query I rowsort label-7992
SELECT + CAST ( 5 AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
5
5
5

query I rowsort
SELECT DISTINCT - cor0.col0 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
1596
3608

query I rowsort
SELECT col2 + tab0.col2 AS col2 FROM tab0 WHERE - tab0.col2 NOT IN ( col1 + + tab0.col0 ) GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT col0 + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL tab0.col1 - + col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT tab1.col2 + 10 FROM tab1 GROUP BY tab1.col2
----
18
55
81

query I rowsort
SELECT col0 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL - + col0 - + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

query I rowsort
SELECT DISTINCT ( 89 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
89

query I rowsort
SELECT - 37 FROM tab2 GROUP BY tab2.col2
----
-37
-37
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
56
56
56

query I rowsort
SELECT 88 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
88
88
88

query I rowsort
SELECT DISTINCT + 74 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
74

query I rowsort
SELECT - 32 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-1376
-2656
-832

query I rowsort
SELECT - + tab2.col0 * 85 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1275
-7735
-7820

query I rowsort
SELECT + + 34 FROM tab2 GROUP BY col0
----
34
34
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 35 - cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-47
13
7

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 20 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
20
20
20

query I rowsort
SELECT 10 FROM tab2 GROUP BY tab2.col1
----
10
10
10

onlyif mysql # DIV for integer division: 
query I rowsort label-8012
SELECT DISTINCT cor0.col2 DIV 45 FROM tab2 cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-8012
SELECT DISTINCT cor0.col2 / 45 FROM tab2 cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - tab2.col0 * tab2.col0 + - COALESCE ( - 11, - tab2.col0, ( NULLIF ( tab2.col0, - tab2.col1 * 65 ) ) ) AS col1 FROM tab2 GROUP BY tab2.col0
----
-214
-8270
-8453

query I rowsort
SELECT + cor0.col0 * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT + cor0.col2 * + col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT tab1.col2 - + 18 FROM tab1 GROUP BY tab1.col2
----
-10
27
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT 33 + - 41 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-8
-8
-8

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT ALL + - tab1.col0 * + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT col2 * cor0.col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
1305
5336
7189

onlyif mysql # DIV for integer division: 
query I rowsort label-8024
SELECT DISTINCT + 39 DIV + 42 FROM tab0 GROUP BY col2
----
0

skipif mysql # not compatible
query I rowsort label-8024
SELECT DISTINCT + 39 / + 42 FROM tab0 GROUP BY col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-8025
SELECT 86 DIV - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-2

skipif mysql # not compatible
query I rowsort label-8025
SELECT 86 / - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-2

query I rowsort
SELECT - 49 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-2156
-2793
-294

query I rowsort
SELECT 88 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
110
116
170

query I rowsort
SELECT DISTINCT 82 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
82

query I rowsort
SELECT - 9 FROM tab0 GROUP BY tab0.col1
----
-9
-9

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT 46 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
46

query I rowsort
SELECT ALL - 88 AS col2 FROM tab2 GROUP BY tab2.col0
----
-88
-88
-88

query I rowsort
SELECT 87 FROM tab1 AS cor0 GROUP BY col2
----
87
87
87

query I rowsort
SELECT ALL 11 * tab0.col0 FROM tab0 GROUP BY col0
----
286
473
913

query I rowsort
SELECT 52 AS col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
52
52
52

query I rowsort
SELECT - 14 AS col0 FROM tab1 GROUP BY tab1.col1
----
-14
-14
-14

query I rowsort
SELECT + ( cor0.col0 ) AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - 10 AS col1 FROM tab0 GROUP BY tab0.col1
----
-10
-10

query I rowsort
SELECT - 84 FROM tab1 GROUP BY tab1.col0
----
-84
-84
-84

query I rowsort
SELECT ALL NULLIF ( tab2.col2, tab2.col2 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 69 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor1.col0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 + col0 col1 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL - 37 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-37
-37
-37

query I rowsort
SELECT - ( cor0.col0 ) + 19 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-24
-64
-7

query I rowsort
SELECT DISTINCT - 76 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-3116
-4484
-4636

query I rowsort
SELECT ALL - tab2.col2 + 26 FROM tab2 GROUP BY tab2.col2
----
-32
-53
-61

query I rowsort
SELECT 57 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
116
118
98

query I rowsort
SELECT ALL + 14 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT 19 * - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1501
-456
-722

query I rowsort
SELECT - 66 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1584
-2508
-5214

query I rowsort
SELECT - 12 AS col0 FROM tab1 GROUP BY tab1.col0
----
-12
-12
-12

query I rowsort
SELECT DISTINCT + 77 AS col1 FROM tab0 GROUP BY col0
----
77

query I rowsort
SELECT DISTINCT + - tab0.col1 + - tab0.col1 FROM tab0 GROUP BY col1
----
-162
0

query I rowsort
SELECT - 76 AS col2 FROM tab2 GROUP BY col1
----
-76
-76
-76

query I rowsort
SELECT ALL + col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-8056
SELECT + tab2.col1 DIV tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8056
SELECT + tab2.col1 / tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - tab0.col1 + 5 FROM tab0 GROUP BY tab0.col1
----
-76
5

query I rowsort
SELECT DISTINCT - 41 AS col1 FROM tab1 GROUP BY tab1.col0
----
-41

query I rowsort
SELECT tab0.col2 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-8061
SELECT DISTINCT + 58 DIV + 15 FROM tab2 GROUP BY tab2.col1
----
3

skipif mysql # not compatible
query I rowsort label-8061
SELECT DISTINCT + 58 / + 15 FROM tab2 GROUP BY tab2.col1
----
3

query I rowsort
SELECT - 58 * 50 + 8 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-2892
-2892
-2892

query I rowsort
SELECT ( ( 79 ) ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT 93 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4092
5301
558

query I rowsort
SELECT DISTINCT - 26 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-26

query I rowsort
SELECT col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

onlyif mysql # DIV for integer division: 
query I rowsort label-8067
SELECT ALL - cor0.col0 DIV cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
14
90
91

skipif mysql # not compatible
query I rowsort label-8067
SELECT ALL - cor0.col0 / cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
14
90
91

query I rowsort
SELECT DISTINCT + 38 FROM tab0 AS cor0 GROUP BY cor0.col2
----
38

query I rowsort
SELECT ALL - 10 AS col0 FROM tab1 GROUP BY tab1.col0
----
-10
-10
-10

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8070
SELECT CAST( tab1.col0 AS SIGNED ) col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8070
SELECT CAST ( tab1.col0 AS INTEGER ) col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT - cor0.col0 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * cor0.col1 col1 FROM tab1 AS cor0 GROUP BY col1, col0
----
1936
3249
36

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8073
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8073
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - 70 AS col2 FROM tab2 GROUP BY tab2.col2
----
70

query I rowsort
SELECT + 97 AS col1 FROM tab2 GROUP BY tab2.col1
----
97
97
97

query I rowsort
SELECT DISTINCT - 16 AS col1 FROM tab1 GROUP BY tab1.col2
----
-16

query I rowsort
SELECT ALL + - 3 * + col2 FROM tab2 GROUP BY tab2.col2
----
-174
-237
-261

query I rowsort
SELECT + col0 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT cor0.col2 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + tab1.col2 + - 85 FROM tab1 GROUP BY tab1.col2
----
-14
-40
-77

query I rowsort
SELECT ALL col0 AS col2 FROM tab1 GROUP BY col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT NULLIF ( + col0, - cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - 43 + - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-126
-69
-86

query I rowsort
SELECT - col0 - - 85 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-6
-7
70

query I rowsort
SELECT 69 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
69
69
69

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col1
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-8089
SELECT DISTINCT + tab2.col1 DIV + col1 FROM tab2 GROUP BY tab2.col1
----
1

skipif mysql # not compatible
query I rowsort label-8089
SELECT DISTINCT + tab2.col1 / + col1 FROM tab2 GROUP BY tab2.col1
----
1

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
45
71
8

query I rowsort
SELECT DISTINCT + 17 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
17

query I rowsort
SELECT + ( 1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT ( + 56 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8094
SELECT DISTINCT tab2.col1 + + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-8094
SELECT DISTINCT tab2.col1 + + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-8095
SELECT - tab2.col0 DIV - 40 + + 14 FROM tab2 GROUP BY tab2.col0
----
14
16
16

skipif mysql # not compatible
query I rowsort label-8095
SELECT - tab2.col0 / - 40 + + 14 FROM tab2 GROUP BY tab2.col0
----
14
16
16

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT DISTINCT - 67 FROM tab0 GROUP BY tab0.col2
----
-67

query I rowsort
SELECT cor0.col1 * + 2 + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
132
171
18

query I rowsort
SELECT 13 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
13
13
13

query I rowsort
SELECT DISTINCT 27 FROM tab2 AS cor0 GROUP BY cor0.col0
----
27

query I rowsort
SELECT + 4 * tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
104
172
332

query I rowsort
SELECT - + 99 * col1 - - tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
-4312
-5586
-588

query I rowsort
SELECT DISTINCT - col2 * - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

onlyif mysql # DIV for integer division: 
query I rowsort label-8104
SELECT DISTINCT + 86 DIV - 12 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-7

skipif mysql # not compatible
query I rowsort label-8104
SELECT DISTINCT + 86 / - 12 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-7

query I rowsort
SELECT col0 - 67 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1452
-1848
-5412

query I rowsort
SELECT DISTINCT + cor0.col2 * + 72 + + cor0.col2 * 80 FROM tab0 AS cor0 GROUP BY cor0.col2
----
12008
3648
5776

query I rowsort
SELECT + 52 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT ALL 30 AS col2 FROM tab1 GROUP BY tab1.col1
----
30
30
30

query I rowsort
SELECT 64 FROM tab2 cor0 GROUP BY cor0.col1
----
64
64
64

query I rowsort
SELECT ALL - 0 AS col0 FROM tab1 cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT + - 36 AS col0 FROM tab0 GROUP BY tab0.col0
----
-36
-36
-36

query I rowsort
SELECT ALL + 77 AS col0 FROM tab0 GROUP BY tab0.col2
----
77
77
77

query I rowsort
SELECT + 64 FROM tab1 GROUP BY tab1.col2
----
64
64
64

query I rowsort
SELECT 4 AS col2 FROM tab1 GROUP BY tab1.col2
----
4
4
4

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8115
SELECT ALL + - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8115
SELECT ALL + - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 * + 41 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1558
3239
984

query I rowsort
SELECT ALL 69 AS col2 FROM tab1 GROUP BY col1
----
69
69
69

query I rowsort
SELECT + 72 - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-11
29
46

query I rowsort
SELECT DISTINCT 31 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1271
1829
1891

query I rowsort
SELECT + tab2.col2 + 19 AS col2 FROM tab2 GROUP BY tab2.col2
----
106
77
98

query I rowsort
SELECT + cor0.col0 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-1305
-5336
-7189

query I rowsort
SELECT 12 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT DISTINCT ( 97 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
97

query I rowsort
SELECT ALL + - tab1.col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 72 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
72

query I rowsort
SELECT - 4 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-4
-4
-4

query I rowsort
SELECT + col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT tab2.col1 AS col1 FROM tab2 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
41
59
61

query I rowsort
SELECT DISTINCT + - tab1.col1 * + tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0

query I rowsort
SELECT + 25 + 48 FROM tab0 GROUP BY col1
----
73
73

query I rowsort
SELECT DISTINCT - + 81 AS col2 FROM tab1 GROUP BY col2
----
-81

query I rowsort
SELECT ALL ( - 82 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-82
-82
-82

query I rowsort
SELECT DISTINCT - 15 * 30 FROM tab2 cor0 GROUP BY cor0.col2
----
-450

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8135
SELECT ALL CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8135
SELECT ALL CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - NULLIF ( - 49, tab1.col0 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
49
49
49

query I rowsort
SELECT cor0.col2 * - cor0.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col2, cor0.col2
----
9 values hashing to 600db99e65063fc991b146b1d28093c0

query I rowsort
SELECT DISTINCT + COALESCE ( + col1, tab0.col1 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL + 45 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT DISTINCT - 61 * - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
4941

query I rowsort
SELECT - 38 + - 96 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-2150
-2726
-7910

query I rowsort
SELECT ALL 70 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
70
70
70

query I rowsort
SELECT 75 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
75
75
75

query I rowsort
SELECT DISTINCT 62 AS col1 FROM tab2 GROUP BY tab2.col0
----
62

query I rowsort
SELECT - 32 FROM tab1 GROUP BY tab1.col1
----
-32
-32
-32

query I rowsort
SELECT DISTINCT ( + cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - tab1.col2 * tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT cor1.col2 AS col2 FROM tab2 cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2, cor1.col0
----
45
71
8

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-8151
SELECT tab1.col2 DIV + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8151
SELECT tab1.col2 / + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT tab1.col2 * 69 FROM tab1 GROUP BY tab1.col2
----
3105
4899
552

query I rowsort
SELECT 67 + col2 FROM tab0 AS cor0 GROUP BY col2
----
105
146
91

query I rowsort
SELECT DISTINCT + - 39 AS col1 FROM tab0 GROUP BY tab0.col2
----
-39

query I rowsort
SELECT ALL - 10 * + 57 - - tab2.col2 FROM tab2 GROUP BY col2
----
-483
-491
-512

query I rowsort
SELECT - cor0.col0 * ( 55 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5005
-5060
-825

onlyif mysql # DIV for integer division: 
query I rowsort label-8157
SELECT cor0.col2 DIV cor0.col2 FROM tab0 cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8157
SELECT cor0.col2 / cor0.col2 FROM tab0 cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT DISTINCT - ( 37 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
-37

query I rowsort
SELECT ALL tab2.col2 + - 50 AS col1 FROM tab2 GROUP BY tab2.col2
----
29
37
8

query I rowsort
SELECT + 34 * + cor1.col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor1.col2
----
9 values hashing to 4cf39e6e6554d0ec7c6f1589990d88dc

query I rowsort
SELECT DISTINCT - 62 + + 65 FROM tab2 GROUP BY tab2.col2
----
3

query I rowsort
SELECT DISTINCT + - tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + + 43 * - col0 FROM tab2 GROUP BY col0
----
-3913
-3956
-645

query I rowsort
SELECT + 32 FROM tab0 GROUP BY tab0.col1
----
32
32

query I rowsort
SELECT ALL - + tab2.col0 + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL - 13 * - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
1183
1196
195

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-8168
SELECT DISTINCT col0 + + 34 DIV cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
29
82

skipif mysql # not compatible
query I rowsort label-8168
SELECT DISTINCT col0 + + 34 / cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
29
82

query I rowsort
SELECT + 73 AS col1 FROM tab1 GROUP BY tab1.col2
----
73
73
73

query I rowsort
SELECT col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT + tab2.col1 * - 50 FROM tab2 GROUP BY tab2.col1
----
-2050
-2950
-3050

query I rowsort
SELECT 98 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
139
157
159

query I rowsort
SELECT ALL + 52 FROM tab1 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT DISTINCT tab0.col2 * 31 FROM tab0 GROUP BY tab0.col2
----
1178
2449
744

query I rowsort
SELECT tab1.col0 + col0 FROM tab1 GROUP BY col0 HAVING NULL IS NULL
----
164
44
56

query I rowsort
SELECT DISTINCT + 54 AS col0 FROM tab1, tab1 cor0 GROUP BY tab1.col2
----
54

query I rowsort
SELECT + 80 AS col1 FROM tab2 GROUP BY tab2.col0
----
80
80
80

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 98, col1 + + cor0.col2, + 6 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-98
-98
-98

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-476
-6653
-739

query I rowsort
SELECT ALL - 14 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
10
24
65

query I rowsort
SELECT ALL + 70 FROM tab2 GROUP BY tab2.col2
----
70
70
70

query I rowsort
SELECT + 85 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
85
85

query I rowsort
SELECT DISTINCT + tab1.col2 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT cor0.col0 * + 43 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
1204
3526
946

query I rowsort
SELECT DISTINCT cor0.col0 + - 0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + cor0.col2 * - 31 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1178
-2449
-744

query I rowsort
SELECT DISTINCT + 19 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 39 * cor0.col0 + - cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
3458
3496
570

query I rowsort
SELECT 52 FROM tab0 GROUP BY col0
----
52
52
52

query I rowsort
SELECT + 69 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT 94 AS col0 FROM tab1 GROUP BY tab1.col2
----
94
94
94

query I rowsort
SELECT + 2 FROM tab1 GROUP BY tab1.col2
----
2
2
2

query I rowsort
SELECT DISTINCT + 21 AS col1 FROM tab2 GROUP BY tab2.col1
----
21

query I rowsort
SELECT 19 AS col1 FROM tab2 GROUP BY tab2.col2
----
19
19
19

query I rowsort
SELECT DISTINCT + 23 FROM tab1 AS cor0 GROUP BY col1
----
23

query I rowsort
SELECT DISTINCT - 38 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
20
41
49

query I rowsort
SELECT cor0.col2 + 97 FROM tab1 AS cor0 GROUP BY cor0.col2
----
105
142
168

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col0 * NULLIF ( - cor0.col0 * 72, cor0.col0 ) FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-16287
-596311
-609466

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8200
SELECT + CAST( + 88 AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col0
----
88
88
88

skipif mysql # not compatible
query I rowsort label-8200
SELECT + CAST ( + 88 AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col0
----
88
88
88

query I rowsort
SELECT ALL tab0.col0 + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col1 ) * - col2 col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
2378
4661
5307

query I rowsort
SELECT 98 * col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
1470
8918
9016

query I rowsort
SELECT DISTINCT - ( - cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT ALL + cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT + - col0 - tab1.col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-506
-6806
-812

query I rowsort
SELECT 58 AS col1 FROM tab0 GROUP BY tab0.col2
----
58
58
58

query I rowsort
SELECT 75 FROM tab2 GROUP BY tab2.col2
----
75
75
75

query I rowsort
SELECT + - tab2.col2 * + tab2.col2 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING + tab0.col2 > ( + tab0.col2 )
----

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT + 58 + - 69 FROM tab1 GROUP BY tab1.col0
----
-11
-11
-11

query I rowsort
SELECT - 82 AS col1 FROM tab0 GROUP BY tab0.col0
----
-82
-82
-82

query I rowsort
SELECT ALL 99 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
99
99
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * 81 col2 FROM tab0 cor0 GROUP BY col2, cor0.col2, cor0.col0
----
-1944
-3078
-6399

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 - + tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + + 41 FROM tab1 GROUP BY tab1.col2
----
41

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col2, cor1.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + tab2.col0 - - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT + + 26 FROM tab1 GROUP BY col1
----
26
26
26

query I rowsort
SELECT - 64 * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-5184
0

query I rowsort
SELECT DISTINCT + 20 AS col1 FROM tab0 GROUP BY col1
----
20

query I rowsort
SELECT + 57 AS col0 FROM tab1 GROUP BY tab1.col2
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 85 col1 FROM tab0 GROUP BY tab0.col2
----
85
85
85

query I rowsort
SELECT ALL - cor0.col0 + + 91 FROM tab0 AS cor0 GROUP BY cor0.col0
----
48
65
8

query I rowsort
SELECT + 60 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
60
60
60

onlyif mysql # DIV for integer division: 
query I rowsort label-8227
SELECT ALL + cor0.col0 DIV + 4 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
20
5
7

skipif mysql # not compatible
query I rowsort label-8227
SELECT ALL + cor0.col0 / + 4 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
20
5
7

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( 75, + tab1.col1, - tab1.col1 - - ( tab1.col1 ) * + tab1.col0 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
-75

query I rowsort
SELECT - + ( - 45 ) - 67 FROM tab1 GROUP BY tab1.col0
----
-22
-22
-22

query I rowsort
SELECT - 95 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-95
-95
-95

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + 59 FROM tab0 AS cor0 GROUP BY cor0.col0
----
59
59
59

query I rowsort
SELECT ALL 46 * 65 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2990
2990
2990

query I rowsort
SELECT ALL - 87 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-87
-87
-87

query I rowsort
SELECT ALL - + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NULL NOT IN ( col2 )
----

query I rowsort
SELECT DISTINCT + 88 - - cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
169
88

query I rowsort
SELECT 54 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
54
54
54

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
0
81

query I rowsort
SELECT DISTINCT - - tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - - 45 AS col2 FROM tab1 GROUP BY tab1.col1
----
45
45
45

query I rowsort
SELECT 71 + + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
115
128
77

onlyif mysql # DIV for integer division: 
query I rowsort label-8243
SELECT - cor0.col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8243
SELECT - cor0.col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL cor0.col2 * 57 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2565
4047
456

query I rowsort
SELECT DISTINCT - + 79 AS col1 FROM tab2 GROUP BY tab2.col0
----
-79

query I rowsort
SELECT ALL - col2 + + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + tab0.col2 * - tab0.col2 + - 57 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1501
-6298
-633

query I rowsort
SELECT ALL - 9 FROM tab2, tab1 AS cor0 GROUP BY tab2.col0
----
-9
-9
-9

query I rowsort
SELECT DISTINCT 91 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
91

query I rowsort
SELECT DISTINCT + cor0.col0 + 0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + 84 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
84

query I rowsort
SELECT ALL 14 * - 42 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-588
-588
-588

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-8255
SELECT ALL + + tab0.col2 DIV - tab0.col2 + + 83 AS col1 FROM tab0 GROUP BY tab0.col2
----
82
82
82

skipif mysql # not compatible
query I rowsort label-8255
SELECT ALL + + tab0.col2 / - tab0.col2 + + 83 AS col1 FROM tab0 GROUP BY tab0.col2
----
82
82
82

query I rowsort
SELECT DISTINCT - 94 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
-94

onlyif mysql # DIV for integer division: 
query I rowsort label-8257
SELECT + tab0.col2 DIV - 35 FROM tab0 GROUP BY tab0.col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-8257
SELECT + tab0.col2 / - 35 FROM tab0 GROUP BY tab0.col2
----
-1
-2
0

query I rowsort
SELECT 82 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
82
82
82

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT 42 FROM tab2 GROUP BY tab2.col1
----
42

query I rowsort
SELECT 89 FROM tab0 GROUP BY tab0.col1
----
89
89

onlyif mysql # DIV for integer division: 
query I rowsort label-8262
SELECT ALL - tab2.col0 DIV + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8262
SELECT ALL - tab2.col0 / + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + tab0.col2 AS col0 FROM tab0 GROUP BY col2 HAVING NULL IS NULL
----
24
38
79

query I rowsort
SELECT - 14 AS col1 FROM tab1 GROUP BY tab1.col2
----
-14
-14
-14

query I rowsort
SELECT DISTINCT - - 46 AS col0 FROM tab2 GROUP BY tab2.col2
----
46

query I rowsort
SELECT DISTINCT + 86 + - 34 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - tab2.col0 - 66 FROM tab2 GROUP BY tab2.col0
----
-157
-158
-81

query I rowsort
SELECT ALL 63 FROM tab2 AS cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT DISTINCT cor0.col1 - 54 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-13
5
7

query I rowsort
SELECT DISTINCT - cor0.col1 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1681
3481
3721

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 7 col2 FROM tab1 GROUP BY tab1.col2
----
7
7
7

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 9, - tab2.col0 * col2, + tab2.col1 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
9
9
9

query I rowsort
SELECT NULLIF ( - 88, - cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-88
-88
-88

query I rowsort
SELECT ALL 21 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT - tab1.col2 + - 34 AS col1 FROM tab1 GROUP BY col2
----
-105
-42
-79

query I rowsort
SELECT - cor0.col0 + - 33 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-124
-125
-48

query I rowsort
SELECT - 56 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-56
-56
-56

query I rowsort
SELECT ALL + - 65 FROM tab0 GROUP BY tab0.col1
----
-65
-65

query I rowsort
SELECT - 86 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-4
-58
-64

query I rowsort
SELECT + - 53 FROM tab1 GROUP BY tab1.col1
----
-53
-53
-53

query I rowsort
SELECT ALL + 33 AS col1 FROM tab1 GROUP BY tab1.col2
----
33
33
33

query I rowsort
SELECT + + 93 AS col1 FROM tab1 GROUP BY tab1.col2
----
93
93
93

query I rowsort
SELECT 86 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
86
86
86

query I rowsort
SELECT ALL tab1.col0 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-8288
SELECT DISTINCT cor0.col0 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-8288
SELECT DISTINCT cor0.col0 / cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
0
1
2

query I rowsort
SELECT ALL + 4 FROM tab0 GROUP BY col2
----
4
4
4

query I rowsort
SELECT - 62 AS col0 FROM tab1 GROUP BY tab1.col0
----
-62
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 63 col0 FROM tab2 GROUP BY tab2.col0
----
63
63
63

query I rowsort
SELECT DISTINCT - tab1.col1 * - 38 FROM tab1 GROUP BY col1
----
1672
2166
228

query I rowsort
SELECT - NULLIF ( + tab1.col0, + tab1.col0 ) * - ( + 39 ) FROM tab1 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL tab1.col0 + - 30 AS col1 FROM tab1 GROUP BY tab1.col0
----
-2
-8
52

query I rowsort
SELECT - + ( + tab1.col1 ) * 59 AS col2 FROM tab1 GROUP BY tab1.col1
----
-2596
-3363
-354

query I rowsort
SELECT DISTINCT cor0.col1 + 99 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
140
158
160

query I rowsort
SELECT DISTINCT 73 AS col2 FROM tab0 GROUP BY tab0.col2
----
73

query I rowsort
SELECT + - 20 FROM tab2 GROUP BY tab2.col2
----
-20
-20
-20

query I rowsort
SELECT + 2 AS col0 FROM tab2 GROUP BY tab2.col2
----
2
2
2

query I rowsort
SELECT + NULLIF ( 98, + tab1.col2 + + col2 ) * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
4410
6958
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + 96 col1 FROM tab0 AS cor0 GROUP BY col2
----
120
134
175

query I rowsort
SELECT DISTINCT tab2.col1 - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT + tab0.col0 * 48 FROM tab0 GROUP BY tab0.col0
----
1248
2064
3984

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 + - 25 * + col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-1056
-1368
-144

query I rowsort
SELECT ALL cor0.col1 + + 42 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0, col0
----
123
42
42

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT 6 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6
6

query I rowsort
SELECT - 16 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-16
-16
-16

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8310
SELECT - CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8310
SELECT - CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - tab1.col2 - - 89 AS col1 FROM tab1 GROUP BY tab1.col2
----
18
44
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT COALESCE ( + cor0.col2, cor0.col2 * 27 ) FROM tab1 cor0 GROUP BY col2, col2
----
45
71
8

query I rowsort
SELECT cor0.col1 * + cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
132
1596
3608

onlyif mysql # DIV for integer division: 
query I rowsort label-8315
SELECT + tab0.col2 DIV + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8315
SELECT + tab0.col2 / + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT ( NULL ) IS NOT NULL
----
24
38
79

query I rowsort
SELECT ALL - cor0.col2 - 42 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-100
-121
-129

query I rowsort
SELECT ALL + - 67 FROM tab0 GROUP BY tab0.col0
----
-67
-67
-67

query I rowsort
SELECT DISTINCT + 35 FROM tab0 AS cor0 GROUP BY cor0.col2
----
35

query I rowsort
SELECT - 54 AS col1 FROM tab2 GROUP BY tab2.col2
----
-54
-54
-54

query I rowsort
SELECT - tab2.col2 + - 66 AS col2 FROM tab2 GROUP BY tab2.col2
----
-124
-145
-153

query I rowsort
SELECT DISTINCT cor0.col1 * + 62 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2728
3534
372

query I rowsort
SELECT DISTINCT 43 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1118
-1849
-3569

onlyif mysql # DIV for integer division: 
query I rowsort label-8325
SELECT ALL + 37 + - tab1.col1 DIV + col1 FROM tab1 GROUP BY tab1.col1
----
36
36
36

skipif mysql # not compatible
query I rowsort label-8325
SELECT ALL + 37 + - tab1.col1 / + col1 FROM tab1 GROUP BY tab1.col1
----
36
36
36

query I rowsort
SELECT + 24 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
24
24

query I rowsort
SELECT + cor0.col2 + cor0.col0 * + 56 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
5175
5210
927

onlyif mysql # DIV for integer division: 
query I rowsort label-8328
SELECT DISTINCT - 99 - COALESCE ( - 26, - cor0.col0 DIV cor0.col2 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-73

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-8328
SELECT DISTINCT - 99 - COALESCE ( - 26, - cor0.col0 / cor0.col2 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-73

query I rowsort
SELECT + 38 * tab1.col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1628
2109
222

query I rowsort
SELECT DISTINCT - 2 * cor0.col2 - cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-129
-158
-76

query I rowsort
SELECT 70 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1680
2660
5530

query I rowsort
SELECT + cor0.col2 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
105
121
67

query I rowsort
SELECT - 95 AS col2 FROM tab1 GROUP BY tab1.col0
----
-95
-95
-95

query I rowsort
SELECT 97 FROM tab2 AS cor0 GROUP BY cor0.col1
----
97
97
97

query I rowsort
SELECT ALL + 99 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
99
99
99

query I rowsort
SELECT - 99 + 96 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-3
-3
-3

query I rowsort
SELECT - 97 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-97
-97
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 * tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT ALL + 10 FROM tab1 AS cor0 GROUP BY cor0.col1
----
10
10
10

query I rowsort
SELECT DISTINCT 68 FROM tab1 cor0 GROUP BY col1
----
68

query I rowsort
SELECT + cor0.col0 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0
0
3483

query I rowsort
SELECT DISTINCT + col0 - + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT ALL + ( - 15 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
-15
-15
-15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + NULLIF ( 81, - col2 ) col0 FROM tab1 AS cor0 GROUP BY col2
----
81
81
81

query I rowsort
SELECT ALL + 31 FROM tab1 GROUP BY tab1.col1
----
31
31
31

query I rowsort
SELECT DISTINCT - 73 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-73

query I rowsort
SELECT ALL - tab0.col2 FROM tab0 GROUP BY col2 HAVING NOT NULL BETWEEN ( NULL ) AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-8350
SELECT DISTINCT cor0.col2 DIV + cor0.col2 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
46
72
9

skipif mysql # not compatible
query I rowsort label-8350
SELECT DISTINCT cor0.col2 / + cor0.col2 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
46
72
9

query I rowsort
SELECT ALL - + tab2.col0 - 88 * tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-1335
-8099
-8188

query I rowsort
SELECT - tab0.col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL + + tab2.col2 * tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT - tab2.col1 * tab2.col1 + + tab2.col1 FROM tab2 GROUP BY col1
----
-1640
-3422
-3660

query I rowsort
SELECT - - 60 FROM tab1 GROUP BY tab1.col2
----
60
60
60

query I rowsort
SELECT CASE cor0.col2 WHEN cor0.col1 * - cor0.col0 + cor0.col0 THEN cor0.col2 * - col1 ELSE - cor0.col0 END * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-3483
0
0

query I rowsort
SELECT 49 AS col0 FROM tab0 GROUP BY tab0.col1
----
49
49

query I rowsort
SELECT DISTINCT 65 FROM tab2 GROUP BY tab2.col1
----
65

query I rowsort
SELECT ALL + 0 AS col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT + + 95 AS col2 FROM tab0 GROUP BY tab0.col0
----
95
95
95

query I rowsort
SELECT ALL + 37 FROM tab2 GROUP BY tab2.col1
----
37
37
37

query I rowsort
SELECT + 92 * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2024
-2576
-7544

onlyif mysql # DIV for integer division: 
query I rowsort label-8363
SELECT DISTINCT - col0 DIV - col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-8363
SELECT DISTINCT - col0 / - col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT + 93 AS col0 FROM tab2 GROUP BY tab2.col2
----
93
93
93

query I rowsort
SELECT - 43 - + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-125
-65
-71

query I rowsort
SELECT - col2 * - 21 FROM tab2 AS cor0 GROUP BY col2
----
1218
1659
1827

query I rowsort
SELECT DISTINCT 95 FROM tab2 cor0 GROUP BY col2
----
95

query I rowsort
SELECT ALL - col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
-26
-43
-83

query I rowsort
SELECT ALL - col1 + - 90 FROM tab2 GROUP BY tab2.col1
----
-131
-149
-151

query I rowsort
SELECT + cor0.col1 * - col1 FROM tab2 AS cor0 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT cor0.col1 * 70 FROM tab0 AS cor0 GROUP BY col1
----
0
5670

query I rowsort
SELECT ALL - cor0.col0 * NULLIF ( + cor0.col0, cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 92 * - col1 FROM tab0 GROUP BY col1
----
-7452
0

query I rowsort
SELECT - 56 * 0 AS col1 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-81
0

query I rowsort
SELECT 27 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
27
27
27

onlyif mysql # DIV for integer division: 
query I rowsort label-8377
SELECT 1 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8377
SELECT 1 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - 82 AS col2 FROM tab2 GROUP BY tab2.col1
----
-82
-82
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 col2 FROM tab0 GROUP BY tab0.col1
----
21
21

query I rowsort
SELECT DISTINCT - 41 + - tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-120
-128
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 64 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
64
64
64

query I rowsort
SELECT + 34 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
34
34
34

query I rowsort
SELECT - ( - 23 ) FROM tab2 GROUP BY tab2.col2
----
23
23
23

query I rowsort
SELECT DISTINCT + NULLIF ( - tab1.col2, col2 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + - col1 - - col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8386
SELECT 7 * cor0.col2 - + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8386
SELECT 7 * cor0.col2 - + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 * col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL 95 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
95
95
95

query I rowsort
SELECT ALL + cor0.col2 + + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
102
150
170

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + 13 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-13
-30
-70

query I rowsort
SELECT DISTINCT cor0.col2 + + 59 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
138
83
97

query I rowsort
SELECT ALL 52 FROM tab1 GROUP BY tab1.col1
----
52
52
52

query I rowsort
SELECT ALL 98 FROM tab0 cor0 GROUP BY col2
----
98
98
98

query I rowsort
SELECT ALL 69 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
69
69
69

query I rowsort
SELECT - cor0.col0 + cor0.col0 * ( 67 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1452
1848
5412

query I rowsort
SELECT 15 + - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-23
-64
-9

onlyif mysql # DIV for integer division: 
query I rowsort label-8397
SELECT DISTINCT cor0.col0 DIV - cor0.col0 + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
14
90
91

skipif mysql # not compatible
query I rowsort label-8397
SELECT DISTINCT cor0.col0 / - cor0.col0 + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
14
90
91

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT 45 FROM tab0, tab1 cor0 GROUP BY cor0.col2
----
45

query I rowsort
SELECT + 23 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2093
-2116
-345

onlyif mysql # DIV for integer division: 
query I rowsort label-8402
SELECT DISTINCT 65 * - cor0.col2 + + col2 DIV + 83 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3770
-5135
-5654

skipif mysql # not compatible
query I rowsort label-8402
SELECT DISTINCT 65 * - cor0.col2 + + col2 / + 83 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3770
-5135
-5654

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8403
SELECT ALL - col2 + + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8403
SELECT ALL - col2 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
15
91
92

query I rowsort
SELECT - 62 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1488
-2356
-4898

query I rowsort
SELECT 78 AS col2 FROM tab0 GROUP BY tab0.col0
----
78
78
78

query I rowsort
SELECT - 11 FROM tab2 GROUP BY tab2.col2
----
-11
-11
-11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 15 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
15

query I rowsort
SELECT cor0.col2 * col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1305
5336
7189

query I rowsort
SELECT DISTINCT - ( + 21 ) FROM tab2 GROUP BY tab2.col2
----
-21

query I rowsort
SELECT DISTINCT - 73 FROM tab0 GROUP BY tab0.col2
----
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 68 - - tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
-68
13

query I rowsort
SELECT 79 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
79
79
79

query I rowsort
SELECT ALL - 47 AS col0 FROM tab2 GROUP BY tab2.col1
----
-47
-47
-47

query I rowsort
SELECT 20 + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
107
78
99

query I rowsort
SELECT tab1.col2 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NOT NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-8417
SELECT + cor0.col0 DIV - col0 FROM tab2 AS cor0 GROUP BY col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8417
SELECT + cor0.col0 / - col0 FROM tab2 AS cor0 GROUP BY col0
----
-1
-1
-1

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + + COALESCE ( 5, + tab1.col2, - 2 * + tab1.col2 ) AS col1 FROM tab1 GROUP BY col0
----
5
5
5

query I rowsort
SELECT DISTINCT 74 * 58 FROM tab1 GROUP BY tab1.col2
----
4292

query I rowsort
SELECT - + 64 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-122
-143
-151

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * - 82 col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-1804
-2296
-6724

query I rowsort
SELECT ALL + - 29 FROM tab1 GROUP BY tab1.col1
----
-29
-29
-29

query I rowsort
SELECT DISTINCT 74 * col0 FROM tab2 GROUP BY tab2.col0
----
1110
6734
6808

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-8424
SELECT DISTINCT CAST( NULL AS DECIMAL ) AS col1 FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-8424
SELECT DISTINCT CAST ( NULL AS REAL ) AS col1 FROM tab0 GROUP BY tab0.col0
----
NULL

query I rowsort
SELECT DISTINCT ( 35 ) FROM tab1 AS cor0 GROUP BY col1
----
35

query I rowsort
SELECT + 89 * - cor0.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-3916
-5073
-534

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 66 * cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
5346

query I rowsort
SELECT 71 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
71
71
71

query I rowsort
SELECT 78 FROM tab2 GROUP BY col2
----
78
78
78

query I rowsort
SELECT + - 68 FROM tab1 GROUP BY tab1.col0
----
-68
-68
-68

query I rowsort
SELECT 25 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
25
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 41 + + 7 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
48
48
48

query I rowsort
SELECT 81 FROM tab1 cor0 GROUP BY cor0.col1
----
81
81
81

query I rowsort
SELECT 68 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1020
-6188
-6256

query I rowsort
SELECT 82 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
82
82

query I rowsort
SELECT DISTINCT - - 57 FROM tab0 GROUP BY tab0.col1
----
57

query I rowsort
SELECT DISTINCT + 12 AS col2 FROM tab0 GROUP BY tab0.col2
----
12

query I rowsort
SELECT DISTINCT - + 83 AS col0 FROM tab2 GROUP BY tab2.col2
----
-83

query I rowsort
SELECT ALL + ( - 79 ) FROM tab0 GROUP BY tab0.col2
----
-79
-79
-79

query I rowsort
SELECT tab2.col1 - + 72 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-2911
-4189
-4331

query I rowsort
SELECT 89 * cor0.col0 AS col2 FROM tab1 cor0 GROUP BY col0
----
1958
2492
7298

query I rowsort
SELECT ALL 20 AS col0 FROM tab0 GROUP BY tab0.col0
----
20
20
20

query I rowsort
SELECT ALL - 33 AS col0 FROM tab0 GROUP BY tab0.col0
----
-33
-33
-33

onlyif mysql # DIV for integer division: 
query I rowsort label-8444
SELECT - cor0.col0 DIV 58 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8444
SELECT - cor0.col0 / 58 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8445
SELECT + + CAST( NULL AS SIGNED ) col1 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8445
SELECT + + CAST ( NULL AS INTEGER ) col1 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 72 FROM tab0 GROUP BY tab0.col1
----
-72
-72

query I rowsort
SELECT ALL + cor0.col2 * - 62 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1488
-2356
-4898

query I rowsort
SELECT ALL ( + 81 ) * - tab0.col2 - ( - tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
-1920
-3040
-6320

query I rowsort
SELECT DISTINCT - + 94 AS col2 FROM tab2 GROUP BY col0
----
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 84 col1 FROM tab0 GROUP BY tab0.col0
----
84

query I rowsort
SELECT + col2 * tab2.col2 - + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3306
6162
7482

query I rowsort
SELECT ALL + 6 AS col1 FROM tab2 GROUP BY tab2.col0
----
6
6
6

query I rowsort
SELECT - cor0.col2 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-17
11
14

query I rowsort
SELECT 97 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
97
97
97

query I rowsort
SELECT + 89 FROM tab1 cor0 GROUP BY cor0.col1
----
89
89
89

query I rowsort
SELECT + cor0.col1 * + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT + 98 * - tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-1470
-8918
-9016

query I rowsort
SELECT ALL + col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT + + NULLIF ( tab1.col1, + 96 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - 20 AS col2 FROM tab1 GROUP BY tab1.col1
----
-20
-20
-20

query I rowsort
SELECT - - tab0.col1 * col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT - 27 AS col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor1.col1
----
-27
-27
-27

query I rowsort
SELECT DISTINCT - 54 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-54

query I rowsort
SELECT ( - cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-8466
SELECT - cor0.col1 DIV cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8466
SELECT - cor0.col1 / cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT + tab0.col0 + - 3 FROM tab0 GROUP BY tab0.col0
----
23
40
80

query I rowsort
SELECT + 13 + + cor0.col1 * + 48 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
1981
2845
2941

query I rowsort
SELECT DISTINCT + 67 FROM tab0 AS cor0 GROUP BY cor0.col0
----
67

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col1 - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-83
38

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 4 col2 FROM tab0 GROUP BY tab0.col2
----
4

query I rowsort
SELECT DISTINCT tab2.col2 - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT tab0.col1 + + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
162

onlyif mysql # DIV for integer division: 
query I rowsort label-8476
SELECT + tab1.col1 DIV + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8476
SELECT + tab1.col1 / + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT ALL + tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL - 0 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT tab0.col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT - col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + ( cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
26
43
83

query I rowsort
SELECT DISTINCT 43 * + 27 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
1219
1240
1248

query I rowsort
SELECT ALL col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 53 - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-144
-145
-68

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT 54 * cor0.col1 + COALESCE ( - 69, - 35 + cor0.col2 ) FROM tab1 AS cor0 GROUP BY col1
----
2307
255
3009

query I rowsort
SELECT 33 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
33
33
33

query I rowsort
SELECT 33 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
33
33
33

onlyif mysql # DIV for integer division: 
query I rowsort label-8489
SELECT + 98 * - COALESCE ( + 41, - cor0.col2, + cor0.col0 * - col0 - col1 DIV + CASE col2 WHEN cor0.col2 THEN - cor0.col1 DIV ( 15 DIV - cor0.col2 ) + - 57 WHEN - cor0.col1 THEN NULL ELSE NULL END, cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-4018
-4018
-4018

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-8489
SELECT + 98 * - COALESCE ( + 41, - cor0.col2, + cor0.col0 * - col0 - col1 / + CASE col2 WHEN cor0.col2 THEN - cor0.col1 / ( 15 / - cor0.col2 ) + - 57 WHEN - cor0.col1 THEN NULL ELSE NULL END, cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-4018
-4018
-4018

query I rowsort
SELECT DISTINCT + - 30 AS col2 FROM tab1 GROUP BY tab1.col1
----
-30

query I rowsort
SELECT DISTINCT + - 17 FROM tab1 GROUP BY tab1.col1
----
-17

query I rowsort
SELECT ALL 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
38
38

query I rowsort
SELECT ALL 95 AS col1 FROM tab0 GROUP BY tab0.col2
----
95
95
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 94 * - tab0.col2 + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
-2232
-3534
-7347

query I rowsort
SELECT DISTINCT - 28 AS col2 FROM tab2 GROUP BY col2
----
-28

query I rowsort
SELECT 79 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
79
79
79

query I rowsort
SELECT 12 AS col0 FROM tab0 GROUP BY tab0.col0
----
12
12
12

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, col2
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
58
79
87

query I rowsort
SELECT ALL ( cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 5 * col2 col2 FROM tab1 GROUP BY tab1.col2
----
-225
-355
-40

query I rowsort
SELECT ALL 52 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
3016
4108
4524

query I rowsort
SELECT ALL 20 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
20
20
20

query I rowsort
SELECT DISTINCT + cor0.col2 + + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, col1
----
158
48
76

onlyif mysql # DIV for integer division: 
query I rowsort label-8506
SELECT - cor0.col2 DIV 35 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-8506
SELECT - cor0.col2 / 35 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-2
0

query I rowsort
SELECT DISTINCT - cor0.col2 + + 95 FROM tab1 AS cor0 GROUP BY cor0.col2
----
24
50
87

query I rowsort
SELECT 3 AS col0 FROM tab1 GROUP BY tab1.col0
----
3
3
3

query I rowsort
SELECT 3 * + cor0.col2 FROM tab2 cor0 GROUP BY col2
----
174
237
261

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab1 GROUP BY tab1.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT ( NULL ) BETWEEN ( tab1.col2 ) AND ( NULL )
----

query I rowsort
SELECT ALL - + 84 FROM tab2 GROUP BY col0
----
-84
-84
-84

query I rowsort
SELECT ALL + 58 AS col1 FROM tab0 GROUP BY col0
----
58
58
58

query I rowsort
SELECT 79 * + 28 - - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2218
2256
2269

query I rowsort
SELECT 66 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
66
66
66

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
-41
-59
-61

query I rowsort
SELECT 74 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
74
74
74

query I rowsort
SELECT ALL + 28 FROM tab0 GROUP BY tab0.col2
----
28
28
28

query I rowsort
SELECT ALL - - 64 FROM tab2 GROUP BY tab2.col2
----
64
64
64

query I rowsort
SELECT 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
40
40
40

query I rowsort
SELECT + + col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL + col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - 39 FROM tab1 GROUP BY tab1.col0
----
-39
-39
-39

query I rowsort
SELECT DISTINCT 58 * - 90 FROM tab1 GROUP BY tab1.col0
----
-5220

query I rowsort
SELECT + - tab0.col0 + - 85 * 77 AS col0 FROM tab0 GROUP BY tab0.col0
----
-6571
-6588
-6628

query I rowsort
SELECT DISTINCT + 11 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
11

query I rowsort
SELECT ALL 21 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT DISTINCT - 91 AS col1 FROM tab0 GROUP BY tab0.col2
----
-91

query I rowsort
SELECT DISTINCT - 38 FROM tab2 GROUP BY tab2.col2
----
-38

query I rowsort
SELECT ALL cor0.col1 * cor0.col0 + 46 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3818
5415
961

query I rowsort
SELECT - cor0.col1 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-114
-12
-88

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 16 AS col2 FROM tab0 cor0 GROUP BY col2
----
-16

query I rowsort
SELECT ALL 58 FROM tab1 cor0 GROUP BY cor0.col1
----
58
58
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 37 col1 FROM tab0 GROUP BY tab0.col0
----
-37
-37
-37

query I rowsort
SELECT DISTINCT + + 31 AS col0 FROM tab2 GROUP BY tab2.col1
----
31

query I rowsort
SELECT 45 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
45
45
45

query I rowsort
SELECT - + 91 * + 11 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
-1001
-1001
-1001

query I rowsort
SELECT + 90 AS col1 FROM tab1 GROUP BY tab1.col2
----
90
90
90

query I rowsort
SELECT ALL + - ( 25 ) FROM tab2 GROUP BY col0
----
-25
-25
-25

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8541
SELECT DISTINCT + CAST( NULL AS SIGNED ) * - ( 57 + + tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-8541
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * - ( 57 + + tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT 37 * col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1444
3002
912

query I rowsort
SELECT 60 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-11
15
52

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
142
16
90

query I rowsort
SELECT ALL - - 37 AS col0 FROM tab2 GROUP BY tab2.col0
----
37
37
37

query I rowsort
SELECT - 80 FROM tab0 GROUP BY col1
----
-80
-80

onlyif mysql # DIV for integer division: 
query I rowsort label-8547
SELECT DISTINCT - tab1.col0 DIV tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1

skipif mysql # not compatible
query I rowsort label-8547
SELECT DISTINCT - tab1.col0 / tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col2 col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT cor0.col2 + - cor0.col2 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2610
3195
56

query I rowsort
SELECT - 92 FROM tab1 GROUP BY tab1.col2
----
-92
-92
-92

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col0 + + 2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1307
5338
7191

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-8552
SELECT DISTINCT CAST( NULL AS DECIMAL ) - - cor0.col2 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-8552
SELECT DISTINCT CAST ( NULL AS REAL ) - - cor0.col2 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, col0
----
26
43
83

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL + - ( - ( + tab0.col2 ) ) FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL - 36 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-36
-36
-36

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL - 85 * + 16 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1360
-1360
-1360

query I rowsort
SELECT DISTINCT - cor0.col0 + + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col2, col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 col2 FROM tab2 GROUP BY col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-8564
SELECT ALL + col0 DIV col1 + - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-39
-58
-61

skipif mysql # not compatible
query I rowsort label-8564
SELECT ALL + col0 / col1 + - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-39
-58
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col0 col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT + - col1 * col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT + col1 * cor0.col0 + - 66 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-66
-66
3417

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 15 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT cor0.col0 * + cor0.col0 - COALESCE ( + cor0.col1, - cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
478
6680
727

onlyif mysql # DIV for integer division: 
query I rowsort label-8570
SELECT DISTINCT + col2 DIV col2 FROM tab1 GROUP BY tab1.col2
----
1

skipif mysql # not compatible
query I rowsort label-8570
SELECT DISTINCT + col2 / col2 FROM tab1 GROUP BY tab1.col2
----
1

onlyif mysql # DIV for integer division: 
query I rowsort label-8571
SELECT - tab2.col2 DIV + col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8571
SELECT - tab2.col2 / + col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT + 25 + - tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-459
-6699
-759

query I rowsort
SELECT - 52 * col0 FROM tab0 GROUP BY tab0.col0
----
-1352
-2236
-4316

query I rowsort
SELECT DISTINCT - 78 AS col0 FROM tab2, tab0 AS cor0 GROUP BY tab2.col1
----
-78

query I rowsort
SELECT + 79 FROM tab0 GROUP BY tab0.col2
----
79
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 18 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
18
18
18

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( + 17, - tab0.col0 ) + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
17
98

query I rowsort
SELECT ALL + tab2.col2 * tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + 87 * + col1 + tab0.col1 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
13608

query I rowsort
SELECT 30 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
30
30
30

query I rowsort
SELECT DISTINCT 97 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
97

query I rowsort
SELECT 15 * + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
1245
390
645

query I rowsort
SELECT ALL + 62 AS col0 FROM tab2 GROUP BY tab2.col0
----
62
62
62

query I rowsort
SELECT 72 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
153
72

query I rowsort
SELECT ALL - - 27 * + 39 AS col2 FROM tab1 GROUP BY tab1.col2
----
1053
1053
1053

query I rowsort
SELECT cor0.col0 * + 87 FROM tab1 AS cor0 GROUP BY col0
----
1914
2436
7134

query I rowsort
SELECT ( + 9 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + cor0.col1 col1 FROM tab2 AS cor0 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL col1 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + col2 * + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

onlyif mysql # DIV for integer division: 
query I rowsort label-8591
SELECT ALL cor0.col2 DIV - col2 FROM tab1 AS cor0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8591
SELECT ALL cor0.col2 / - col2 FROM tab1 AS cor0 GROUP BY col2
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 56 + - 75 col1 FROM tab1 GROUP BY tab1.col1
----
-19
-19
-19

query I rowsort
SELECT ALL ( + 23 ) + - 44 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-21
-21
-21

onlyif mysql # DIV for integer division: 
query I rowsort label-8594
SELECT - 99 DIV 52 FROM tab0 GROUP BY tab0.col1
----
-1
-1

skipif mysql # not compatible
query I rowsort label-8594
SELECT - 99 / 52 FROM tab0 GROUP BY tab0.col1
----
-1
-1

query I rowsort
SELECT DISTINCT + - ( 54 ) FROM tab0 GROUP BY tab0.col1
----
-54

query I rowsort
SELECT ALL + 79 AS col2 FROM tab2 GROUP BY tab2.col0
----
79
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 38 * 15 col0 FROM tab1 GROUP BY tab1.col2
----
570
570
570

query I rowsort
SELECT cor0.col2 * 18 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1278
144
810

query I rowsort
SELECT ALL - - 28 * - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-2296
-616
-784

query I rowsort
SELECT ALL - 13 AS col0 FROM tab2 GROUP BY tab2.col0
----
-13
-13
-13

query I rowsort
SELECT ALL + - 3 * 64 FROM tab0 GROUP BY tab0.col0
----
-192
-192
-192

query I rowsort
SELECT ALL + col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - cor0.col1 + + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0

query I rowsort
SELECT - 21 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-21
-21
-21

query I rowsort
SELECT + + tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + 14 AS col2 FROM tab1 GROUP BY tab1.col2
----
14

query I rowsort
SELECT DISTINCT - + 66 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-5346
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + 41 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-38
17
3

query I rowsort
SELECT ALL 17 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
17
17
17

onlyif mysql # DIV for integer division: 
query I rowsort label-8611
SELECT + cor0.col1 DIV + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8611
SELECT + cor0.col1 / + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT + cor0.col0 + 43 FROM tab2 AS cor0 GROUP BY cor0.col0
----
134
135
58

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8613
SELECT ALL CAST( - 19 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-19
-19
-19

skipif mysql # not compatible
query I rowsort label-8613
SELECT ALL CAST ( - 19 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-19
-19
-19

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8614
SELECT CAST( 14 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
14
14
14

skipif mysql # not compatible
query I rowsort label-8614
SELECT CAST ( 14 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT - 91 * 13 - - cor0.col2 * 66 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-655
1787
3503

query I rowsort
SELECT DISTINCT 81 FROM tab2 AS cor0 GROUP BY cor0.col2
----
81

query I rowsort
SELECT + cor1.col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT DISTINCT 82 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
82

query I rowsort
SELECT - col0 + - 59 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
-150
-151
-74

query I rowsort
SELECT DISTINCT + col1 * 77 FROM tab2 GROUP BY tab2.col1
----
3157
4543
4697

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8621
SELECT + col2 + - CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8621
SELECT + col2 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + + 31 AS col2 FROM tab2 GROUP BY tab2.col0
----
31
31
31

onlyif mysql # DIV for integer division: 
query I rowsort label-8624
SELECT ALL + 48 DIV tab1.col0 + + 6 FROM tab1 GROUP BY tab1.col0
----
6
7
8

skipif mysql # not compatible
query I rowsort label-8624
SELECT ALL + 48 / tab1.col0 + + 6 FROM tab1 GROUP BY tab1.col0
----
6
7
8

onlyif mysql # DIV for integer division: 
query I rowsort label-8625
SELECT ALL + cor0.col2 * ( 73 DIV + 71 ) + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

skipif mysql # not compatible
query I rowsort label-8625
SELECT ALL + cor0.col2 * ( 73 / + 71 ) + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT 15 FROM tab0 GROUP BY tab0.col0
----
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 73 * col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1606
-2044
-5986

query I rowsort
SELECT DISTINCT 52 FROM tab1 AS cor0 GROUP BY cor0.col0
----
52

query I rowsort
SELECT + + tab1.col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT 70 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
113
153
96

query I rowsort
SELECT ALL + + 92 FROM tab1 GROUP BY tab1.col2
----
92
92
92

query I rowsort
SELECT DISTINCT + + tab2.col2 - + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT ALL + cor0.col2 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT cor0.col2 * - cor0.col2 + cor0.col2 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-8635
SELECT DISTINCT col2 + + cor0.col2 DIV - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
23
37
78

skipif mysql # not compatible
query I rowsort label-8635
SELECT DISTINCT col2 + + cor0.col2 / - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
23
37
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab2.col0 * - ( 87 ) col1 FROM tab2 GROUP BY tab2.col0
----
1305
7917
8004

query I rowsort
SELECT + 98 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT DISTINCT 91 AS col1 FROM tab0 cor0 GROUP BY col1
----
91

query I rowsort
SELECT ALL 71 * + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
1065
6461
6532

query I rowsort
SELECT + tab1.col2 + tab1.col2 * - 12 AS col2 FROM tab1 GROUP BY tab1.col2
----
-495
-781
-88

query I rowsort
SELECT + 94 FROM tab2 AS cor0 GROUP BY col2
----
94
94
94

query I rowsort
SELECT 72 * - tab2.col0 + ( + tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
-1065
-6461
-6532

query I rowsort
SELECT DISTINCT cor0.col1 + col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
102
115
14

onlyif mysql # DIV for integer division: 
query I rowsort label-8644
SELECT DISTINCT - tab2.col2 DIV - 65 FROM tab2 GROUP BY tab2.col2
----
0
1

skipif mysql # not compatible
query I rowsort label-8644
SELECT DISTINCT - tab2.col2 / - 65 FROM tab2 GROUP BY tab2.col2
----
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-8645
SELECT ALL + - tab1.col0 DIV tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8645
SELECT ALL + - tab1.col0 / tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-1
-1
-1

query I rowsort
SELECT tab1.col0 - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-8647
SELECT DISTINCT + cor0.col0 + + cor0.col0 DIV cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
92
94

skipif mysql # not compatible
query I rowsort label-8647
SELECT DISTINCT + cor0.col0 + + cor0.col0 / cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
92
94

query I rowsort
SELECT DISTINCT - ( - cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 79 AS col0 FROM tab0 GROUP BY tab0.col0
----
79

query I rowsort
SELECT DISTINCT - - tab0.col2 - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0

query I rowsort
SELECT DISTINCT + 10 FROM tab0 AS cor0 GROUP BY cor0.col2
----
10

query I rowsort
SELECT DISTINCT 76 AS col2 FROM tab0 GROUP BY tab0.col2
----
76

query I rowsort
SELECT + + 83 + + tab0.col0 FROM tab0 GROUP BY col0
----
109
126
166

query I rowsort
SELECT DISTINCT + 54 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, col0, cor0.col1
----
54

query I rowsort
SELECT - + col0 AS col2 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT ALL + 37 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
37
37
37

query I rowsort
SELECT DISTINCT - 3 AS col2 FROM tab2 GROUP BY tab2.col1
----
-3

query I rowsort
SELECT DISTINCT - 81 * 27 FROM tab2 GROUP BY tab2.col1
----
-2187

query I rowsort
SELECT ALL - 43 AS col0 FROM tab0 GROUP BY tab0.col0
----
-43
-43
-43

query I rowsort
SELECT ALL + 49 FROM tab1 GROUP BY tab1.col1
----
49
49
49

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-1681
-3481
-3721

query I rowsort
SELECT - + 47 AS col2 FROM tab2 GROUP BY tab2.col2
----
-47
-47
-47

query I rowsort
SELECT cor0.col2 + + 44 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
123
68
82

query I rowsort
SELECT cor0.col2 + + 53 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
124
61
98

query I rowsort
SELECT cor0.col2 + - 81 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-10
-36
-73

query I rowsort
SELECT DISTINCT + 28 * + 85 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
2319
2321
2339

query I rowsort
SELECT DISTINCT - 51 AS col0 FROM tab2 GROUP BY tab2.col0
----
-51

query I rowsort
SELECT DISTINCT ( - tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - - 74 FROM tab1 GROUP BY tab1.col1
----
74
74
74

onlyif mysql # DIV for integer division: 
query I rowsort label-8670
SELECT ALL - 3 DIV + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8670
SELECT ALL - 3 / + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + 91 AS col0 FROM tab1 GROUP BY col2
----
91
91
91

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL ( cor0.col1 ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col2 * + 98 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2352
3724
7742

query I rowsort
SELECT DISTINCT + - 64 FROM tab2 GROUP BY tab2.col1
----
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col1 * + tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT cor0.col2 - - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
105
121
67

query I rowsort
SELECT ALL + COALESCE ( cor0.col2, cor0.col2 ) + 9 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
17
54
80

query I rowsort
SELECT ALL + col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT - cor0.col1 - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
-118
-122
-82

query I rowsort
SELECT + tab1.col0 * 7 + 11 FROM tab1 GROUP BY tab1.col0
----
165
207
585

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8682
SELECT cor0.col1 * + CAST( NULL AS SIGNED ) + - 26 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8682
SELECT cor0.col1 * + CAST ( NULL AS INTEGER ) + - 26 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 99 FROM tab1 GROUP BY tab1.col0
----
99

query I rowsort
SELECT DISTINCT col1 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT 54 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT DISTINCT - 90 + - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-114
-128
-169

query I rowsort
SELECT - 5 * + 75 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-375
-375
-375

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - tab0.col1 + COALESCE ( - COALESCE ( 68, + tab0.col0 * tab0.col1 ), + COALESCE ( + tab0.col1, - 3 ) * CASE - tab0.col1 * tab0.col1 + tab0.col1 WHEN tab0.col2 - tab0.col2 THEN tab0.col1 * + 31 END, + 86 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
-149
-68

query I rowsort
SELECT 60 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
60
60
60

query I rowsort
SELECT + 51 * + 25 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1275
1275

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 col0 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL - - ( - tab2.col2 ) + + col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 8 col0 FROM tab2 GROUP BY tab2.col1
----
8
8
8

query I rowsort
SELECT + - 25 FROM tab2 GROUP BY tab2.col1
----
-25
-25
-25

query I rowsort
SELECT - 53 FROM tab1 AS cor0 GROUP BY col1
----
-53
-53
-53

query I rowsort
SELECT + NULLIF ( cor0.col0, cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 20 * + cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1820
1840
300

query I rowsort
SELECT + - 61 FROM tab1 GROUP BY col2
----
-61
-61
-61

query I rowsort
SELECT - cor1.col1 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT ( - cor0.col1 ) + + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col1
----
9 values hashing to a7fc3d55de9b3e11322658ec587831cf

query I rowsort
SELECT DISTINCT + 41 FROM tab1 GROUP BY tab1.col0
----
41

query I rowsort
SELECT DISTINCT - 23 * tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-1863
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 72 col2 FROM tab2 GROUP BY tab2.col1
----
72

query I rowsort
SELECT ALL + 19 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
19
19
19

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
164
44
56

onlyif mysql # DIV for integer division: 
query I rowsort label-8707
SELECT DISTINCT cor0.col2 + + cor0.col2 DIV + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
59
80
88

skipif mysql # not compatible
query I rowsort label-8707
SELECT DISTINCT cor0.col2 + + cor0.col2 / + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
59
80
88

query I rowsort
SELECT DISTINCT tab2.col0 * tab2.col0 FROM tab2 WHERE NULL NOT BETWEEN NULL AND NULL GROUP BY tab2.col0
----

query I rowsort
SELECT + tab0.col0 AS col0 FROM tab0 GROUP BY col0 HAVING NOT ( NULL ) IS NOT NULL
----
26
43
83

query I rowsort
SELECT 65 AS col0 FROM tab2 GROUP BY tab2.col1
----
65
65
65

query I rowsort
SELECT + tab0.col0 * 97 AS col0 FROM tab0 GROUP BY tab0.col0
----
2522
4171
8051

onlyif mysql # DIV for integer division: 
query I rowsort label-8712
SELECT - tab1.col2 + + tab1.col2 DIV tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-44
-7
-70

skipif mysql # not compatible
query I rowsort label-8712
SELECT - tab1.col2 + + tab1.col2 / tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-44
-7
-70

query I rowsort
SELECT ALL - - tab0.col1 - tab0.col1 FROM tab0 GROUP BY col1
----
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT + 76 + - 30 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT DISTINCT + 92 FROM tab1 GROUP BY tab1.col1
----
92

query I rowsort
SELECT DISTINCT 68 AS col1 FROM tab0 GROUP BY col1
----
68

query I rowsort
SELECT cor0.col2 - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - tab0.col0 + - col0 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

query I rowsort
SELECT - + 79 FROM tab1 GROUP BY tab1.col2
----
-79
-79
-79

query I rowsort
SELECT ALL + + col1 AS col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL cor0.col1 * - 39 FROM tab2 cor0 GROUP BY cor0.col1
----
-1599
-2301
-2379

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT - - 87 FROM tab0 GROUP BY tab0.col1
----
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT + cor0.col0 * + ( - 28 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1204
-2324
-728

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0
0
81

query I rowsort
SELECT DISTINCT 68 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
68

query I rowsort
SELECT DISTINCT + ( - 19 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-19

query I rowsort
SELECT 79 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
79
79
79

query I rowsort
SELECT DISTINCT - 15 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-15

onlyif mysql # DIV for integer division: 
query I rowsort label-8732
SELECT 92 DIV 74 AS col1 FROM tab2 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8732
SELECT 92 / 74 AS col1 FROM tab2 GROUP BY col0
----
1
1
1

query I rowsort
SELECT DISTINCT 25 FROM tab1 GROUP BY tab1.col2
----
25

query I rowsort
SELECT DISTINCT 52 FROM tab1 GROUP BY tab1.col0
----
52

onlyif mysql # DIV for integer division: 
query I rowsort label-8735
SELECT DISTINCT - - tab0.col1 DIV + 43 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-8735
SELECT DISTINCT - - tab0.col1 / + 43 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 + tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT - 27 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-27
-27
-27

onlyif mysql # DIV for integer division: 
query I rowsort label-8738
SELECT 80 DIV 59 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1
1

skipif mysql # not compatible
query I rowsort label-8738
SELECT 80 / 59 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1
1

query I rowsort
SELECT 85 FROM tab1 AS cor0 GROUP BY cor0.col2
----
85
85
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( + 76 ) col2 FROM tab2 GROUP BY tab2.col0
----
76
76
76

query I rowsort
SELECT ALL - col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL + 28 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
2268

query I rowsort
SELECT - - 93 AS col0 FROM tab2 GROUP BY tab2.col2
----
93
93
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 81 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 88 col0 FROM tab1 AS cor0 GROUP BY col1
----
88
88
88

query I rowsort
SELECT ALL - 64 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-64
-64
-64

query I rowsort
SELECT 17 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
17
17
17

query I rowsort
SELECT - 18 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-18
-18
-18

query I rowsort
SELECT DISTINCT 60 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
60

query I rowsort
SELECT DISTINCT 94 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col2
----
94

query I rowsort
SELECT + tab1.col1 + 45 FROM tab1 GROUP BY tab1.col1
----
102
51
89

query I rowsort
SELECT + cor0.col0 * cor0.col2 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1232
154
5740

query I rowsort
SELECT ALL + 3 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT DISTINCT 24 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1896
576
912

query I rowsort
SELECT ALL + 95 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, col1
----
95
95
95

query I rowsort
SELECT 9 AS col2 FROM tab0 GROUP BY col0
----
9
9
9

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8758
SELECT - COALESCE ( 75, 75 * tab1.col2 ) + - CAST( - 33 AS SIGNED ) FROM tab1 GROUP BY col2
----
-42
-42
-42

skipif mysql # not compatible
query I rowsort label-8758
SELECT - COALESCE ( 75, 75 * tab1.col2 ) + - CAST ( - 33 AS INTEGER ) FROM tab1 GROUP BY col2
----
-42
-42
-42

query I rowsort
SELECT ALL - 17 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-17
-17
-17

query I rowsort
SELECT DISTINCT - - 78 FROM tab2 GROUP BY col0
----
78

query I rowsort
SELECT DISTINCT - ( - 50 ) FROM tab0 GROUP BY tab0.col1
----
50

query I rowsort
SELECT 33 FROM tab0 GROUP BY tab0.col0
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col2 + - col2 * - col2 col1 FROM tab2 GROUP BY tab2.col2
----
3306
6162
7482

query I rowsort
SELECT DISTINCT 17 FROM tab2 AS cor0 GROUP BY col0
----
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + 12 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
70
91
99

query I rowsort
SELECT ALL col0 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
166
52
86

query I rowsort
SELECT - ( - tab1.col2 ) + tab1.col2 * + 30 AS col1 FROM tab1 GROUP BY tab1.col2
----
1395
2201
248

query I rowsort
SELECT - 21 + + 81 FROM tab1 GROUP BY tab1.col1
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 80 col0 FROM tab0 GROUP BY tab0.col1
----
80
80

query I rowsort
SELECT DISTINCT + 26 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26

query I rowsort
SELECT cor0.col0 * - 33 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2706
-726
-924

query I rowsort
SELECT ( + col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( + 53, cor0.col0, - 24 * NULLIF ( col0, + cor0.col1 * - cor0.col1 ), 61 ) FROM tab1 cor0 GROUP BY col1
----
53
53
53

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-8776
SELECT DISTINCT - cor0.col2 DIV - 23 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2
3

skipif mysql # not compatible
query I rowsort label-8776
SELECT DISTINCT - cor0.col2 / - 23 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 - + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-105
-121
-67

onlyif mysql # DIV for integer division: 
query I rowsort label-8778
SELECT ALL cor0.col1 DIV + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, col1, cor0.col1
----
0
0
4

skipif mysql # not compatible
query I rowsort label-8778
SELECT ALL cor0.col1 / + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, col1, cor0.col1
----
0
0
4

query I rowsort
SELECT DISTINCT 44 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
44

onlyif mysql # DIV for integer division: 
query I rowsort label-8780
SELECT ALL - cor0.col1 * - cor0.col1 + + 91 DIV + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
1937
3251
47

skipif mysql # not compatible
query I rowsort label-8780
SELECT ALL - cor0.col1 * - cor0.col1 + + 91 / + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
1937
3251
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 84 col0 FROM tab2 GROUP BY tab2.col2
----
-84
-84
-84

query I rowsort
SELECT - 46 AS col2 FROM tab1 GROUP BY tab1.col2
----
-46
-46
-46

query I rowsort
SELECT tab1.col1 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL 50 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2900
-3950
-4350

query I rowsort
SELECT DISTINCT 33 * + 82 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2706

query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col1, col0
----
3772
5369
915

query I rowsort
SELECT ALL + 64 AS col1 FROM tab2 GROUP BY tab2.col2
----
64
64
64

query I rowsort
SELECT 81 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
81
81
81

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
26
43
83

query I rowsort
SELECT DISTINCT + cor0.col1 * - ( + cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT cor0.col2 * + 86 FROM tab2 AS cor0 GROUP BY col2
----
4988
6794
7482

query I rowsort
SELECT ALL - + tab0.col0 * - tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT + - 67 AS col0 FROM tab1 GROUP BY tab1.col2
----
-67
-67
-67

query I rowsort
SELECT + 28 * - 16 FROM tab1 GROUP BY tab1.col0
----
-448
-448
-448

query I rowsort
SELECT 52 AS col2 FROM tab0 GROUP BY tab0.col0
----
52
52
52

query I rowsort
SELECT ALL - 49 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-49
-49

query I rowsort
SELECT 50 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
2200
2850
300

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 87 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
87
87
87

onlyif mysql # DIV for integer division: 
query I rowsort label-8800
SELECT DISTINCT + ( - cor0.col0 ) DIV cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1

skipif mysql # not compatible
query I rowsort label-8800
SELECT DISTINCT + ( - cor0.col0 ) / cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1

query I rowsort
SELECT cor1.col1 + - cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + - tab1.col1 + - 41 FROM tab1 GROUP BY tab1.col1
----
-47
-85
-98

query I rowsort
SELECT DISTINCT + - tab0.col0 * 72 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1872
-3096
-5976

query I rowsort
SELECT ALL tab2.col1 FROM tab2 WHERE NOT - tab2.col1 IS NULL GROUP BY tab2.col1 HAVING NULL IS NULL
----
41
59
61

query I rowsort
SELECT 90 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
90
90
90

query I rowsort
SELECT ALL + 48 FROM tab2 GROUP BY col1
----
48
48
48

query I rowsort
SELECT col0 - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-38
26
83

query I rowsort
SELECT ALL - cor0.col0 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-133
-150
-76

query I rowsort
SELECT DISTINCT - cor0.col0 - cor0.col1 * - 55 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
2163
3154
3340

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0

query I rowsort
SELECT 67 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 17 ) * + cor0.col0 col1 FROM tab2 cor0 GROUP BY cor0.col0
----
1547
1564
255

query I rowsort
SELECT - 48 FROM tab1 GROUP BY col0
----
-48
-48
-48

query I rowsort
SELECT - 14 FROM tab2 GROUP BY tab2.col0
----
-14
-14
-14

query I rowsort
SELECT ALL 34 FROM tab2 AS cor0 GROUP BY cor0.col2
----
34
34
34

query I rowsort
SELECT DISTINCT + ( - 31 ) AS col1 FROM tab2 GROUP BY col2
----
-31

query I rowsort
SELECT + + 45 FROM tab2 GROUP BY col1
----
45
45
45

query I rowsort
SELECT ALL + col2 + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT DISTINCT - 53 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-53

query I rowsort
SELECT ALL - - tab0.col1 - + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL 71 FROM tab1 GROUP BY tab1.col1
----
71
71
71

query I rowsort
SELECT ALL 98 AS col2 FROM tab0 GROUP BY tab0.col1
----
98
98

query I rowsort
SELECT ALL + - 32 * col2 FROM tab2 GROUP BY col2
----
-1856
-2528
-2784

query I rowsort
SELECT DISTINCT 0 AS col0 FROM tab0 GROUP BY tab0.col2
----
0

query I rowsort
SELECT DISTINCT 47 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
130
73
90

query I rowsort
SELECT ALL 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
40
40
40

query I rowsort
SELECT ALL cor0.col2 * col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
3364
6241
7569

query I rowsort
SELECT NULLIF ( + cor0.col0, cor0.col0 ) + - 79 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 20 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
20

query I rowsort
SELECT + - 4 FROM tab0 GROUP BY tab0.col0
----
-4
-4
-4

query I rowsort
SELECT ALL 52 * + 75 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
3900
3900
3900

query I rowsort
SELECT ALL tab1.col0 * 24 FROM tab1 GROUP BY tab1.col0
----
1968
528
672

query I rowsort
SELECT + + 30 AS col1 FROM tab0 GROUP BY col0
----
30
30
30

query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 - + cor0.col2 FROM tab1 cor0 GROUP BY col2
----
1980
4970
56

query I rowsort
SELECT ALL + + col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL tab1.col1 * col1 + + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1980
3306
42

query I rowsort
SELECT DISTINCT 25 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
66
84
86

query I rowsort
SELECT DISTINCT 87 FROM tab2 GROUP BY col1
----
87

query I rowsort
SELECT - 6 AS col0 FROM tab2 GROUP BY tab2.col2
----
-6
-6
-6

query I rowsort
SELECT + 53 AS col1 FROM tab1 GROUP BY tab1.col2
----
53
53
53

query I rowsort
SELECT DISTINCT - + 55 FROM tab0 GROUP BY tab0.col2
----
-55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 35 * - tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
1435
2065
2135

query I rowsort
SELECT + 59 * 93 FROM tab0 cor0 GROUP BY col2
----
5487
5487
5487

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
142
16
90

onlyif mysql # DIV for integer division: 
query I rowsort label-8846
SELECT ALL col0 DIV 14 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
1
6
6

skipif mysql # not compatible
query I rowsort label-8846
SELECT ALL col0 / 14 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
1
6
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8847
SELECT - CAST( - 34 AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY col2
----
34
34
34

skipif mysql # not compatible
query I rowsort label-8847
SELECT - CAST ( - 34 AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY col2
----
34
34
34

query I rowsort
SELECT cor0.col1 + 90 FROM tab1 AS cor0 GROUP BY col1
----
134
147
96

onlyif mysql # DIV for integer division: 
query I rowsort label-8849
SELECT - 79 DIV 82 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8849
SELECT - 79 / 82 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT ALL - 91 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-91
-91
-91

query I rowsort
SELECT DISTINCT 2 AS col2 FROM tab1 GROUP BY tab1.col1
----
2

query I rowsort
SELECT ALL NULLIF ( - cor0.col2, - 93 ) * - 43 + 24 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1056
1658
3421

query I rowsort
SELECT ALL + tab2.col2 * - 90 + 18 AS col1 FROM tab2 GROUP BY tab2.col2
----
-5202
-7092
-7812

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT - 41 FROM tab1 cor0 GROUP BY col1
----
-41
-41
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col2 + + tab1.col2 * tab1.col2 col1 FROM tab1 GROUP BY col2
----
1980
4970
56

query I rowsort
SELECT ALL 53 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
53
53
53

query I rowsort
SELECT ALL - cor0.col2 - - col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT 60 FROM tab2 AS cor0 GROUP BY cor0.col2
----
60

query I rowsort
SELECT ALL - + 14 FROM tab0 GROUP BY tab0.col0
----
-14
-14
-14

query I rowsort
SELECT ALL - 95 * 41 FROM tab2 GROUP BY tab2.col1
----
-3895
-3895
-3895

query I rowsort
SELECT ALL + 75 * - 10 FROM tab2 GROUP BY tab2.col1
----
-750
-750
-750

query I rowsort
SELECT ALL - - tab2.col1 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + 56 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, cor0.col2
----
56

query I rowsort
SELECT ALL cor0.col1 + - cor0.col1 * + COALESCE ( + cor0.col1, - cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-6480
0

query I rowsort
SELECT ALL 34 AS col0 FROM tab0 GROUP BY tab0.col0
----
34
34
34

query I rowsort
SELECT ALL + tab2.col1 FROM tab2 GROUP BY col1 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 * + tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT cor0.col0 + 63 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
145
85
91

query I rowsort
SELECT - cor0.col1 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-12
2
27

query I rowsort
SELECT - cor0.col1 + - cor0.col2 * cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
-2082
-5085
-70

query I rowsort
SELECT - 24 * col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1056
-1368
-144

query I rowsort
SELECT + - tab2.col2 - + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - + 3 AS col1 FROM tab2 GROUP BY tab2.col1
----
-3
-3
-3

query I rowsort
SELECT DISTINCT col1 + 43 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
124
43

query I rowsort
SELECT ALL - - 30 FROM tab1 GROUP BY tab1.col2
----
30
30
30

query I rowsort
SELECT ALL 9 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
369
531
549

query I rowsort
SELECT ALL - 32 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1216
-2528
-768

query I rowsort
SELECT ALL tab1.col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT - ( + 48 ) FROM tab0 GROUP BY col2
----
-48
-48
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 49 col2 FROM tab1 GROUP BY col1
----
49
49
49

query I rowsort
SELECT cor0.col2 + - 8 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
37
63

query I rowsort
SELECT ALL + 82 FROM tab0 GROUP BY col2
----
82
82
82

query I rowsort
SELECT ALL + tab0.col2 AS col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - col2 * 23 - col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1392
-1896
-2088

query I rowsort
SELECT ( 16 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
16
16
16

query I rowsort
SELECT 43 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1763
-2537
-2623

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 81 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT DISTINCT tab2.col0 - + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT ALL tab1.col1 + col1 AS col2 FROM tab1 GROUP BY col1
----
114
12
88

query I rowsort
SELECT ALL tab1.col1 FROM tab1 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
44
57
6

query I rowsort
SELECT + col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL <> + col0
----

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT DISTINCT 4 * + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
104
172
332

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 22 + cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-16
22
35

query I rowsort
SELECT - 89 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-89
-89
-89

query I rowsort
SELECT ALL cor0.col1 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
1944

query I rowsort
SELECT ALL - + 88 FROM tab1 GROUP BY tab1.col0
----
-88
-88
-88

query I rowsort
SELECT + + 0 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL - cor0.col2 - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-116
-158
-174

query I rowsort
SELECT + 14 - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-67
14

query I rowsort
SELECT - 11 + - col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-3375
-6252
-7580

onlyif mysql # DIV for integer division: 
query I rowsort label-8905
SELECT ALL col2 DIV tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8905
SELECT ALL col2 / tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
1
1
1

query I rowsort
SELECT ALL + + 75 FROM tab1 GROUP BY col0
----
75
75
75

query I rowsort
SELECT DISTINCT - 80 FROM tab0 GROUP BY tab0.col1
----
-80

query I rowsort
SELECT DISTINCT 29 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-52
29

query I rowsort
SELECT DISTINCT + 27 FROM tab2 GROUP BY tab2.col1
----
27

query I rowsort
SELECT - 22 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-22
-22

query I rowsort
SELECT DISTINCT - - 91 FROM tab1 GROUP BY col1
----
91

query I rowsort
SELECT + 90 FROM tab0 AS cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT - - 5 + - 56 FROM tab0 GROUP BY tab0.col0
----
-51
-51
-51

query I rowsort
SELECT + + 60 AS col0 FROM tab2 GROUP BY tab2.col0
----
60
60
60

query I rowsort
SELECT DISTINCT + 34 FROM tab2 AS cor0 GROUP BY col2
----
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 23 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-23
-23
-23

query I rowsort
SELECT DISTINCT 18 FROM tab0 cor0 GROUP BY cor0.col0
----
18

query I rowsort
SELECT + 85 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
2210
3655
7055

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 88 * cor0.col0 col1 FROM tab0 AS cor0 GROUP BY col0
----
-2288
-3784
-7304

query I rowsort
SELECT - ( + 93 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-93
-93
-93

query I rowsort
SELECT - 22 * 9 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-198
-198

query I rowsort
SELECT cor0.col2 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0, cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL - cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - 77 AS col0 FROM tab0 GROUP BY tab0.col0
----
-77
-77
-77

query I rowsort
SELECT + 99 AS col0 FROM tab1 GROUP BY tab1.col0
----
99
99
99

query I rowsort
SELECT ALL col0 * tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT + tab2.col0 * - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 * - tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

onlyif mysql # DIV for integer division: 
query I rowsort label-8931
SELECT - tab2.col0 DIV - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8931
SELECT - tab2.col0 / - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
41
59
61

query I rowsort
SELECT 77 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT ALL 51 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT - cor0.col0 + - 54 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
-137
-80
-97

query I rowsort
SELECT DISTINCT - tab0.col2 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT 78 FROM tab0 GROUP BY col1
----
78

query I rowsort
SELECT 5 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
5
5

query I rowsort
SELECT DISTINCT 53 AS col2 FROM tab1 cor0 GROUP BY col0
----
53

query I rowsort
SELECT ALL - 1 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
-1
-1
-1

query I rowsort
SELECT - 84 FROM tab2 AS cor0 GROUP BY col0
----
-84
-84
-84

query I rowsort
SELECT - 14 * - 80 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
1135
1211
1212

query I rowsort
SELECT ALL cor0.col1 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL - - tab1.col2 - - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT cor0.col0 - 32 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-17
59
60

query I rowsort
SELECT DISTINCT + cor0.col0 * ( cor0.col0 ) + col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
1892
6972
702

query I rowsort
SELECT DISTINCT - - tab2.col1 + 8 FROM tab2 GROUP BY tab2.col1
----
49
67
69

query I rowsort
SELECT ALL 13 FROM tab1 GROUP BY tab1.col1
----
13
13
13

query I rowsort
SELECT DISTINCT + cor0.col1 - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT 47 FROM tab2 GROUP BY tab2.col0
----
47
47
47

query I rowsort
SELECT - 46 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-46
-46
-46

query I rowsort
SELECT ALL + col1 FROM tab0 WHERE NULL IS NULL GROUP BY col1 HAVING NOT NULL IN ( tab0.col1 )
----

query I rowsort
SELECT tab0.col0 AS col2 FROM tab0 WHERE NOT NULL IS NULL GROUP BY tab0.col0
----

query I rowsort
SELECT ALL 18 FROM tab0 GROUP BY col2
----
18
18
18

query I rowsort
SELECT 93 AS col1 FROM tab0 GROUP BY tab0.col0
----
93
93
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 29 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-29
-29
-29

query I rowsort
SELECT 3 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
3
3

query I rowsort
SELECT - cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1681
-3481
-3721

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + col0 - COALESCE ( 38, cor0.col0 * - col2 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-10
-16
44

query I rowsort
SELECT DISTINCT 53 * 55 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
2915

query I rowsort
SELECT ALL ( cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT + + 78 AS col0 FROM tab2 GROUP BY col1
----
78
78
78

query I rowsort
SELECT cor0.col0 * 17 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1547
1564
255

query I rowsort
SELECT ALL + 75 FROM tab0 AS cor0 GROUP BY cor0.col0
----
75
75
75

query I rowsort
SELECT ALL NULLIF ( - 6, + cor0.col0 ) + 3 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-3
-3
-3

onlyif mysql # DIV for integer division: 
query I rowsort label-8967
SELECT DISTINCT col1 DIV - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
-1

skipif mysql # not compatible
query I rowsort label-8967
SELECT DISTINCT col1 / - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
-1

query I rowsort
SELECT DISTINCT + 75 FROM tab2 AS cor0 GROUP BY cor0.col2
----
75

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
44
57
6

query I rowsort
SELECT - + col0 + + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT 32 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col0
----
32
32
32

query I rowsort
SELECT - tab1.col2 + 99 FROM tab1 GROUP BY tab1.col2
----
28
54
91

query I rowsort
SELECT cor0.col0 * + 65 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
1690
2795
5395

query I rowsort
SELECT ( 89 ) - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2
-3
74

query I rowsort
SELECT DISTINCT 24 FROM tab2 AS cor0 GROUP BY cor0.col2
----
24

query I rowsort
SELECT 92 + - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
13
34
5

query I rowsort
SELECT DISTINCT - 53 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 6 col1 FROM tab1 GROUP BY tab1.col0
----
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT 25 + + 56 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 * 27 col2 FROM tab0 GROUP BY col1
----
0
2187

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2565
3124
48

query I rowsort
SELECT + tab0.col1 FROM tab0 WHERE NULL IN ( tab0.col2 ) GROUP BY tab0.col1
----

query I rowsort
SELECT 4 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
4
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 14 + + 57 col2 FROM tab1 cor0 GROUP BY cor0.col0
----
71
71
71

onlyif mysql # DIV for integer division: 
query I rowsort label-8986
SELECT ALL + 35 DIV + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8986
SELECT ALL + 35 / + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT 92 AS col1 FROM tab0 cor0 GROUP BY col2
----
92
92
92

query I rowsort
SELECT + 49 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
49
49
49

query I rowsort
SELECT + col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL 37 - 20 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT + - 41 FROM tab2 GROUP BY tab2.col2
----
-41
-41
-41

query I rowsort
SELECT DISTINCT tab2.col1 + - tab2.col1 * - 10 AS col0 FROM tab2 GROUP BY tab2.col1
----
451
649
671

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * cor0.col2 col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL + 68 FROM tab2 GROUP BY tab2.col2
----
68
68
68

query I rowsort
SELECT ALL + + tab2.col2 * - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT - 28 FROM tab2 cor0 GROUP BY cor0.col2
----
-28
-28
-28

query I rowsort
SELECT - 91 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-76
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-8999
SELECT ALL 51 DIV - tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
-1
-2
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8999
SELECT ALL 51 / - tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
-1
-2
0

query I rowsort
SELECT 64 + + 84 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
148
148
148

query I rowsort
SELECT ALL 33 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
33
33
33

query I rowsort
SELECT - cor0.col0 + - 54 FROM tab0 AS cor0 GROUP BY col0
----
-137
-80
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab0.col2 col0 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT + tab1.col0 - tab1.col0 FROM tab1 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL - - ( tab2.col1 ) AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + + col2 * 69 FROM tab1 GROUP BY tab1.col2
----
3105
4899
552

query I rowsort
SELECT DISTINCT 86 FROM tab0 GROUP BY tab0.col1
----
86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9008
SELECT DISTINCT CAST( NULL AS SIGNED ) col1 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9008
SELECT DISTINCT CAST ( NULL AS INTEGER ) col1 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT - 36 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-36
-36
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-9010
SELECT 47 DIV col1 FROM tab1 GROUP BY tab1.col1
----
0
1
7

skipif mysql # not compatible
query I rowsort label-9010
SELECT 47 / col1 FROM tab1 GROUP BY tab1.col1
----
0
1
7

query I rowsort
SELECT 5 FROM tab0 AS cor0 GROUP BY cor0.col1
----
5
5

query I rowsort
SELECT DISTINCT 6 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
6

query I rowsort
SELECT + 84 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1
41
58

query I rowsort
SELECT - 69 FROM tab2 GROUP BY tab2.col0
----
-69
-69
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 col0 FROM tab1 GROUP BY col1
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9016
SELECT - col1 + + CAST( NULL AS SIGNED ) / cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9016
SELECT - col1 + + CAST ( NULL AS INTEGER ) / cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 57 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-57

query I rowsort
SELECT DISTINCT - 37 - - cor0.col0 * - 53 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1203
-1521
-4383

query I rowsort
SELECT ALL - 95 FROM tab2 GROUP BY tab2.col2
----
-95
-95
-95

query I rowsort
SELECT 81 + + cor1.col1 AS col2 FROM tab2 cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
122
140
142

query I rowsort
SELECT 89 + + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
170
89

query I rowsort
SELECT 73 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1898
-3139
-6059

query I rowsort
SELECT - + 79 - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-170
-171
-94

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9024
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-9024
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL

query I rowsort
SELECT 41 FROM tab1 GROUP BY tab1.col0
----
41
41
41

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col1 * - 66 col0 FROM tab1 GROUP BY tab1.col1
----
2904
3762
396

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 8 FROM tab2 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT DISTINCT + 9 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
9

query I rowsort
SELECT + col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT 89 FROM tab0 GROUP BY tab0.col0
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + + cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT 63 FROM tab1 AS cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT + 94 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
94
94
94

query I rowsort
SELECT + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-9038
SELECT + tab0.col1 DIV - 20 - - 23 FROM tab0 GROUP BY col1
----
19
23

skipif mysql # not compatible
query I rowsort label-9038
SELECT + tab0.col1 / - 20 - - 23 FROM tab0 GROUP BY col1
----
19
23

query I rowsort
SELECT COALESCE ( 88, - cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
88
88
88

query I rowsort
SELECT DISTINCT + - tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 46 col1 FROM tab1 GROUP BY tab1.col1
----
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 91 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
91
91
91

query I rowsort
SELECT ALL - 19 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, col0
----
-19
-19
-19

query I rowsort
SELECT ALL + - col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - cor0.col2 + - NULLIF ( + 15, - cor0.col2 ) FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-23
-60
-86

query I rowsort
SELECT + 72 * - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1728
-2736
-5688

query I rowsort
SELECT - 8 FROM tab1 GROUP BY tab1.col2
----
-8
-8
-8

query I rowsort
SELECT - tab1.col0 * + 91 AS col0 FROM tab1 GROUP BY tab1.col0
----
-2002
-2548
-7462

onlyif mysql # DIV for integer division: 
query I rowsort label-9049
SELECT + 49 + + 62 DIV cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
50
50
59

skipif mysql # not compatible
query I rowsort label-9049
SELECT + 49 + + 62 / cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
50
50
59

query I rowsort
SELECT ALL 36 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
36
36

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT - - 99 AS col0 FROM tab1 GROUP BY tab1.col1
----
99
99
99

query I rowsort
SELECT ALL - col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + 20 FROM tab0 AS cor0 GROUP BY col1
----
20

query I rowsort
SELECT DISTINCT 53 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1378
2279
4399

onlyif mysql # DIV for integer division: 
query I rowsort label-9056
SELECT 99 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9056
SELECT 99 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT 58 FROM tab0 AS cor0 GROUP BY cor0.col2
----
58

query I rowsort
SELECT + 19 + cor0.col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
27
64
90

query I rowsort
SELECT - 75 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-75
-75
-75

onlyif mysql # DIV for integer division: 
query I rowsort label-9060
SELECT cor0.col2 DIV 35 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-9060
SELECT cor0.col2 / 35 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
2

query I rowsort
SELECT 54 FROM tab1 AS cor0 GROUP BY cor0.col1
----
54
54
54

query I rowsort
SELECT DISTINCT - 72 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-72

query I rowsort
SELECT DISTINCT - 37 FROM tab2 GROUP BY tab2.col1
----
-37

query I rowsort
SELECT DISTINCT 61 AS col1 FROM tab0 GROUP BY tab0.col2
----
61

query I rowsort
SELECT cor0.col1 * col1 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT 83 * cor0.col1 + - cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
534
5588
7980

query I rowsort
SELECT + col0 * + cor0.col0 AS col2 FROM tab1 cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT - tab1.col1 + tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT 9 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
234
387
747

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col1 * - tab1.col1 col2 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT + + col1 - + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT col2 - cor0.col2 AS col1 FROM tab2 cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

query I rowsort
SELECT ALL - + tab0.col0 * - tab0.col0 FROM tab0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT - 21 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-1239
-1281
-861

query I rowsort
SELECT ALL + cor0.col1 * + cor0.col1 + + 87 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
123
2023
3336

query I rowsort
SELECT + + 17 FROM tab2 GROUP BY tab2.col0
----
17
17
17

query I rowsort
SELECT - tab2.col0 + + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT + 96 FROM tab0 AS cor0 GROUP BY col2
----
96
96
96

query I rowsort
SELECT tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NULL
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9081
SELECT ALL + - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9081
SELECT ALL + - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 6 FROM tab1 GROUP BY tab1.col0
----
6
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 73 col0 FROM tab0 AS cor0 GROUP BY col2
----
73
73
73

query I rowsort
SELECT DISTINCT tab0.col1 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT 88 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
88
88
88

query I rowsort
SELECT COALESCE ( - cor0.col1, + cor0.col2 ) * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-6561
0
0

query I rowsort
SELECT ALL - - ( + 57 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col1 * tab0.col1 + tab0.col1 col0 FROM tab0 GROUP BY col1
----
0
6642

query I rowsort
SELECT ALL cor0.col1 - + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
26
43
83

query I rowsort
SELECT + 31 FROM tab2 GROUP BY col2
----
31
31
31

query I rowsort
SELECT + 97 FROM tab0 cor0 GROUP BY cor0.col1
----
97
97

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9093
SELECT + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9093
SELECT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 24 FROM tab1 GROUP BY tab1.col2
----
24
24
24

query I rowsort
SELECT 53 + - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-29
25
31

query I rowsort
SELECT 47 FROM tab1 AS cor0 GROUP BY col0
----
47
47
47

query I rowsort
SELECT ALL 5 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
5
5
5

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT 47 AS col1 FROM tab2 GROUP BY col2
----
47
47
47

query I rowsort
SELECT + ( 59 ) + col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
117
138
146

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-9103
SELECT col2 DIV 35 FROM tab1 cor0 GROUP BY cor0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-9103
SELECT col2 / 35 FROM tab1 cor0 GROUP BY cor0.col2
----
0
1
2

onlyif mysql # DIV for integer division: 
query I rowsort label-9104
SELECT + 18 DIV - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-9104
SELECT + 18 / - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-3
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT 14 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
14
14
14

query I rowsort
SELECT + 40 + - col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
-19
-21

query I rowsort
SELECT cor0.col0 + 79 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
101
107
161

query I rowsort
SELECT DISTINCT - 90 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-90

query I rowsort
SELECT tab2.col0 + - 33 FROM tab2 GROUP BY tab2.col0
----
-18
58
59

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + 68 FROM tab0 cor0 GROUP BY cor0.col0
----
68
68
68

query I rowsort
SELECT DISTINCT + 93 FROM tab2 AS cor0 GROUP BY col2
----
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 col1 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9115
SELECT + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9115
SELECT + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT 84 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2016
3192
6636

query I rowsort
SELECT DISTINCT + 12 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
12

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9118
SELECT CAST( NULL AS SIGNED ) / + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9118
SELECT CAST ( NULL AS INTEGER ) / + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - ( cor0.col0 ) * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 84 * - COALESCE ( cor0.col2 * + 35, 72, cor0.col2 * cor0.col0, 46 + - cor0.col1 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-132300
-208740
-23520

query I rowsort
SELECT DISTINCT 12 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
12

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) IS NOT NULL AND NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT + cor0.col0 * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT - 48 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-48

query I rowsort
SELECT tab0.col2 FROM tab0 WHERE NULL IS NULL GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT 20 AS col1 FROM tab0 GROUP BY tab0.col0
----
20
20
20

query I rowsort
SELECT - - 11 AS col2 FROM tab2 GROUP BY tab2.col1
----
11
11
11

query I rowsort
SELECT + - tab0.col2 * - 12 FROM tab0 GROUP BY tab0.col2
----
288
456
948

query I rowsort
SELECT + - ( 59 ) * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1298
1652
4838

query I rowsort
SELECT DISTINCT + tab2.col1 + + col1 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1722
3540
3782

query I rowsort
SELECT + - 38 * 10 - + col2 FROM tab0 GROUP BY tab0.col2
----
-404
-418
-459

query I rowsort
SELECT + + 41 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
2378
3239
3567

query I rowsort
SELECT cor0.col2 * - col2 + - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2070
-5112
-72

query I rowsort
SELECT + - 17 AS col1 FROM tab0 GROUP BY tab0.col1
----
-17
-17

onlyif mysql # DIV for integer division: 
query I rowsort label-9135
SELECT - cor0.col0 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9135
SELECT - cor0.col0 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9136
SELECT ALL cor0.col1 - CAST( NULL AS SIGNED ) AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9136
SELECT ALL cor0.col1 - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 97 FROM tab0 AS cor0 GROUP BY cor0.col2
----
97
97
97

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL tab0.col0 * + ( 32 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
1376
2656
832

query I rowsort
SELECT DISTINCT + col0 - + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0

query I rowsort
SELECT ALL - cor0.col2 * - col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0, cor0.col2
----
1444
576
6241

onlyif mysql # DIV for integer division: 
query I rowsort label-9142
SELECT ALL + cor0.col0 DIV ( 52 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9142
SELECT ALL + cor0.col0 / ( 52 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT + tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL >= NULL
----

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9144
SELECT ALL + + CAST( NULL AS SIGNED ) - 25 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9144
SELECT ALL + + CAST ( NULL AS INTEGER ) - 25 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( + 3, + cor0.col2, - cor0.col2 + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT + - ( col0 ) AS col2 FROM tab2 GROUP BY col0
----
-15
-91
-92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9147
SELECT ALL CAST( NULL AS SIGNED ) - 54 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9147
SELECT ALL CAST ( NULL AS INTEGER ) - 54 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-9148
SELECT ALL + - tab1.col1 DIV + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9148
SELECT ALL + - tab1.col1 / + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT ALL - 33 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2706
-726
-924

query I rowsort
SELECT DISTINCT - 55 AS col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-55

onlyif mysql # DIV for integer division: 
query I rowsort label-9151
SELECT - 36 DIV + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9151
SELECT - 36 / + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NULL
----
0
81

query I rowsort
SELECT - 57 FROM tab1 cor0 GROUP BY cor0.col1
----
-57
-57
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col0 + + 94 * tab0.col0 col2 FROM tab0 GROUP BY col0
----
2470
4085
7885

query I rowsort
SELECT tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT ( - tab2.col0 ) IN ( tab2.col0 )
----
15
91
92

query I rowsort
SELECT + - 57 FROM tab0 GROUP BY tab0.col2
----
-57
-57
-57

query I rowsort
SELECT ALL + 39 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
39
39
39

query I rowsort
SELECT 87 AS col0 FROM tab0 GROUP BY tab0.col1
----
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 24 col1 FROM tab1 GROUP BY tab1.col1
----
24
24
24

query I rowsort
SELECT 50 * - 59 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2950
-2950
-2950

query I rowsort
SELECT DISTINCT - cor0.col1 + - 48 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-107
-109
-89

query I rowsort
SELECT DISTINCT tab1.col0 * tab1.col0 + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IN ( - tab1.col0 + - tab1.col0 )
----

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0

query I rowsort
SELECT - 57 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
-57
-57
-57

query I rowsort
SELECT - cor0.col2 * cor0.col2 - - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1980
-4970
-56

query I rowsort
SELECT DISTINCT - tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT ALL + cor0.col2 * - 84 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3780
-5964
-672

query I rowsort
SELECT DISTINCT 48 AS col2 FROM tab0 GROUP BY tab0.col2
----
48

query I rowsort
SELECT DISTINCT + 1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT + 13 - + 5 FROM tab2 GROUP BY tab2.col1
----
8
8
8

query I rowsort
SELECT DISTINCT 71 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
71

onlyif mysql # DIV for integer division: 
query I rowsort label-9172
SELECT DISTINCT + cor0.col0 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-9172
SELECT DISTINCT + cor0.col0 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
1

query I rowsort
SELECT DISTINCT 98 - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
37
39
57

onlyif mysql # DIV for integer division: 
query I rowsort label-9174
SELECT ALL - tab1.col1 DIV - col1 FROM tab1 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9174
SELECT ALL - tab1.col1 / - col1 FROM tab1 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
1
1
1

query I rowsort
SELECT ALL 33 AS col0 FROM tab0 GROUP BY tab0.col0
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 72 - - 29 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-43

query I rowsort
SELECT + NULLIF ( + tab0.col2, tab0.col2 ) * 5 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 98 AS col2 FROM tab2 GROUP BY tab2.col2
----
98
98
98

query I rowsort
SELECT tab0.col2 - 77 AS col2 FROM tab0 GROUP BY tab0.col2
----
-39
-53
2

query I rowsort
SELECT DISTINCT - 26 AS col1 FROM tab0 GROUP BY tab0.col2
----
-26

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT ALL 1 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT + cor0.col2 + + 25 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
104
49
63

query I rowsort
SELECT ALL - tab0.col1 FROM tab0 GROUP BY col1 HAVING - tab0.col1 IS NULL
----

query I rowsort
SELECT DISTINCT - tab0.col0 * tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + tab0.col1 * COALESCE ( - 29, - tab0.col0 * - col2 ) FROM tab0 GROUP BY tab0.col1
----
-2349
0

query I rowsort
SELECT ALL + tab0.col0 + 98 * + 40 AS col2 FROM tab0 GROUP BY tab0.col0
----
3946
3963
4003

query I rowsort
SELECT - cor0.col1 - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-162
0

query I rowsort
SELECT DISTINCT - 16 AS col1 FROM tab0 GROUP BY tab0.col0
----
-16

query I rowsort
SELECT ALL + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
24
38
79

query I rowsort
SELECT - tab0.col1 * 45 FROM tab0 GROUP BY tab0.col1
----
-3645
0

query I rowsort
SELECT + 68 FROM tab1 AS cor0 GROUP BY cor0.col1
----
68
68
68

query I rowsort
SELECT DISTINCT - tab1.col2 * + col2 - + col2 FROM tab1 GROUP BY tab1.col2
----
-2070
-5112
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT col1 + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT DISTINCT 67 FROM tab2 AS cor0 GROUP BY cor0.col1
----
67

query I rowsort
SELECT + 37 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
37
37
37

onlyif mysql # DIV for integer division: 
query I rowsort label-9198
SELECT ALL - + 4 * tab0.col0 + + 33 DIV tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-103
-172
-332

skipif mysql # not compatible
query I rowsort label-9198
SELECT ALL - + 4 * tab0.col0 + + 33 / tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-103
-172
-332

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT - 76 AS col2 FROM tab1 GROUP BY col0
----
-76
-76
-76

query I rowsort
SELECT DISTINCT - 6 * - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
546
552
90

query I rowsort
SELECT - cor0.col0 * cor0.col0 + col0 FROM tab2 AS cor0 GROUP BY col0
----
-210
-8190
-8372

query I rowsort
SELECT ALL - 28 AS col0 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-28
-28

query I rowsort
SELECT DISTINCT - - 0 AS col0 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT DISTINCT 6 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
6

query I rowsort
SELECT - tab1.col1 + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL + + 71 * - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1065
-6461
-6532

query I rowsort
SELECT ALL tab0.col2 FROM tab0 WHERE NULL IS NULL GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
41
59
61

query I rowsort
SELECT - 76 AS col1 FROM tab1 GROUP BY tab1.col1
----
-76
-76
-76

query I rowsort
SELECT ALL + 50 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-41
-42
35

query I rowsort
SELECT - tab0.col0 + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT ALL - - 97 FROM tab1 GROUP BY tab1.col2
----
97
97
97

onlyif mysql # DIV for integer division: 
query I rowsort label-9214
SELECT - cor0.col1 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-9214
SELECT - cor0.col1 / cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-2
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 43 col1 FROM tab1 GROUP BY tab1.col2
----
-43
-43
-43

query I rowsort
SELECT 96 AS col2 FROM tab1 GROUP BY tab1.col0
----
96
96
96

query I rowsort
SELECT - - col0 * col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT ALL + 51 FROM tab0 AS cor0 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT + 47 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
47
47
47

query I rowsort
SELECT DISTINCT - 98 AS col1 FROM tab2 GROUP BY tab2.col2
----
-98

query I rowsort
SELECT ALL - col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL IS NOT NULL
----
-81
0

query I rowsort
SELECT ALL 72 AS col0 FROM tab1 GROUP BY tab1.col0
----
72
72
72

query I rowsort
SELECT - 83 + + tab0.col1 * + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-83
6478

query I rowsort
SELECT + COALESCE ( tab2.col0, + 11 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + 8 FROM tab0 GROUP BY tab0.col2
----
8
8
8

query I rowsort
SELECT + ( col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab0.col0 col1 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT cor1.col1 AS col0 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col1
----
41
41
59
59
61
61

query I rowsort
SELECT + tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL IN ( tab1.col1 - - tab1.col1 )
----

query I rowsort
SELECT + 10 AS col2 FROM tab2 GROUP BY tab2.col2
----
10
10
10

query I rowsort
SELECT + + tab0.col0 + + tab0.col0 * + 73 FROM tab0 GROUP BY tab0.col0
----
1924
3182
6142

query I rowsort
SELECT 52 * 66 AS col1 FROM tab2 GROUP BY tab2.col0
----
3432
3432
3432

query I rowsort
SELECT DISTINCT - 85 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-70
6
7

query I rowsort
SELECT DISTINCT - 84 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-84

query I rowsort
SELECT + 50 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
50
50
50

query I rowsort
SELECT - 26 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-26
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 84 * - tab0.col2 + tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
-1992
-3154
-6557

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 27, cor0.col1, + ( + 27 ), cor0.col0 * + cor0.col1 + - cor0.col1 ) * 99 FROM tab0 AS cor0 GROUP BY cor0.col1
----
2673
2673

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( 35, cor0.col2 * + 34, cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
35
35
35

query I rowsort
SELECT - cor0.col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + cor0.col2 * - cor0.col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

onlyif mysql # DIV for integer division: 
query I rowsort label-9244
SELECT DISTINCT + 26 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0

skipif mysql # not compatible
query I rowsort label-9244
SELECT DISTINCT + 26 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT ALL + 30 FROM tab1 cor0 GROUP BY cor0.col0
----
30
30
30

query I rowsort
SELECT DISTINCT 14 FROM tab1 cor0 GROUP BY col1
----
14

onlyif mysql # DIV for integer division: 
query I rowsort label-9247
SELECT + + tab1.col1 DIV ( + 90 * - tab1.col1 + 59 ) AS col0 FROM tab1 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9247
SELECT + + tab1.col1 / ( + 90 * - tab1.col1 + 59 ) AS col0 FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT DISTINCT + - 47 AS col1 FROM tab2 GROUP BY tab2.col2
----
-47

query I rowsort
SELECT ALL + 82 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT + 52 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
52
52
52

query I rowsort
SELECT - + 57 FROM tab2 GROUP BY tab2.col0
----
-57
-57
-57

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 91 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 43 col0 FROM tab0 cor0 GROUP BY col1
----
43

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor1.col1
----
-81
0

query I rowsort
SELECT + cor0.col0 - + 11 FROM tab0 cor0 GROUP BY cor0.col0
----
15
32
72

query I rowsort
SELECT - 11 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, col1
----
-11
-11

query I rowsort
SELECT DISTINCT - 98 AS col2 FROM tab1 GROUP BY tab1.col0
----
-98

query I rowsort
SELECT - + 91 AS col0 FROM tab2 GROUP BY tab2.col0
----
-91
-91
-91

query I rowsort
SELECT DISTINCT 62 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
62

query I rowsort
SELECT + tab1.col2 + - 23 AS col0 FROM tab1 GROUP BY tab1.col2
----
-15
22
48

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9262
SELECT + - CAST( - 22 AS SIGNED ) * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-2002
-2024
-330

skipif mysql # not compatible
query I rowsort label-9262
SELECT + - CAST ( - 22 AS INTEGER ) * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-2002
-2024
-330

query I rowsort
SELECT - 79 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-170
-171
-94

query I rowsort
SELECT DISTINCT 57 FROM tab0 AS cor0 GROUP BY col0
----
57

query I rowsort
SELECT ALL - 96 * - col2 AS col0 FROM tab0 GROUP BY col2
----
2304
3648
7584

onlyif mysql # DIV for integer division: 
query I rowsort label-9266
SELECT ALL cor0.col0 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9266
SELECT ALL cor0.col0 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

query I rowsort
SELECT tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NULL IN ( tab2.col2 / - tab2.col2 - tab2.col2 )
----

query I rowsort
SELECT ALL + 70 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
4060
5530
6090

query I rowsort
SELECT DISTINCT - - 47 * col0 FROM tab1 GROUP BY col0
----
1034
1316
3854

query I rowsort
SELECT ALL + tab1.col0 * - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL - 99 + + col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-28
-54
-91

onlyif mysql # DIV for integer division: 
query I rowsort label-9272
SELECT + - tab2.col2 DIV - col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9272
SELECT + - tab2.col2 / - col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT DISTINCT - NULLIF ( + cor0.col1, cor0.col1 / - 16 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
NULL

query I rowsort
SELECT DISTINCT - 10 + 66 FROM tab1 AS cor0 GROUP BY cor0.col1
----
56

query I rowsort
SELECT + tab1.col0 * 43 FROM tab1 GROUP BY tab1.col0
----
1204
3526
946

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 + 36 * tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
3367
3404
555

query I rowsort
SELECT - 34 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-34
-34
-34

query I rowsort
SELECT 33 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
33
33
33

query I rowsort
SELECT + tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL IS NULL
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-9281
SELECT DISTINCT tab2.col0 DIV - tab2.col0 - + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-16
-92
-93

skipif mysql # not compatible
query I rowsort label-9281
SELECT DISTINCT tab2.col0 / - tab2.col0 - + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-16
-92
-93

query I rowsort
SELECT DISTINCT - cor0.col1 * - 49 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2156
2793
294

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9283
SELECT CAST( NULL AS DECIMAL ) FROM tab1 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9283
SELECT CAST ( NULL AS REAL ) FROM tab1 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT 65 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
65
65
65

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col1 + cor0.col1 FROM tab2 cor0 GROUP BY col0, cor0.col1
----
3813
5428
976

query I rowsort
SELECT + 21 * + 65 AS col0 FROM tab2 GROUP BY tab2.col0
----
1365
1365
1365

query I rowsort
SELECT DISTINCT tab0.col2 FROM tab0 WHERE ( tab0.col1 ) IS NOT NULL GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - col1 * + 0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT 77 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT + 25 - - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
107
47
53

query I rowsort
SELECT DISTINCT 20 FROM tab1 AS cor0 GROUP BY col1
----
20

query I rowsort
SELECT 92 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
92
92
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col1 + + tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT + cor0.col1 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT + cor0.col0 * + cor0.col0 + - 47 FROM tab0 AS cor0 GROUP BY col0
----
1802
629
6842

query I rowsort
SELECT + cor0.col1 * 50 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
4050

query I rowsort
SELECT + - tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT - cor0.col0 + + col0 FROM tab0 cor0 GROUP BY cor0.col0
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9299
SELECT ALL col0 + - CAST( + 57 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-42
34
35

skipif mysql # not compatible
query I rowsort label-9299
SELECT ALL col0 + - CAST ( + 57 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-42
34
35

query I rowsort
SELECT 53 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
53
53
53

query I rowsort
SELECT DISTINCT + 86 - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
15
41
78

query I rowsort
SELECT ALL + NULLIF ( + cor0.col1, + 29 + + cor0.col1 * cor0.col1 ) * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT - 98 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-11
-19
-40

query I rowsort
SELECT - ( - tab1.col2 ) AS col1 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT - cor0.col0 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-11
-14
17

query I rowsort
SELECT + cor0.col0 - + 47 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-32
44
45

query I rowsort
SELECT - + 92 FROM tab1 GROUP BY tab1.col2
----
-92
-92
-92

query I rowsort
SELECT DISTINCT + tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + col0 AS col0 FROM tab1 AS cor0 GROUP BY col0 HAVING NULL > NULL
----

query I rowsort
SELECT DISTINCT tab0.col1 * 66 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
5346

query I rowsort
SELECT - 9 AS col0 FROM tab2 GROUP BY tab2.col0
----
-9
-9
-9

query I rowsort
SELECT 10 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
810

query I rowsort
SELECT + - 81 AS col1 FROM tab2 GROUP BY tab2.col1
----
-81
-81
-81

query I rowsort
SELECT ALL 22 FROM tab2 GROUP BY tab2.col1
----
22
22
22

query I rowsort
SELECT DISTINCT tab1.col2 - - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT - - 32 AS col1 FROM tab2 GROUP BY tab2.col1
----
32
32
32

query I rowsort
SELECT + tab1.col1 - + 86 AS col1 FROM tab1 GROUP BY tab1.col1
----
-29
-42
-80

query I rowsort
SELECT ALL + tab1.col0 FROM tab1 WHERE NOT NULL IS NOT NULL GROUP BY col0
----
22
28
82

query I rowsort
SELECT + 90 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT DISTINCT - - 2 AS col0 FROM tab0 GROUP BY col1
----
2

query I rowsort
SELECT ALL - - col2 + + col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT - cor0.col2 - + col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-116
-158
-174

query I rowsort
SELECT 3 + - col1 * col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1678
-3478
-3718

onlyif mysql # DIV for integer division: 
query I rowsort label-9325
SELECT + - tab2.col1 DIV - 32 AS col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9325
SELECT + - tab2.col1 / - 32 AS col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT ALL - 82 FROM tab2 AS cor0 GROUP BY col1
----
-82
-82
-82

query I rowsort
SELECT DISTINCT + 55 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 74 col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2, cor0.col1
----
74
74
74
74
74
74

query I rowsort
SELECT - 20 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
-20
-20
-20

query I rowsort
SELECT + + 61 AS col0 FROM tab1 GROUP BY tab1.col2
----
61
61
61

query I rowsort
SELECT ALL + 27 FROM tab2 GROUP BY tab2.col0
----
27
27
27

query I rowsort
SELECT 67 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
67
67
67

query I rowsort
SELECT + + 86 AS col2 FROM tab0 GROUP BY tab0.col2
----
86
86
86

query I rowsort
SELECT DISTINCT - - 69 * tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1656
2622
5451

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT DISTINCT - 55 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-55

query I rowsort
SELECT - 38 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-129
-130
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 * tab0.col0 - tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
1806
650
6806

query I rowsort
SELECT - 82 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, col2
----
-82
-82
-82

query I rowsort
SELECT - 69 + cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0, cor1.col2
----
9 values hashing to 5cda59f6f914e31a90aa5de1f4682476

query I rowsort
SELECT DISTINCT - 1 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT - 36 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-42
-80
-93

query I rowsort
SELECT ALL - 77 / - CASE - 14 WHEN cor0.col1 + 58 * + cor0.col1 THEN NULL WHEN cor0.col2 - 96 THEN + 91 END FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + 16 FROM tab2 cor0 GROUP BY cor0.col2
----
16

query I rowsort
SELECT + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1 HAVING tab2.col1 > NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-9347
SELECT + + 76 DIV - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9347
SELECT + + 76 / - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 24 col1 FROM tab2 GROUP BY tab2.col2
----
24
24
24

query I rowsort
SELECT ALL 97 FROM tab0 GROUP BY tab0.col2
----
97
97
97

query I rowsort
SELECT DISTINCT - - 69 + - tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
10
28
8

query I rowsort
SELECT + - 30 * + tab1.col1 - 29 FROM tab1 GROUP BY tab1.col1
----
-1349
-1739
-209

query I rowsort
SELECT - 78 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-78
-78

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - col1 + + 41 FROM tab0 GROUP BY tab0.col1
----
-40
41

query I rowsort
SELECT + tab0.col0 * 12 FROM tab0 GROUP BY tab0.col0
----
312
516
996

query I rowsort
SELECT ALL + NULLIF ( 36, cor0.col1 + 35 ) * 81 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2916
2916
2916

onlyif mysql # DIV for integer division: 
query I rowsort label-9357
SELECT DISTINCT - cor0.col0 DIV - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
1

skipif mysql # not compatible
query I rowsort label-9357
SELECT DISTINCT - cor0.col0 / - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + + cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-9359
SELECT COALESCE ( + 4, cor0.col2 DIV - cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY col0
----
4
4
4

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-9359
SELECT COALESCE ( + 4, cor0.col2 / - cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY col0
----
4
4
4

query I rowsort
SELECT ALL + 80 AS col1 FROM tab1 GROUP BY tab1.col1
----
80
80
80

query I rowsort
SELECT ALL + 64 FROM tab0 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT ALL - tab2.col0 / tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT cor0.col1 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
1596
3608

query I rowsort
SELECT ALL - col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT + 18 FROM tab0 GROUP BY col1
----
18
18

query I rowsort
SELECT ALL - 75 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-75
-75
-75

query I rowsort
SELECT + + 98 AS col0 FROM tab0 GROUP BY tab0.col0
----
98
98
98

query I rowsort
SELECT tab2.col0 FROM tab2 WHERE NOT NULL NOT BETWEEN NULL AND col1 + + tab2.col1 GROUP BY tab2.col0
----

query I rowsort
SELECT 54 FROM tab1 GROUP BY tab1.col1
----
54
54
54

query I rowsort
SELECT + tab1.col1 * + 7 FROM tab1 GROUP BY col1
----
308
399
42

query I rowsort
SELECT - + tab0.col2 + + 39 FROM tab0 GROUP BY tab0.col2
----
-40
1
15

query I rowsort
SELECT DISTINCT + + 60 FROM tab1 GROUP BY tab1.col0
----
60

query I rowsort
SELECT DISTINCT + ( + 27 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
27

query I rowsort
SELECT DISTINCT + tab0.col2 FROM tab0 WHERE NOT NULL IN ( - tab0.col1 ) AND NOT ( NULL ) IS NULL GROUP BY tab0.col2
----

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - + 60 AS col0 FROM tab2 GROUP BY tab2.col1
----
-60

query I rowsort
SELECT 27 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 65 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT DISTINCT - cor0.col0 * - CASE col0 WHEN - cor0.col2 + + cor0.col2 * - cor0.col2 THEN + cor0.col0 ELSE cor0.col2 END - - col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
13800
1530
15470

query I rowsort
SELECT + NULLIF ( + 44, + cor0.col0 ) FROM tab2 AS cor0 GROUP BY col0
----
44
44
44

query I rowsort
SELECT DISTINCT - cor0.col2 + 47 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-24
2
39

onlyif mysql # DIV for integer division: 
query I rowsort label-9382
SELECT DISTINCT 97 DIV 66 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-9382
SELECT DISTINCT 97 / 66 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT NULLIF ( + 86, cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
86
86
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 92 col2 FROM tab2 GROUP BY tab2.col1
----
92
92
92

query I rowsort
SELECT + 70 AS col2 FROM tab1 GROUP BY tab1.col1
----
70
70
70

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT COALESCE ( 54, cor0.col2 * cor0.col2 ) + - 2 col2 FROM tab0 AS cor0 GROUP BY col0
----
52

query I rowsort
SELECT DISTINCT - 56 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1456
-2408
-4648

query I rowsort
SELECT ALL + 7 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT ALL - tab2.col2 - + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT cor0.col2 + + col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL NOT IN ( + cor0.col2 )
----

query I rowsort
SELECT DISTINCT 80 FROM tab1 AS cor0 GROUP BY cor0.col0
----
80

query I rowsort
SELECT DISTINCT ( cor0.col0 ) + - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT - ( + 58 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-58

query I rowsort
SELECT - 18 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-18
-18
-18

query I rowsort
SELECT ALL - cor0.col0 - + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-164
-44
-56

query I rowsort
SELECT DISTINCT - 98 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
-98

query I rowsort
SELECT DISTINCT - 41 FROM tab1 GROUP BY tab1.col2
----
-41

query I rowsort
SELECT 12 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
12
12
12

query I rowsort
SELECT - 62 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-62
-62
-62

query I rowsort
SELECT - cor0.col2 * - 77 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4466
6083
6699

query I rowsort
SELECT 93 AS col0 FROM tab2 GROUP BY tab2.col0
----
93
93
93

query I rowsort
SELECT ALL - col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + ( - 59 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-59

query I rowsort
SELECT DISTINCT - cor0.col2 * - ( 28 ) FROM tab2 AS cor0 GROUP BY col2
----
1624
2212
2436

onlyif mysql # DIV for integer division: 
query I rowsort label-9406
SELECT 95 DIV 5 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
19
19
19

skipif mysql # not compatible
query I rowsort label-9406
SELECT 95 / 5 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
19
19
19

query I rowsort
SELECT DISTINCT + 84 + - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
13
39
76

query I rowsort
SELECT - tab2.col0 - + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT 17 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
17
17
17

query I rowsort
SELECT ALL - 86 FROM tab1 GROUP BY tab1.col0
----
-86
-86
-86

query I rowsort
SELECT - 97 FROM tab2 GROUP BY tab2.col2
----
-97
-97
-97

onlyif mysql # DIV for integer division: 
query I rowsort label-9413
SELECT DISTINCT cor0.col1 DIV COALESCE ( 65, - cor0.col0, cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-9413
SELECT DISTINCT cor0.col1 / COALESCE ( 65, - cor0.col0, cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT - col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 98 + col2 * + 12 col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
194
638
950

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 25 col1 FROM tab2 GROUP BY tab2.col2
----
25
25
25

query I rowsort
SELECT 96 * tab2.col0 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1455
8827
8924

query I rowsort
SELECT ALL + cor0.col2 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - ( + tab1.col0 ) + + 78 FROM tab1 GROUP BY tab1.col0
----
-4
50
56

query I rowsort
SELECT ALL - 77 FROM tab0 GROUP BY col1
----
-77
-77

query I rowsort
SELECT ALL - 69 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1518
-1932
-5658

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9422
SELECT cor0.col1 - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9422
SELECT cor0.col1 - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-484
-6724
-784

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9424
SELECT CAST( NULL AS SIGNED ) * 22 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9424
SELECT CAST ( NULL AS INTEGER ) * 22 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 60 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
60
60
60

query I rowsort
SELECT DISTINCT + 58 AS col0 FROM tab0 GROUP BY tab0.col2
----
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 * - col2 col0 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT + 10 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
10
10
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 47 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
4277
4324
705

query I rowsort
SELECT ALL 68 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1632
2584
5372

query I rowsort
SELECT ALL 87 FROM tab2 AS cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT col1 + 67 FROM tab1 cor0 GROUP BY cor0.col1
----
111
124
73

onlyif mysql # DIV for integer division: 
query I rowsort label-9435
SELECT DISTINCT + NULLIF ( + 80, cor0.col1 ) DIV ( 65 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-9435
SELECT DISTINCT + NULLIF ( + 80, cor0.col1 ) / ( 65 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT DISTINCT + - tab2.col2 * + col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT + 69 AS col0 FROM tab2 cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0, cor0.col0
----
69

query I rowsort
SELECT 24 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
24
24
24

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT ( NULL ) IS NULL
----

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( + 37, col1, 52, + cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-37

query I rowsort
SELECT - 84 + - 61 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-145
-145
-145

query I rowsort
SELECT - CASE - 80 WHEN + cor0.col0 THEN NULL WHEN 71 THEN ( - col1 ) END * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + tab0.col0 * 84 FROM tab0 GROUP BY tab0.col0
----
2184
3612
6972

query I rowsort
SELECT + 79 FROM tab1 GROUP BY tab1.col2
----
79
79
79

query I rowsort
SELECT - - 35 AS col1 FROM tab0 GROUP BY tab0.col0
----
35
35
35

onlyif mysql # DIV for integer division: 
query I rowsort label-9446
SELECT DISTINCT 31 DIV cor0.col2 FROM tab1 cor0 GROUP BY col2
----
0
3

skipif mysql # not compatible
query I rowsort label-9446
SELECT DISTINCT 31 / cor0.col2 FROM tab1 cor0 GROUP BY col2
----
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 10 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
10

query I rowsort
SELECT - col0 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-182
-184
-30

query I rowsort
SELECT ( 45 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
45
45
45

query I rowsort
SELECT ALL - 17 AS col1 FROM tab1 GROUP BY tab1.col1
----
-17
-17
-17

query I rowsort
SELECT ALL - 68 + - 73 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-141
-141
-141

query I rowsort
SELECT ALL - NULLIF ( col1, + cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ALL + - COALESCE ( + 35, tab2.col0, 58 ) + col0 FROM tab2 GROUP BY tab2.col0
----
-20
56
57

query I rowsort
SELECT DISTINCT tab1.col0 AS col1 FROM tab1 GROUP BY col0 HAVING NOT NULL IS NOT NULL
----
22
28
82

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1 HAVING NULL IS NULL
----
41
59
61

query I rowsort
SELECT ALL + cor0.col2 + 59 FROM tab2 AS cor0 GROUP BY cor0.col2
----
117
138
146

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ( col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + 80 AS col2 FROM tab2 GROUP BY tab2.col1
----
80
80
80

query I rowsort
SELECT ALL + - 99 FROM tab1 GROUP BY tab1.col2
----
-99
-99
-99

query I rowsort
SELECT - 80 FROM tab0 GROUP BY tab0.col2
----
-80
-80
-80

query I rowsort
SELECT DISTINCT - cor0.col2 + + 66 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-13
-21
8

query I rowsort
SELECT DISTINCT 10 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
10

query I rowsort
SELECT ALL + col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 73 col0 FROM tab1 GROUP BY tab1.col0
----
-73
-73
-73

query I rowsort
SELECT ALL - 80 + - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-124
-137
-86

query I rowsort
SELECT - 23 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-23
-23
-23

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9468
SELECT ALL - + CAST( NULL AS DECIMAL ) + 71 col0 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9468
SELECT ALL - + CAST ( NULL AS REAL ) + 71 col0 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 56 * 49 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2744
-2744
-2744

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9470
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9470
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 * - 22 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
-1254
-132
-968

query I rowsort
SELECT + 3 * cor0.col0 FROM tab0 cor0 GROUP BY col0
----
129
249
78

query I rowsort
SELECT DISTINCT cor0.col2 * 1 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - 94 FROM tab0 cor0 GROUP BY col0
----
-94
-94
-94

query I rowsort
SELECT 20 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
20
20

query I rowsort
SELECT 66 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1584
-2508
-5214

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 + 96 col1 FROM tab2 GROUP BY tab2.col2
----
154
175
183

onlyif mysql # DIV for integer division: 
query I rowsort label-9478
SELECT - cor0.col2 DIV col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9478
SELECT - cor0.col2 / col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL - + 1 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 14 FROM tab0 GROUP BY tab0.col2
----
14

onlyif mysql # DIV for integer division: 
query I rowsort label-9481
SELECT - cor0.col0 + + col2 DIV cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-21
-27
-81

skipif mysql # not compatible
query I rowsort label-9481
SELECT - cor0.col0 + + col2 / cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-21
-27
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 36 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT - 79 * - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
1185
7189
7268

query I rowsort
SELECT ALL - 76 FROM tab2 GROUP BY tab2.col1
----
-76
-76
-76

query I rowsort
SELECT - 68 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
3060
4828
544

query I rowsort
SELECT - 96 AS col0 FROM tab0 GROUP BY tab0.col1
----
-96
-96

query I rowsort
SELECT ALL ( - cor0.col0 ) FROM tab2 AS cor0 GROUP BY col0, cor0.col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - - tab2.col1 - - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL + 24 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
24
24
24

query I rowsort
SELECT DISTINCT - 84 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-84

query I rowsort
SELECT ALL + cor0.col0 * - 75 FROM tab0 cor0 GROUP BY cor0.col0
----
-1950
-3225
-6225

query I rowsort
SELECT - 5 + + 84 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT ALL 81 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
81
81
81

onlyif mysql # DIV for integer division: 
query I rowsort label-9494
SELECT cor0.col0 DIV - cor0.col0 + + col0 * + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1848
675
6888

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9494
SELECT cor0.col0 / - cor0.col0 + + col0 * + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1848
675
6888

onlyif mysql # DIV for integer division: 
query I rowsort label-9495
SELECT DISTINCT + COALESCE ( - cor0.col0, + cor0.col1 DIV + 68 ) AS col2 FROM tab2 cor0 GROUP BY col1, cor0.col2, cor0.col0
----
-15
-91
-92

skipif mysql # not compatible
query I rowsort label-9495
SELECT DISTINCT + COALESCE ( - cor0.col0, + cor0.col1 / + 68 ) AS col2 FROM tab2 cor0 GROUP BY col1, cor0.col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - 54 AS col0 FROM tab2 GROUP BY tab2.col2
----
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * 59 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1416
2242
4661

onlyif mysql # DIV for integer division: 
query I rowsort label-9498
SELECT ALL tab2.col2 DIV + col2 + col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
59
80
88

skipif mysql # not compatible
query I rowsort label-9498
SELECT ALL tab2.col2 / + col2 + col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
59
80
88

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col2, cor0.col2
----
24
38
79

query I rowsort
SELECT - 64 + 22 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-42
-42
-42

query I rowsort
SELECT DISTINCT ( col1 ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - + col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT COALESCE ( + 12, cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
12

query I rowsort
SELECT cor0.col1 * + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT + 73 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
73
73
73

query I rowsort
SELECT - 62 * - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
1364
1736
5084

query I rowsort
SELECT ALL - ( tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + cor0.col2 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT + - tab2.col1 * + col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + tab1.col2 + tab1.col2 FROM tab1 GROUP BY col2
----
142
16
90

query I rowsort
SELECT - col2 / - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL AND NOT NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + - tab1.col1 * 59 + - 84 FROM tab1 GROUP BY tab1.col1
----
-2680
-3447
-438

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1849
676
6889

query I rowsort
SELECT - cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
484
6724
784

onlyif mysql # DIV for integer division: 
query I rowsort label-9517
SELECT cor0.col2 DIV + 7 FROM tab2 AS cor0 GROUP BY col2
----
11
12
8

skipif mysql # not compatible
query I rowsort label-9517
SELECT cor0.col2 / + 7 FROM tab2 AS cor0 GROUP BY col2
----
11
12
8

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0
0
81

query I rowsort
SELECT ALL + tab0.col2 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT + 63 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
63
63
63

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + NULLIF ( - 34, + tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
-34

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-9524
SELECT - - CAST( 56 AS SIGNED ) DIV + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
1
9

skipif mysql # not compatible
query I rowsort label-9524
SELECT - - CAST ( 56 AS INTEGER ) / + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
1
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 7 + + 48 * 12 col0 FROM tab1 GROUP BY tab1.col0
----
583
583
583

query I rowsort
SELECT DISTINCT - tab2.col1 * - 20 FROM tab2 GROUP BY tab2.col1
----
1180
1220
820

query I rowsort
SELECT + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

onlyif mysql # DIV for integer division: 
query I rowsort label-9528
SELECT col1 DIV - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9528
SELECT col1 / - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + cor0.col0 + 93 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
108
184
185

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * + col0 + cor0.col2 * cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1683
-420
1241

query I rowsort
SELECT 71 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
71
71
71

query I rowsort
SELECT cor0.col2 + 28 * - 36 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-929
-970
-984

query I rowsort
SELECT ALL + - tab2.col2 + + tab2.col2 * - 16 FROM tab2 GROUP BY tab2.col2
----
-1343
-1479
-986

query I rowsort
SELECT + + 71 AS col0 FROM tab0 GROUP BY tab0.col2
----
71
71
71

query I rowsort
SELECT col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1 HAVING ( NULL ) <= NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-9537
SELECT ALL cor0.col2 DIV 26 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
3

skipif mysql # not compatible
query I rowsort label-9537
SELECT ALL cor0.col2 / 26 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
3

query I rowsort
SELECT DISTINCT - 46 FROM tab1 GROUP BY tab1.col0
----
-46

query I rowsort
SELECT ALL + tab1.col0 + + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT 68 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
68
68
68

query I rowsort
SELECT ALL - + col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT - tab2.col0 + - 96 * + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1455
-8827
-8924

query I rowsort
SELECT DISTINCT tab1.col2 FROM tab1 WHERE col0 * + col1 <> tab1.col1 GROUP BY tab1.col2 HAVING ( NULL ) IS NULL
----
45
71
8

query I rowsort
SELECT cor0.col0 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT 69 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, col0
----
69
69
69

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT 2 * 8 FROM tab1 AS cor0 GROUP BY col0
----
16

query I rowsort
SELECT DISTINCT tab0.col1 * tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1 HAVING NOT - tab0.col1 IS NOT NULL
----

query I rowsort
SELECT + + 48 FROM tab1 GROUP BY tab1.col1
----
48
48
48

query I rowsort
SELECT + ( 49 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
49
49
49

onlyif mysql # DIV for integer division: 
query I rowsort label-9551
SELECT cor0.col2 DIV - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9551
SELECT cor0.col2 / - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT ALL - ( 69 ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
-69
-69
-69

onlyif mysql # DIV for integer division: 
query I rowsort label-9553
SELECT tab0.col2 DIV 65 FROM tab0 GROUP BY tab0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9553
SELECT tab0.col2 / 65 FROM tab0 GROUP BY tab0.col2
----
0
0
1

query I rowsort
SELECT - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT ALL 8 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
120
728
736

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - col2 * - cor0.col2 + ( 13 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
3377
6254
7582

query I rowsort
SELECT 32 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
123
124
47

onlyif mysql # DIV for integer division: 
query I rowsort label-9559
SELECT + 86 DIV + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-9559
SELECT + 86 / + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
1
1

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL IS NULL
----
-15
-91
-92

query I rowsort
SELECT + 0 - + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - 6 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-486
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 53 col1 FROM tab2 cor0 GROUP BY col2
----
53
53
53

query I rowsort
SELECT ALL 20 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20
20
20

query I rowsort
SELECT - 27 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-33
-71
-84

query I rowsort
SELECT + 79 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT ALL - cor0.col2 * - ( 81 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
4698
6399
7047

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * 98 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5684
7742
8526

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 34 * tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
2788
748
952

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, col2, cor0.col0
----
44
57
6

query I rowsort
SELECT + tab2.col1 * 3 FROM tab2 GROUP BY tab2.col1
----
123
177
183

query I rowsort
SELECT col1 - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL - col1 * - tab0.col1 FROM tab0 GROUP BY col1
----
0
6561

query I rowsort
SELECT - 31 FROM tab2 GROUP BY tab2.col1
----
-31
-31
-31

query I rowsort
SELECT 89 FROM tab0 GROUP BY col2
----
89
89
89

query I rowsort
SELECT 35 AS col2 FROM tab0 GROUP BY col0
----
35
35
35

query I rowsort
SELECT DISTINCT + 80 AS col2 FROM tab0 GROUP BY tab0.col0
----
80

query I rowsort
SELECT ALL - 40 FROM tab2 cor0 GROUP BY cor0.col0
----
-40
-40
-40

onlyif mysql # DIV for integer division: 
query I rowsort label-9579
SELECT ALL + col2 DIV cor0.col2 + 12 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
13
13
13

skipif mysql # not compatible
query I rowsort label-9579
SELECT ALL + col2 / cor0.col2 + 12 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
13
13
13

query I rowsort
SELECT + - 37 AS col0 FROM tab0 GROUP BY tab0.col2
----
-37
-37
-37

onlyif mysql # DIV for integer division: 
query I rowsort label-9581
SELECT - tab0.col0 DIV col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9581
SELECT - tab0.col0 / col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

query I rowsort
SELECT + - 32 + 19 FROM tab0 GROUP BY col1
----
-13
-13

query I rowsort
SELECT ALL 61 FROM tab0 GROUP BY tab0.col1
----
61
61

query I rowsort
SELECT ALL + 24 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
24
24

query I rowsort
SELECT tab0.col1 + tab0.col1 AS col1 FROM tab0 WHERE NULL <> col0 GROUP BY tab0.col1
----

query I rowsort
SELECT ALL ( + 81 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT - - 79 AS col2 FROM tab0 GROUP BY tab0.col1
----
79
79

query I rowsort
SELECT 89 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
89
89
89

query I rowsort
SELECT 44 AS col1 FROM tab0 GROUP BY tab0.col0
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 1 col1 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT ALL 94 FROM tab1 GROUP BY tab1.col2
----
94
94
94

query I rowsort
SELECT ALL 23 FROM tab1 GROUP BY tab1.col0
----
23
23
23

query I rowsort
SELECT - + ( - tab2.col2 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - tab1.col0 FROM tab1 WHERE NOT ( col0 ) IS NULL GROUP BY tab1.col0 HAVING NOT ( NULL ) NOT BETWEEN NULL AND col0
----

query I rowsort
SELECT - + tab0.col2 + - 41 AS col0 FROM tab0 GROUP BY tab0.col2
----
-120
-65
-79

query I rowsort
SELECT - 83 + - col2 FROM tab0 GROUP BY tab0.col2
----
-107
-121
-162

query I rowsort
SELECT 12 AS col1 FROM tab1 GROUP BY tab1.col2
----
12
12
12

query I rowsort
SELECT DISTINCT - 57 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-57

query I rowsort
SELECT + 24 + 98 FROM tab1 GROUP BY tab1.col0
----
122
122
122

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor1.col2 col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9601
SELECT CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9601
SELECT CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 56 + - 91 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-35
-35
-35

query I rowsort
SELECT - + tab0.col1 + 10 AS col0 FROM tab0 GROUP BY tab0.col1
----
-71
10

query I rowsort
SELECT DISTINCT 1 FROM tab0 AS cor0 GROUP BY col1
----
1

onlyif mysql # DIV for integer division: 
query I rowsort label-9605
SELECT - col0 DIV + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9605
SELECT - col0 / + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

query I rowsort
SELECT ALL - 83 FROM tab0 GROUP BY tab0.col1
----
-83
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 37 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-37
-37
-37

query I rowsort
SELECT DISTINCT + 88 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
88

query I rowsort
SELECT DISTINCT 68 + 38 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1626
2310
2386

query I rowsort
SELECT col2 * cor0.col2 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1482
600
6320

query I rowsort
SELECT ALL - - 96 FROM tab1 GROUP BY tab1.col2
----
96
96
96

query I rowsort
SELECT - ( 91 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-91
-91

query I rowsort
SELECT ALL + 42 FROM tab0 GROUP BY tab0.col1
----
42
42

query I rowsort
SELECT - + 26 AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-26
-26

onlyif mysql # DIV for integer division: 
query I rowsort label-9615
SELECT + tab0.col0 DIV + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9615
SELECT + tab0.col0 / + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
1
1
1

query I rowsort
SELECT cor0.col2 * - 50 + + cor0.col1 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1900
-3950
744

query I rowsort
SELECT - + tab2.col2 - + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT 2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col2
----
2
2
2

query I rowsort
SELECT ALL - 99 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-99
-99
-99

query I rowsort
SELECT DISTINCT 6 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
12
50
63

query I rowsort
SELECT tab1.col1 * + tab1.col1 AS col1 FROM tab1 WHERE NOT ( tab1.col0 + + tab1.col2 * + tab1.col1 ) IS NOT NULL GROUP BY tab1.col1
----

onlyif mysql # DIV for integer division: 
query I rowsort label-9622
SELECT DISTINCT + 75 DIV - cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-9622
SELECT DISTINCT + 75 / - cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-1
0

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + 62 AS col0 FROM tab1 GROUP BY tab1.col2
----
62
62
62

query I rowsort
SELECT ALL + col1 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-9626
SELECT - cor0.col0 DIV 93 + + 91 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
91
91
91

skipif mysql # not compatible
query I rowsort label-9626
SELECT - cor0.col0 / 93 + + 91 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
91
91
91

query I rowsort
SELECT - col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL NOT IN ( - cor0.col2 )
----

query I rowsort
SELECT cor0.col1 - - cor0.col2 * 96 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
4377
6860
774

query I rowsort
SELECT DISTINCT + - 12 FROM tab2 GROUP BY tab2.col0
----
-12

query I rowsort
SELECT 62 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
62
62
62

query I rowsort
SELECT ALL 3 * 18 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT DISTINCT - - cor0.col2 + - 86 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-28
-7
1

query I rowsort
SELECT DISTINCT - 6 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-6

query I rowsort
SELECT ALL - cor0.col2 - + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
-158
-48
-76

query I rowsort
SELECT ALL - cor0.col2 * + col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT 67 AS col1 FROM tab2 GROUP BY tab2.col2
----
67

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1, cor0.col2
----
9 values hashing to ec1f9c518baf89f5f85dda11171d4494

query I rowsort
SELECT - tab0.col2 + ( ( tab0.col2 ) ) AS col1 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL - + tab1.col0 - 77 FROM tab1 GROUP BY tab1.col0
----
-105
-159
-99

query I rowsort
SELECT ALL - 66 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-66
-66
-66

query I rowsort
SELECT + 33 AS col2 FROM tab2 GROUP BY tab2.col1
----
33
33
33

query I rowsort
SELECT + tab0.col0 * + 35 AS col2 FROM tab0 GROUP BY tab0.col0
----
1505
2905
910

query I rowsort
SELECT 20 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT ALL 14 FROM tab2 cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT ALL cor0.col1 * 73 + 59 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3271
4220
497

query I rowsort
SELECT + 9 AS col1 FROM tab2 GROUP BY tab2.col1
----
9
9
9

query I rowsort
SELECT + + 57 AS col1 FROM tab0 GROUP BY tab0.col1
----
57
57

query I rowsort
SELECT DISTINCT tab2.col2 FROM tab2 WHERE NOT NULL IN ( + tab2.col0 * - col0 ) GROUP BY tab2.col2
----

query I rowsort
SELECT DISTINCT - tab2.col2 * + col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT - - ( tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - cor0.col0 + ( - cor0.col1 ) * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-26
-83
3440

query I rowsort
SELECT DISTINCT - 87 FROM tab0 GROUP BY tab0.col1
----
-87

query I rowsort
SELECT ALL - 92 * - col1 FROM tab2 GROUP BY tab2.col1
----
3772
5428
5612

query I rowsort
SELECT DISTINCT + 53 FROM tab0 GROUP BY tab0.col1
----
53

query I rowsort
SELECT DISTINCT - 20 FROM tab1 GROUP BY tab1.col2
----
-20

query I rowsort
SELECT ALL cor0.col2 * 15 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1185
1305
870

onlyif mysql # DIV for integer division: 
query I rowsort label-9658
SELECT DISTINCT + cor0.col1 DIV cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-9658
SELECT DISTINCT + cor0.col1 / cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1

query I rowsort
SELECT DISTINCT + 98 + 66 FROM tab1 AS cor0 GROUP BY cor0.col1
----
164

query I rowsort
SELECT ALL ( cor0.col1 ) * col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9661
SELECT CAST( NULL AS SIGNED ) * - 27 + cor0.col2 FROM tab1 cor0 GROUP BY col2, cor0.col0, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9661
SELECT CAST ( NULL AS INTEGER ) * - 27 + cor0.col2 FROM tab1 cor0 GROUP BY col2, cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 43 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-43
-43
-43

query I rowsort
SELECT ALL + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1 HAVING NULL IN ( - tab1.col1 )
----

query I rowsort
SELECT 13 * col0 FROM tab1 AS cor0 GROUP BY col0
----
1066
286
364

onlyif mysql # DIV for integer division: 
query I rowsort label-9665
SELECT ALL cor0.col2 DIV cor0.col2 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
23
29
83

skipif mysql # not compatible
query I rowsort label-9665
SELECT ALL cor0.col2 / cor0.col2 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
23
29
83

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT - col1 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT - tab2.col0 * + 21 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1911
-1932
-315

query I rowsort
SELECT 65 - + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-6
20
57

query I rowsort
SELECT tab0.col2 + + tab0.col2 FROM tab0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT DISTINCT + 24 AS col0 FROM tab0 GROUP BY tab0.col2
----
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 * cor0.col2 col0 FROM tab2 AS cor0 GROUP BY col2
----
3422
6320
7656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 67 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
67
67
67

query I rowsort
SELECT - 38 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-38
-38
-38

query I rowsort
SELECT DISTINCT - tab2.col2 + + 20 FROM tab2 GROUP BY col2
----
-38
-59
-67

query I rowsort
SELECT ALL + col2 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT 33 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
33
33
33

query I rowsort
SELECT ALL + - 17 + - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-39
-45
-99

query I rowsort
SELECT 30 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
30
30
30

query I rowsort
SELECT DISTINCT + cor0.col1 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT DISTINCT + - 35 FROM tab0 GROUP BY tab0.col0
----
-35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 79 col0 FROM tab2 GROUP BY tab2.col0
----
79
79
79

onlyif mysql # DIV for integer division: 
query I rowsort label-9684
SELECT + col2 DIV - 18 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-9684
SELECT + col2 / - 18 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1
-2
-4

query I rowsort
SELECT ALL - 22 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-22
-22

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT - cor0.col1 * ( cor0.col1 ) + - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
-1722
-3540
-3782

query I rowsort
SELECT 49 * - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
-4459
-4508
-735

query I rowsort
SELECT DISTINCT + cor0.col2 * 26 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1508
2054
2262

query I rowsort
SELECT 6 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
6
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
26
43
83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 67, + tab0.col2, tab0.col0 - + tab0.col0 * CASE tab0.col0 * tab0.col1 WHEN tab0.col1 THEN NULL ELSE + tab0.col0 END ) AS col0 FROM tab0 GROUP BY tab0.col1
----
67
67

query I rowsort
SELECT ALL + 43 AS col0 FROM tab1 GROUP BY tab1.col2
----
43
43
43

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 GROUP BY cor0.col1 HAVING NOT ( NULL ) IS NOT NULL
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-9695
SELECT DISTINCT - + tab2.col2 DIV - 1 + + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
116
158
174

skipif mysql # not compatible
query I rowsort label-9695
SELECT DISTINCT - + tab2.col2 / - 1 + + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
116
158
174

onlyif mysql # DIV for integer division: 
query I rowsort label-9696
SELECT 2 DIV + 27 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9696
SELECT 2 / + 27 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + - 10 AS col2 FROM tab0 GROUP BY tab0.col2
----
-10
-10
-10

query I rowsort
SELECT col2 * tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT + tab1.col2 * + 18 AS col2 FROM tab1 GROUP BY tab1.col2
----
1278
144
810

query I rowsort
SELECT DISTINCT + 26 FROM tab1 GROUP BY tab1.col1
----
26

query I rowsort
SELECT + col1 * cor0.col1 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
38
6585
79

onlyif mysql # DIV for integer division: 
query I rowsort label-9702
SELECT cor0.col0 DIV + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9702
SELECT cor0.col0 / + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
26
43
83

query I rowsort
SELECT + 3 AS col1 FROM tab0 GROUP BY tab0.col2
----
3
3
3

query I rowsort
SELECT + - tab1.col0 + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - 85 FROM tab0 GROUP BY tab0.col0
----
-85

query I rowsort
SELECT ALL 47 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
47
47

query I rowsort
SELECT - 51 * 56 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2856
-2856
-2856

query I rowsort
SELECT ALL + - tab2.col0 * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL + tab1.col1 + 30 AS col0 FROM tab1 GROUP BY tab1.col1
----
36
74
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL 33 FROM tab2 GROUP BY tab2.col0
----
33
33
33

query I rowsort
SELECT ALL 23 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT 4 + tab1.col0 FROM tab1 GROUP BY col0
----
26
32
86

query I rowsort
SELECT ALL 18 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
18
18
18

query I rowsort
SELECT DISTINCT + 74 FROM tab0 GROUP BY tab0.col2
----
74

query I rowsort
SELECT DISTINCT + 77 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
3388
4389
462

query I rowsort
SELECT ALL + cor0.col1 * 76 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3344
4332
456

query I rowsort
SELECT DISTINCT + tab1.col0 + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT 70 - - 65 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
2735
3905
4035

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + cor0.col2 ) col1 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL + 10 AS col1 FROM tab2 GROUP BY tab2.col2
----
10
10
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL + cor0.col0 * 86 + - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1870
2380
6970

query I rowsort
SELECT DISTINCT + 66 + 51 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
117

query I rowsort
SELECT ALL 20 FROM tab1 GROUP BY tab1.col0
----
20
20
20

query I rowsort
SELECT DISTINCT 14 FROM tab2 AS cor0 GROUP BY cor0.col0
----
14

query I rowsort
SELECT - tab2.col2 * - 2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9729
SELECT DISTINCT - - CAST( NULL AS SIGNED ) / - 94 col2 FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9729
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) / - 94 col2 FROM tab2 GROUP BY tab2.col1
----
NULL

query I rowsort
SELECT DISTINCT + 10 + - 7 FROM tab2 GROUP BY tab2.col1
----
3

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9731
SELECT DISTINCT CAST( 71 AS SIGNED ) AS col0 FROM tab1 GROUP BY tab1.col0
----
71

skipif mysql # not compatible
query I rowsort label-9731
SELECT DISTINCT CAST ( 71 AS INTEGER ) AS col0 FROM tab1 GROUP BY tab1.col0
----
71

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9732
SELECT CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9732
SELECT CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL tab1.col0 * ( + tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT 24 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
24
24
24

query I rowsort
SELECT DISTINCT + tab2.col2 * + 6 FROM tab2 GROUP BY tab2.col2
----
348
474
522

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9737
SELECT cor0.col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9737
SELECT cor0.col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 93 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

onlyif mysql # DIV for integer division: 
query I rowsort label-9739
SELECT - col1 DIV - col1 col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9739
SELECT - col1 / - col1 col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9740
SELECT - cor0.col0 * + CAST( 23 AS SIGNED ) col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-2093
-2116
-345

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9740
SELECT - cor0.col0 * + CAST ( 23 AS INTEGER ) col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-2093
-2116
-345

query I rowsort
SELECT - tab0.col1 FROM tab0 WHERE NOT NULL IN ( + tab0.col0 ) GROUP BY tab0.col1
----

query I rowsort
SELECT + col2 + 97 AS col1 FROM tab0 GROUP BY tab0.col2
----
121
135
176

query I rowsort
SELECT + cor0.col1 * + 75 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3075
4425
4575

query I rowsort
SELECT + 25 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
25
25
25

query I rowsort
SELECT - 27 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-27
-27
-27

query I rowsort
SELECT ALL col2 * + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT 54 + 34 FROM tab0 AS cor0 GROUP BY cor0.col1
----
88

query I rowsort
SELECT ALL + 80 FROM tab2 AS cor0 GROUP BY cor0.col1
----
80
80
80

query I rowsort
SELECT ALL 53 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
53
53
53

query I rowsort
SELECT ALL - 20 FROM tab0 GROUP BY tab0.col2
----
-20
-20
-20

query I rowsort
SELECT ALL - tab1.col0 + + 24 FROM tab1 GROUP BY tab1.col0
----
-4
-58
2

query I rowsort
SELECT - cor0.col1 * 41 FROM tab2 cor0 GROUP BY cor0.col1
----
-1681
-2419
-2501

query I rowsort
SELECT cor0.col2 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col2, cor0.col0
----
-12
-34
72

query I rowsort
SELECT ALL tab0.col1 + 45 AS col1 FROM tab0 GROUP BY tab0.col1
----
126
45

query I rowsort
SELECT cor0.col2 * 59 AS col2 FROM tab2 cor0 GROUP BY col2
----
3422
4661
5133

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9756
SELECT ALL CAST( NULL AS SIGNED ) * + 85 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9756
SELECT ALL CAST ( NULL AS INTEGER ) * + 85 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 col1 FROM tab0 WHERE tab0.col2 > ( tab0.col2 ) GROUP BY tab0.col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 30 - + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-51
30

query I rowsort
SELECT 78 * - 94 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-7332
-7332
-7332

query I rowsort
SELECT - 58 AS col2 FROM tab1 GROUP BY tab1.col2
----
-58
-58
-58

query I rowsort
SELECT ALL + + 60 + + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
118
139
147

query I rowsort
SELECT 44 FROM tab2 AS cor0 GROUP BY col0
----
44
44
44

query I rowsort
SELECT DISTINCT 81 * - 83 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-6723

query I rowsort
SELECT - tab0.col1 + + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL - 86 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-86
-86
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 79 * cor0.col1 col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-3476
-4503
-474

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 + + 76 col2 FROM tab0 GROUP BY col2
----
100
114
155

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 71 * col1 col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
3124
4047
426

query I rowsort
SELECT DISTINCT - - 21 FROM tab0 GROUP BY col0
----
21

query I rowsort
SELECT DISTINCT + cor0.col1 - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
0

query I rowsort
SELECT + - 78 AS col0 FROM tab0 GROUP BY tab0.col0
----
-78
-78
-78

query I rowsort
SELECT ALL 61 AS col2 FROM tab0 cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
61
61

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT + 94 FROM tab0 GROUP BY tab0.col0
----
94
94
94

query I rowsort
SELECT ALL 8 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
8
8
8

query I rowsort
SELECT 40 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
40
40
40

query I rowsort
SELECT ALL + 33 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
33
33
33

query I rowsort
SELECT DISTINCT + 36 FROM tab2 AS cor0 GROUP BY cor0.col1
----
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + 38 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
120
60
66

query I rowsort
SELECT + - 64 FROM tab2 GROUP BY tab2.col1
----
-64
-64
-64

query I rowsort
SELECT tab0.col1 + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT + - 39 AS col2 FROM tab2 GROUP BY tab2.col0
----
-39
-39
-39

query I rowsort
SELECT DISTINCT + cor0.col2 * 35 + 18 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2048
2783
3063

query I rowsort
SELECT cor1.col1 + + cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col0
----
126
28
85

query I rowsort
SELECT ALL + cor0.col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 * + 88 col2 FROM tab1 GROUP BY tab1.col2
----
3960
6248
704

query I rowsort
SELECT DISTINCT - 95 FROM tab0 GROUP BY col2
----
-95

query I rowsort
SELECT 12 FROM tab2 GROUP BY tab2.col2
----
12
12
12

query I rowsort
SELECT DISTINCT 50 - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-29
-37
-8

query I rowsort
SELECT - 84 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-84
-84
-84

onlyif mysql # DIV for integer division: 
query I rowsort label-9794
SELECT DISTINCT cor0.col2 DIV - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
-1

skipif mysql # not compatible
query I rowsort label-9794
SELECT DISTINCT cor0.col2 / - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
-1

query I rowsort
SELECT ALL + 53 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT DISTINCT + 73 * col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1606
2044
5986

query I rowsort
SELECT DISTINCT 70 AS col0 FROM tab0 GROUP BY tab0.col2
----
70

query I rowsort
SELECT ALL - 32 FROM tab1 GROUP BY tab1.col1
----
-32
-32
-32

query I rowsort
SELECT - 17 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-17
-17
-17

onlyif mysql # DIV for integer division: 
query I rowsort label-9800
SELECT - - 98 DIV - tab0.col2 + - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-28
-40
-80

skipif mysql # not compatible
query I rowsort label-9800
SELECT - - 98 / - tab0.col2 + - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-28
-40
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-9802
SELECT DISTINCT - cor0.col0 DIV - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-9802
SELECT DISTINCT - cor0.col0 / - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1

query I rowsort
SELECT - cor0.col1 - 94 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-4180
-5415
-570

query I rowsort
SELECT + + tab1.col0 + + tab1.col0 FROM tab1 GROUP BY col0
----
164
44
56

query I rowsort
SELECT - col0 * + col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT - 29 FROM tab1 GROUP BY tab1.col0
----
-29
-29
-29

query I rowsort
SELECT ALL + 48 - - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
106
127
135

query I rowsort
SELECT ALL - 59 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-59
-59

query I rowsort
SELECT DISTINCT + NULLIF ( 11, 63 / - cor0.col2 - - col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
11

query I rowsort
SELECT - tab2.col2 * 47 AS col1 FROM tab2 GROUP BY col2
----
-2726
-3713
-4089

query I rowsort
SELECT + cor0.col1 + 54 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
111
60
98

query I rowsort
SELECT + + 37 AS col0 FROM tab0 GROUP BY tab0.col1
----
37
37

query I rowsort
SELECT + 50 AS col0 FROM tab1 GROUP BY tab1.col2
----
50
50
50

query I rowsort
SELECT - ( - 29 ) * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1276
1653
174

query I rowsort
SELECT ALL - ( - tab2.col2 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + - 32 FROM tab2 GROUP BY tab2.col1
----
-32
-32
-32

query I rowsort
SELECT ALL - tab0.col1 + - tab0.col1 FROM tab0 GROUP BY col1
----
-162
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col1 + + col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT col1 * tab1.col1 + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1980
3306
42

query I rowsort
SELECT + tab2.col2 * tab2.col2 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT - cor0.col1 - 97 FROM tab0 AS cor0 GROUP BY col1
----
-178
-97

query I rowsort
SELECT cor0.col0 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
3772
5369
915

query I rowsort
SELECT ALL 79 AS col1 FROM tab1 GROUP BY tab1.col0
----
79
79
79

onlyif mysql # DIV for integer division: 
query I rowsort label-9824
SELECT ALL - tab2.col2 DIV - tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9824
SELECT ALL - tab2.col2 / - tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 46 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT 62 AS col1 FROM tab0 GROUP BY tab0.col0
----
62
62
62

onlyif mysql # DIV for integer division: 
query I rowsort label-9827
SELECT + cor0.col1 DIV 28 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
1
2

skipif mysql # not compatible
query I rowsort label-9827
SELECT + cor0.col1 / 28 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
1
2

query I rowsort
SELECT DISTINCT + - tab0.col0 + 5 AS col1 FROM tab0 GROUP BY col0
----
-21
-38
-78

query I rowsort
SELECT - cor0.col1 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
3483

query I rowsort
SELECT ALL - cor0.col2 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-17
-20
-26

query I rowsort
SELECT ALL - 6 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-6
-6
-6

query I rowsort
SELECT ALL - + 90 AS col2 FROM tab2 GROUP BY tab2.col1
----
-90
-90
-90

query I rowsort
SELECT + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
41
59
61

query I rowsort
SELECT ALL ( 17 ) * + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1003
1037
697

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9835
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col0
----
NULL

skipif mysql # not compatible
query I rowsort label-9835
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col0
----
NULL

query I rowsort
SELECT 4 * 73 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
292
292

query I rowsort
SELECT DISTINCT 86 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
86

query I rowsort
SELECT - - 28 AS col2 FROM tab1 GROUP BY tab1.col2
----
28
28
28

query I rowsort
SELECT ALL - 61 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-61
-61
-61

query I rowsort
SELECT DISTINCT + 63 * cor0.col1 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
2843
3636
386

query I rowsort
SELECT ALL - 27 + + cor0.col0 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
105
1569
3581

query I rowsort
SELECT DISTINCT 17 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1003
1037
697

query I rowsort
SELECT + - 50 FROM tab2 GROUP BY tab2.col1
----
-50
-50
-50

query I rowsort
SELECT DISTINCT - 36 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-36

query I rowsort
SELECT - col2 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1944
0
0

query I rowsort
SELECT cor0.col1 + cor0.col1 * 51 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2288
2964
312

query I rowsort
SELECT ALL - + ( 17 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
-17
-17
-17

query I rowsort
SELECT DISTINCT + - 56 FROM tab2 GROUP BY tab2.col1
----
-56

query I rowsort
SELECT ALL + cor0.col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
142
16
90

query I rowsort
SELECT ALL 70 FROM tab2 AS cor0 GROUP BY cor0.col2
----
70
70
70

query I rowsort
SELECT ALL 9 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
15
53
66

query I rowsort
SELECT col0 * - col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3483
0
0

query I rowsort
SELECT 95 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT + - 9 AS col0 FROM tab0 GROUP BY tab0.col0
----
-9
-9
-9

query I rowsort
SELECT + 76 FROM tab0 GROUP BY tab0.col1
----
76
76

query I rowsort
SELECT DISTINCT 45 FROM tab0 GROUP BY tab0.col0
----
45

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9857
SELECT + col1 - - CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9857
SELECT + col1 - - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 56 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
56
56
56

query I rowsort
SELECT 72 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
72
72
72

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( + 82, + cor0.col1 ) + 25 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-57
-57
-57

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - 73 AS col0 FROM tab0 GROUP BY tab0.col1
----
-73
-73

query I rowsort
SELECT + cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL + 17 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1547
1564
255

onlyif mysql # DIV for integer division: 
query I rowsort label-9865
SELECT + cor0.col0 - cor0.col0 DIV - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
27
44
84

skipif mysql # not compatible
query I rowsort label-9865
SELECT + cor0.col0 - cor0.col0 / - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
27
44
84

query I rowsort
SELECT 84 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
1260
7644
7728

onlyif mysql # DIV for integer division: 
query I rowsort label-9867
SELECT ALL cor0.col0 DIV - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-9867
SELECT ALL cor0.col0 / - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-2
0

query I rowsort
SELECT 39 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
2262
3081
3393

query I rowsort
SELECT + 82 FROM tab0 AS cor0 GROUP BY col2
----
82
82
82

onlyif mysql # DIV for integer division: 
query I rowsort label-9870
SELECT col0 DIV - cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9870
SELECT col0 / - cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ( 34 ) * cor0.col0 + col0 * 22 FROM tab2 AS cor0 GROUP BY cor0.col0
----
5096
5152
840

query I rowsort
SELECT 20 FROM tab0 AS cor0 GROUP BY col1
----
20
20

query I rowsort
SELECT DISTINCT + 55 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
55

query I rowsort
SELECT + 89 FROM tab0 AS cor0 GROUP BY col0
----
89
89
89

query I rowsort
SELECT cor0.col2 + + 19 FROM tab0 AS cor0 GROUP BY cor0.col2
----
43
57
98

query I rowsort
SELECT + - 49 AS col0 FROM tab1 GROUP BY tab1.col2
----
-49
-49
-49

query I rowsort
SELECT DISTINCT tab2.col0 AS col2 FROM tab2 GROUP BY col0 HAVING - col0 IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col1 + + col1 * 64 col0 FROM tab0 GROUP BY tab0.col1
----
0
5265

query I rowsort
SELECT + cor0.col0 * + 3 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
164
44
56

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 72 col1 FROM tab1 GROUP BY tab1.col0
----
72
72
72

query I rowsort
SELECT DISTINCT 56 * + col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1456
2408
4648

query I rowsort
SELECT DISTINCT col2 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT - ( - tab2.col2 ) - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT 34 + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1715
3515
3755

query I rowsort
SELECT DISTINCT 77 FROM tab0 AS cor0 GROUP BY cor0.col1
----
77

query I rowsort
SELECT - - 32 AS col0 FROM tab0 GROUP BY tab0.col0
----
32
32
32

query I rowsort
SELECT 19 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT col0 * - col0 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-138
-8202
-8406

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT + tab2.col1 AS col2 FROM tab2 WHERE NULL <= NULL GROUP BY tab2.col1
----

query I rowsort
SELECT DISTINCT 39 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
39

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL col0 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL + col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT - 64 * 18 FROM tab1 GROUP BY col1
----
-1152
-1152
-1152

query I rowsort
SELECT ALL + tab2.col0 + + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT - + 1 AS col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL + ( + 14 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
14
14
14

query I rowsort
SELECT ALL cor0.col2 + col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
312
8360
8522

onlyif mysql # DIV for integer division: 
query I rowsort label-9901
SELECT 92 DIV cor0.col1 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-42
-56
9

skipif mysql # not compatible
query I rowsort label-9901
SELECT 92 / cor0.col1 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-42
-56
9

query I rowsort
SELECT + + 16 FROM tab0 GROUP BY tab0.col1
----
16
16

query I rowsort
SELECT ALL 97 - - col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
105
142
168

query I rowsort
SELECT + - NULLIF ( - col1, + tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
81
NULL

query I rowsort
SELECT DISTINCT 57 * 8 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
456

query I rowsort
SELECT DISTINCT 34 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
34

query I rowsort
SELECT ALL + - tab0.col0 + + 82 FROM tab0 GROUP BY tab0.col0
----
-1
39
56

query I rowsort
SELECT + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL cor0.col1 + ( cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 45 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT + 15 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col1
----
15
15
15

query I rowsort
SELECT - col2 * - 16 - - tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
1343
408
646

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
102
150
170

query I rowsort
SELECT - 82 * + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-1968
-3116
-6478

query I rowsort
SELECT ALL 61 * - col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2684
-3477
-366

query I rowsort
SELECT DISTINCT 43 AS col1 FROM tab1 GROUP BY tab1.col0
----
43

query I rowsort
SELECT DISTINCT + cor0.col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT 82 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
82

query I rowsort
SELECT + cor0.col2 * cor0.col0 + - 14 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1246
162
5808

query I rowsort
SELECT DISTINCT cor0.col1 * + NULLIF ( COALESCE ( cor0.col1, - 29 ) * 87, cor0.col1 ) FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
570807
NULL

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 15 * 93 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1338
1351
1389

query I rowsort
SELECT 95 AS col0 FROM tab0 GROUP BY tab0.col1
----
95
95

query I rowsort
SELECT ALL + tab2.col1 * tab2.col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT + cor0.col1 * + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT + 40 + col1 FROM tab2 GROUP BY tab2.col1
----
101
81
99

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9927
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9927
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 76 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1140
6916
6992

onlyif mysql # DIV for integer division: 
query I rowsort label-9929
SELECT DISTINCT col1 DIV - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-1

skipif mysql # not compatible
query I rowsort label-9929
SELECT DISTINCT col1 / - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-1

query I rowsort
SELECT DISTINCT - + 42 AS col2 FROM tab1 GROUP BY tab1.col0
----
-42

query I rowsort
SELECT ALL cor0.col0 + 39 FROM tab0 AS cor0 GROUP BY cor0.col0
----
122
65
82

query I rowsort
SELECT 87 AS col0 FROM tab0 cor0 GROUP BY col2
----
87
87
87

onlyif mysql # DIV for integer division: 
query I rowsort label-9933
SELECT ALL cor0.col0 DIV + 96 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9933
SELECT ALL cor0.col0 / + 96 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT 34 FROM tab0 cor0 GROUP BY cor0.col1, col1
----
34
34

query I rowsort
SELECT ALL - 52 FROM tab2 GROUP BY col1
----
-52
-52
-52

query I rowsort
SELECT ALL cor0.col1 * - col1 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
-1892
-30
-3192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col1 * 20 col1 FROM tab2 GROUP BY tab2.col1
----
-1180
-1220
-820

query I rowsort
SELECT ALL 85 + tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
130
156
93

query I rowsort
SELECT DISTINCT + 61 AS col1 FROM tab2 GROUP BY tab2.col1
----
61

query I rowsort
SELECT DISTINCT cor0.col0 * - 21 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-1911
-1932
-315

query I rowsort
SELECT DISTINCT + 11 FROM tab2 AS cor0 GROUP BY cor0.col2
----
11

query I rowsort
SELECT DISTINCT + 71 FROM tab1 cor0 GROUP BY cor0.col0
----
71

query I rowsort
SELECT - 40 FROM tab0 cor0 GROUP BY col0
----
-40
-40
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 50 * + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4550
-4600
-750

query I rowsort
SELECT - tab1.col2 * - 86 - 9 AS col0 FROM tab1 GROUP BY tab1.col2
----
3861
6097
679

query I rowsort
SELECT ALL 33 * 96 FROM tab1 cor0 GROUP BY cor0.col1
----
3168
3168
3168

query I rowsort
SELECT ALL - ( - cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL + 92 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
92
92

query I rowsort
SELECT ALL col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT col0 * 79 AS col2 FROM tab0 GROUP BY tab0.col0
----
2054
3397
6557

query I rowsort
SELECT DISTINCT 89 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
89

query I rowsort
SELECT col2 * - col2 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT cor0.col2 * + 20 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1420
160
900

query I rowsort
SELECT DISTINCT tab0.col1 * - 91 AS col2 FROM tab0 GROUP BY col1
----
-7371
0

query I rowsort
SELECT + 99 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
4059
5841
6039

query I rowsort
SELECT ALL 55 AS col2 FROM tab1 GROUP BY tab1.col0
----
55
55
55

query I rowsort
SELECT DISTINCT 72 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
72

query I rowsort
SELECT - col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0
0

query I rowsort
SELECT tab1.col1 * ( tab1.col1 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT + 67 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
67
67
67

query I rowsort
SELECT DISTINCT + 56 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
56

query I rowsort
SELECT ALL + 42 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
113
50
87

onlyif mysql # DIV for integer division: 
query I rowsort label-9964
SELECT tab1.col0 DIV tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9964
SELECT tab1.col0 / tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT DISTINCT - - 23 FROM tab2 GROUP BY tab2.col2
----
23

query I rowsort
SELECT + col1 AS col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ( ( cor0.col2 ) ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 83 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
83

query I rowsort
SELECT ALL - 3 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-3
-3
-3

query I rowsort
SELECT - CASE + col2 WHEN - col2 THEN cor0.col2 / 43 - cor0.col2 ELSE NULL END FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 87, + tab0.col1, tab0.col0 ) - 98 * + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-7851
87

query I rowsort
SELECT DISTINCT - - 57 + + tab0.col1 FROM tab0 GROUP BY col1
----
138
57

query I rowsort
SELECT + 77 * 20 FROM tab2 AS cor0 GROUP BY col0
----
1540
1540
1540

onlyif mysql # DIV for integer division: 
query I rowsort label-9974
SELECT ALL - 79 * + col2 + - tab1.col2 DIV - 29 FROM tab1 GROUP BY tab1.col2
----
-3554
-5607
-632

skipif mysql # not compatible
query I rowsort label-9974
SELECT ALL - 79 * + col2 + - tab1.col2 / - 29 FROM tab1 GROUP BY tab1.col2
----
-3554
-5607
-632

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9975
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-9975
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT - 68 + + 56 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-12

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 37, - col2 ) FROM tab1 cor0 GROUP BY col1
----
37
37
37

onlyif mysql # DIV for integer division: 
query I rowsort label-9978
SELECT DISTINCT cor0.col1 DIV - col1 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0, cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-9978
SELECT DISTINCT cor0.col1 / - col1 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0, cor0.col1
----
-1

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

query I rowsort
SELECT ALL + + tab2.col0 * - col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT 58 + + 75 FROM tab0 AS cor0 GROUP BY cor0.col1
----
133
133

query I rowsort
SELECT 56 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
56
56
56

onlyif mysql # DIV for integer division: 
query I rowsort label-9983
SELECT 25 * - cor0.col2 + - cor0.col2 DIV cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1126
-1776
-201

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9983
SELECT 25 * - cor0.col2 + - cor0.col2 / cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1126
-1776
-201

onlyif mysql # DIV for integer division: 
query I rowsort label-9984
SELECT + 65 DIV + col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9984
SELECT + 65 / + col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT - cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT - 20 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-20

query I rowsort
SELECT DISTINCT 70 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
70

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT NULLIF ( - cor0.col2, - col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 7 FROM tab1 GROUP BY tab1.col2
----
7
7
7

query I rowsort
SELECT cor0.col2 - - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT DISTINCT - cor0.col1 * - 80 FROM tab0 AS cor0 GROUP BY col1
----
0
6480

query I rowsort
SELECT ALL cor0.col2 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 + col0 col1 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT - col2 FROM tab1 WHERE NULL IS NULL GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL = NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-9997
SELECT COALESCE ( - cor0.col2, - cor0.col2, col2 DIV 0 ) * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

skipif mysql # not compatible
query I rowsort label-9997
SELECT COALESCE ( - cor0.col2, - cor0.col2, col2 / 0 ) * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT 24 FROM tab2 AS cor0 GROUP BY cor0.col0
----
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

