sqllogictest
Artifact Content
Not logged in

Artifact c829783c9455a54aa924c3759b8e873f92dda8fe:


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 DISTINCT - 53 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-53

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col0, cor0.col0 ) FROM tab1 AS cor0 GROUP BY col0
----
NULL

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-4
SELECT 47 DIV + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
0
1
7

skipif mysql # not compatible
query I rowsort label-4
SELECT 47 / + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
0
1
7

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

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

query I rowsort
SELECT 79 * tab2.col2 + - 76 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
4506
6165
6797

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

query I rowsort
SELECT DISTINCT + 33 FROM tab2 cor0 GROUP BY cor0.col1
----
33

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

query I rowsort
SELECT - col2 FROM tab0 GROUP BY col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL col1 / cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

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

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 DISTINCT - - 17 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
17

query I rowsort
SELECT col0 * - 21 + - 37 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1780
-583
-940

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

onlyif mysql # DIV for integer division: 
query I rowsort label-18
SELECT 12 DIV cor0.col0 FROM tab2 cor0 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-18
SELECT 12 / cor0.col0 FROM tab2 cor0 GROUP BY col0
----
0
0
0

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

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

query I rowsort
SELECT col2 * - 85 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
-3825
-6035
-680

query I rowsort
SELECT DISTINCT cor0.col0 * + 60 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1560
2580
4980

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

query I rowsort
SELECT DISTINCT + 78 * col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
1716
2184
6396

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

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

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

query I rowsort
SELECT DISTINCT + 27 FROM tab2 GROUP BY tab2.col2
----
27

query I rowsort
SELECT ALL - 87 + - cor0.col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-111
-125
-166

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

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

query I rowsort
SELECT cor0.col0 * - 67 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1474
-1876
-5494

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - ( cor0.col2 ) * col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-2025
-5041
-64

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

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

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

query I rowsort
SELECT cor0.col2 - + 48 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-10
-24
31

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

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

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

query I rowsort
SELECT DISTINCT 49 * - 23 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-1127

query I rowsort
SELECT 4 FROM tab0 GROUP BY tab0.col0
----
4
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 82 * tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
-1230
-7462
-7544

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-55
SELECT cor0.col1 DIV - 12 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-3
-4
-5

skipif mysql # not compatible
query I rowsort label-55
SELECT cor0.col1 / - 12 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-3
-4
-5

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

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

query I rowsort
SELECT DISTINCT + 23 * - cor0.col1 - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1416
-1464
-984

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

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 3, 40 * cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3
3
3

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 16 * cor0.col0 col2 FROM tab0 AS cor0 GROUP BY col0
----
-1328
-416
-688

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

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

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

query I rowsort
SELECT DISTINCT - + 69 * tab1.col2 AS col2 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
-3105
-4899
-552

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

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

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

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

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

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

query I rowsort
SELECT 35 FROM tab2 cor0 GROUP BY col1
----
35
35
35

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

query I rowsort
SELECT 34 * + 97 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
270436
72556
92344

query I rowsort
SELECT ALL - 10 + - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-34
-48
-89

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

query I rowsort
SELECT DISTINCT + - 2 + 50 FROM tab1 GROUP BY tab1.col0
----
48

query I rowsort
SELECT DISTINCT NULLIF ( 87, - tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
87

query I rowsort
SELECT DISTINCT ( - 34 ) FROM tab0 AS cor0 GROUP BY col0
----
-34

query I rowsort
SELECT 65 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2860
-3705
-390

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

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

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

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

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

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

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 ALL 41 * - 61 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2501
-2501
-2501

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 87 * + 94 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
8178
8178
8178

query I rowsort
SELECT ALL cor0.col1 * 26 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1066
1534
1586

query I rowsort
SELECT DISTINCT col0 FROM tab0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col0 col0 FROM tab2 GROUP BY col0
----
15
91
92

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

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

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

query I rowsort
SELECT 76 * 78 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
5928
5928
5928

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

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

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

query I rowsort
SELECT DISTINCT - + 45 FROM tab2 GROUP BY tab2.col0
----
-45

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

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

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

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

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

query I rowsort
SELECT cor0.col2 * - 13 - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-112
-630
-994

query I rowsort
SELECT 79 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4582
6241
6873

query I rowsort
SELECT DISTINCT - 17 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1003
-1037
-697

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col1 * 20 FROM tab1 AS cor0 GROUP BY col1
----
1140
120
880

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

query I rowsort
SELECT DISTINCT + cor0.col0 + 25 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1, cor0.col2
----
107
47
53

onlyif mysql # DIV for integer division: 
query I rowsort label-122
SELECT - cor0.col1 DIV + 86 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-122
SELECT - cor0.col1 / + 86 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
0
0
0

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

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

query I rowsort
SELECT ALL COALESCE ( 77, + cor0.col2 ) * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4466
6083
6699

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

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

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
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 99 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
17
71
77

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

query I rowsort
SELECT ALL + 69 FROM tab2 cor0 GROUP BY col2
----
69
69
69

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL cor0.col1 * 60 FROM tab2 AS cor0 GROUP BY col1
----
2460
3540
3660

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - NULLIF ( + cor0.col2 * cor0.col1, - cor0.col1 ) + - 31 * cor0.col2 - - col1 col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-2607
NULL

query I rowsort
SELECT + - 7 + - cor0.col2 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-65
-86
-94

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT 96 + 28 FROM tab2 AS cor0 GROUP BY cor0.col2
----
124
124
124

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

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

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

query I rowsort
SELECT DISTINCT cor0.col2 * 29 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1305
2059
232

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

query I rowsort
SELECT COALESCE ( cor0.col0, cor0.col0 + 60 ) * + 30 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2460
660
840

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

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

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

query I rowsort
SELECT ALL 37 * col1 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-172457
-196359
-87986

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 16 + cor0.col0 col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
38
44
98

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

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

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

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

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

query I rowsort
SELECT ALL 84 + 24 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
108
108
108

query I rowsort
SELECT - 31 FROM tab0 cor0 GROUP BY cor0.col2
----
-31
-31
-31

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

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

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

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

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

query I rowsort
SELECT + cor0.col1 + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-177
SELECT - cor0.col0 DIV cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-177
SELECT - cor0.col0 / cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-1
-1
-1

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

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

query I rowsort
SELECT ALL ( + 54 + - cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
-17
46
9

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( 29, + tab1.col1 ) AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
29

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

query I rowsort
SELECT ALL 48 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
131
74
91

query I rowsort
SELECT DISTINCT - + 16 FROM tab1 GROUP BY col0
----
-16

query I rowsort
SELECT DISTINCT cor0.col0 + + 28 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
110
50
56

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

query I rowsort
SELECT DISTINCT 48 * 80 AS col2 FROM tab1 cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
3840

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

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

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

skipif mysql # not compatible
query I rowsort label-197
SELECT ALL CAST ( 93 AS INTEGER ) FROM tab0 cor0 GROUP BY cor0.col1
----
93
93

query I rowsort
SELECT ALL + 3 + 97 FROM tab2 AS cor0 GROUP BY col2, col2
----
100
100
100

query I rowsort
SELECT ALL - 57 * + 0 * - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
0

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

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

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

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

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

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

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

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

query I rowsort
SELECT 81 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
3321
4779
4941

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

query I rowsort
SELECT - + 99 * - 66 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
6534
6534
6534

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

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

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

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

query I rowsort
SELECT 68 FROM tab2 GROUP BY tab2.col0
----
68
68
68

query I rowsort
SELECT DISTINCT + cor0.col0 + + 68 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
159
160
83

query I rowsort
SELECT ALL + - 16 FROM tab2 GROUP BY col1
----
-16
-16
-16

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

query I rowsort
SELECT - cor0.col2 * 94 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4230
-6674
-752

query I rowsort
SELECT 27 + 59 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
86
86

query I rowsort
SELECT DISTINCT - cor0.col1 + + 35 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-46
35

query I rowsort
SELECT DISTINCT - 32 * cor0.col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-1376
-2656
-832

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

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

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NOT NULL
----

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

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

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

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

query I rowsort
SELECT ALL + ( 4 ) AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
4
4
4

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

query I rowsort
SELECT - cor0.col2 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1032
2054
3154

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

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

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

query I rowsort
SELECT ALL + 50 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
4550
4600
750

query I rowsort
SELECT + cor0.col0 + - cor0.col0 * - col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
119935
162292
24811

query I rowsort
SELECT cor0.col0 * 17 * col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
140777
143888
3825

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT ( cor0.col1 + cor0.col1 ) IS NULL
----
44
57
6

query I rowsort
SELECT DISTINCT col0 * - 58 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-1508
-2494
-4814

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

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

query I rowsort
SELECT COALESCE ( cor0.col0 * + 83, 35, + cor0.col0 ) + - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2132
3526
6806

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

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

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

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( - 85, + cor0.col2 + 58 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-85

query I rowsort
SELECT cor1.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0, cor1.col1
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
126
28
85

query I rowsort
SELECT 24 AS col0 FROM tab1 GROUP BY tab1.col2
----
24
24
24

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

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

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

query I rowsort
SELECT ALL cor0.col0 * cor0.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 73 + + cor0.col0 col2 FROM tab1 cor0 GROUP BY cor0.col0
----
101
155
95

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 68 + col0 FROM tab0 AS cor0 GROUP BY col0
----
111
151
94

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

query I rowsort
SELECT DISTINCT 84 + - col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
46
5
60

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

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

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

query I rowsort
SELECT DISTINCT 64 * - 91 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
-5824

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

query I rowsort
SELECT 13 + - 29 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-16
-16
-16

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 60 * - 95 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-5700

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

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

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

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

query I rowsort
SELECT ALL + 41 FROM tab0 AS cor0 GROUP BY col2
----
41
41
41

query I rowsort
SELECT DISTINCT - 86 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-28
-7
1

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

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

query I rowsort
SELECT DISTINCT - cor0.col0 + 39 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-43
11
17

query I rowsort
SELECT + cor0.col0 + + 66 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
157
158
81

query I rowsort
SELECT ALL cor1.col1 + + 18 FROM tab0, tab0 cor0, tab1 AS cor1 GROUP BY cor1.col1
----
24
62
75

onlyif mysql # DIV for integer division: 
query I rowsort label-297
SELECT 69 DIV 79 + cor1.col2 FROM tab0, tab1 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

skipif mysql # not compatible
query I rowsort label-297
SELECT 69 / 79 + cor1.col2 FROM tab0, tab1 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

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.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT COALESCE ( + 25, col1 ) col0 FROM tab1 AS cor0 GROUP BY col1
----
25
25
25

query I rowsort
SELECT 73 * cor0.col1 AS col0 FROM tab0 cor0 GROUP BY col1
----
0
5913

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-306
SELECT ALL + cor0.col2 DIV 86 - - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif mysql # not compatible
query I rowsort label-306
SELECT ALL + cor0.col2 / 86 - - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

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

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

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

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

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-313
SELECT CAST( + 68 + - col1 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
11
24
62

skipif mysql # not compatible
query I rowsort label-313
SELECT CAST ( + 68 + - col1 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
11
24
62

query I rowsort
SELECT - ( - 14 ) + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-12
-29
-69

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - cor0.col1 + 48 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-9
4
42

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

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

query I rowsort
SELECT 54 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
54
54
54

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

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

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

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

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

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

query I rowsort
SELECT 96 - cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
1945
6985
772

query I rowsort
SELECT DISTINCT 21 FROM tab2 AS cor0 GROUP BY col1
----
21

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

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

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

query I rowsort
SELECT DISTINCT + 26 AS col2 FROM tab1 GROUP BY tab1.col0
----
26

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

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

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

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

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

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
----
0
0

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

query I rowsort
SELECT ALL + cor0.col1 * + 37 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1628
2109
222

query I rowsort
SELECT 98 * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
2156
2744
8036

query I rowsort
SELECT + 49 * 73 AS col2 FROM tab0 cor0 GROUP BY col1
----
3577
3577

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

query I rowsort
SELECT ALL + cor0.col2 - - 90 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
135
161
98

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

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

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

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

query I rowsort
SELECT + cor0.col0 * 90 + col0 FROM tab1 cor0 GROUP BY cor0.col0
----
2002
2548
7462

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT NULLIF ( cor0.col0, cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-364
SELECT - CAST( NULL AS DECIMAL ) AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-364
SELECT - CAST ( NULL AS REAL ) AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

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

query I rowsort
SELECT - 95 * 78 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-7410
-7410
-7410

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

onlyif mysql # DIV for integer division: 
query I rowsort label-368
SELECT - 31 * cor0.col0 - - cor0.col1 DIV col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-2541
-681
-867

skipif mysql # not compatible
query I rowsort label-368
SELECT - 31 * cor0.col0 - - cor0.col1 / col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-2541
-681
-867

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

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

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

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

query I rowsort
SELECT DISTINCT + cor0.col2 + 9 FROM tab0 AS cor0 GROUP BY cor0.col2
----
33
47
88

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

onlyif mysql # DIV for integer division: 
query I rowsort label-375
SELECT DISTINCT 2 DIV + 19 FROM tab1 AS cor0 GROUP BY col0
----
0

skipif mysql # not compatible
query I rowsort label-375
SELECT DISTINCT 2 / + 19 FROM tab1 AS cor0 GROUP BY col0
----
0

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

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

query I rowsort
SELECT + 42 AS col2 FROM tab2 GROUP BY tab2.col1
----
42
42
42

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

query I rowsort
SELECT + cor1.col0 * cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor0.col2
----
9 values hashing to 90429d6e80108f744b03efa7f440f3b7

query I rowsort
SELECT DISTINCT cor0.col0 + + 64 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
146
86
92

query I rowsort
SELECT ALL 87 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3567
5133
5307

query I rowsort
SELECT DISTINCT 79 + + 23 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
102

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

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

query I rowsort
SELECT ALL + 65 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
156
157
80

query I rowsort
SELECT DISTINCT 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 ALL + cor0.col0 + cor0.col0 col0 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
164
44
56

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-390
SELECT ALL + cor0.col2 * 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-390
SELECT ALL + cor0.col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 + + 13 * - 82 * cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-47925
-75615
-8520

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

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

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

query I rowsort
SELECT DISTINCT + col2 + cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
114
237
72

query I rowsort
SELECT DISTINCT + 31 FROM tab2 GROUP BY tab2.col0
----
31

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - + COALESCE ( - 95, + tab0.col0 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
95

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

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

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

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

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

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

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

query I rowsort
SELECT - 67 - + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-158
-159
-82

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

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

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

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

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

query I rowsort
SELECT - 63 * cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-105903
-219303
-234423

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

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

query I rowsort
SELECT + 59 + + 9 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
68
68
68

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

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

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

query I rowsort
SELECT ALL 87 * + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
2262
3741
7221

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

query I rowsort
SELECT cor0.col1 + col1 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2622
3168
54

query I rowsort
SELECT ALL + tab2.col1 + + 61 AS col0 FROM tab2 GROUP BY tab2.col1
----
102
120
122

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

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

query I rowsort
SELECT DISTINCT cor0.col0 * 77 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
1694
2156
6314

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * + 68 + + cor0.col1 col2 FROM tab1 AS cor0 GROUP BY col1
----
3036
3933
414

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

query I rowsort
SELECT ALL + 70 * 37 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2590
2590
2590

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

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

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-441
SELECT + 28 / col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
1

query I rowsort
SELECT ALL + tab1.col1 * 3 - + 90 FROM tab1, tab2 AS cor0, tab2 AS cor1 GROUP BY tab1.col1
----
-72
42
81

query I rowsort
SELECT DISTINCT + cor0.col2 * 93 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
2232
3534
7347

query I rowsort
SELECT + 89 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
89
89
89

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
----
2025
5041
64

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

query I rowsort
SELECT - 94 * 63 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY tab2.col2
----
-5922
-5922
-5922

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

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

query I rowsort
SELECT DISTINCT - tab2.col2 FROM tab2 GROUP BY col2 HAVING NOT ( NULL ) >= NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-451
SELECT ALL + tab0.col0 DIV tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-451
SELECT ALL + tab0.col0 / tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1
1
1

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

query I rowsort
SELECT DISTINCT - 11 * 67 AS col0 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
-737

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

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

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

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

query I rowsort
SELECT ALL 6 + cor0.col0 - + 47 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-13
-19
41

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

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

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

query I rowsort
SELECT 34 FROM tab0 AS cor0 GROUP BY col2
----
34
34
34

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

query I rowsort
SELECT ALL - 41 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-41
-41
-41

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

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col0 * 38 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1064
-3116
-836

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

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

query I rowsort
SELECT - 32 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-111
-56
-70

onlyif mysql # DIV for integer division: 
query I rowsort label-473
SELECT ALL + cor0.col1 DIV + 39 + cor0.col1 * + 79 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3477
4504
474

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-473
SELECT ALL + cor0.col1 / + 39 + cor0.col1 * + 79 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3477
4504
474

query I rowsort
SELECT DISTINCT + cor0.col1 * col2 + col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2610
3195
56

query I rowsort
SELECT DISTINCT + cor0.col0 + + col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
105
121
67

query I rowsort
SELECT - cor0.col2 + 53 * + 10 FROM tab0 cor0 GROUP BY cor0.col2
----
451
492
506

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

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

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

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

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

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

query I rowsort
SELECT + cor0.col1 * col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
3772
5369
915

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.col2
----
26
43
83

query I rowsort
SELECT 23 FROM tab0 GROUP BY col0
----
23
23
23

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + cor0.col0 + 29 FROM tab2 AS cor0 GROUP BY cor0.col0
----
120
121
44

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

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

query I rowsort
SELECT + 29 * 91 FROM tab1 AS cor0 GROUP BY col1
----
2639
2639
2639

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

query I rowsort
SELECT DISTINCT + 72 + + cor0.col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
110
151
96

query I rowsort
SELECT DISTINCT + 85 + - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2
27
6

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col1 * COALESCE ( cor0.col0, cor0.col2 ) * + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-218776
-424151
-79605

query I rowsort
SELECT DISTINCT 69 * cor0.col0 FROM tab2 cor0 GROUP BY col0
----
1035
6279
6348

query I rowsort
SELECT + cor0.col2 * + 78 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
4524
6162
6786

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

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

query I rowsort
SELECT ALL 33 * 30 FROM tab0 AS cor0 GROUP BY cor0.col2
----
990
990
990

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

query I rowsort
SELECT ALL cor0.col0 * 6 FROM tab0 cor0 GROUP BY cor0.col0, col2, cor0.col1
----
156
258
498

query I rowsort
SELECT - 84 * + 60 FROM tab2 AS cor0 GROUP BY col1
----
-5040
-5040
-5040

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

query I rowsort
SELECT ALL - cor0.col0 + + 45 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
-37
17
23

query I rowsort
SELECT + 94 + 73 + col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
193
210
250

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 81 * + cor0.col0 * + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY col0
----
-18225
-670761
-685584

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

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

query I rowsort
SELECT ALL cor0.col2 * + 75 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3375
5325
600

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

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

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

query I rowsort
SELECT 27 + col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
110
53
70

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 29 + - col1 + + cor0.col1 * + 64 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2612
3746
3872

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

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

query I rowsort
SELECT ALL + cor0.col1 * - col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL >= ( NULL )
----

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

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

query I rowsort
SELECT ALL cor0.col0 * 67 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1474
1876
5494

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

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

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT - cor0.col2 * + 42 + - 49 AS col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-1939
-3031
-385

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT COALESCE ( cor0.col2, + 58, cor0.col1 * cor0.col0 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-544
SELECT ALL cor0.col2 * cor0.col2 DIV + 42 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
13
148
34

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-544
SELECT ALL cor0.col2 * cor0.col2 / + 42 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
13
148
34

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-545
SELECT cor0.col2 * + CAST( + 83 AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY col2
----
3735
5893
664

skipif mysql # not compatible
query I rowsort label-545
SELECT cor0.col2 * + CAST ( + 83 AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY col2
----
3735
5893
664

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 tab2.col0 FROM tab2 WHERE ( NULL ) NOT BETWEEN NULL AND + col2 * + col1 GROUP BY col0
----

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

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-549
SELECT COALESCE ( + 1, cor0.col0 ) + - CAST( NULL AS DECIMAL ) FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-549
SELECT COALESCE ( + 1, cor0.col0 ) + - CAST ( NULL AS REAL ) FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ALL 26 + - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-55
26

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

onlyif mysql # DIV for integer division: 
query I rowsort label-552
SELECT DISTINCT cor1.col0 DIV - cor1.col0 + - 79 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-80

skipif mysql # not compatible
query I rowsort label-552
SELECT DISTINCT cor1.col0 / - cor1.col0 + - 79 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-80

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

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

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

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

query I rowsort
SELECT col0 * cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

onlyif mysql # DIV for integer division: 
query I rowsort label-558
SELECT 19 DIV - 54 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-558
SELECT 19 / - 54 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

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

skipif mysql # not compatible
query I rowsort label-559
SELECT + 92 / cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
3
4

query I rowsort
SELECT 97 * - cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-179353
-65572
-668233

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

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

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

query I rowsort
SELECT ALL - 95 * col1 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
183920
308655
3420

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

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

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

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

query I rowsort
SELECT DISTINCT - 38 * col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-3002
-912

query I rowsort
SELECT ALL cor0.col2 * + ( + 66 ) + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3886
5293
5829

query I rowsort
SELECT - 2 AS col1 FROM tab0 GROUP BY tab0.col1
----
-2
-2

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

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

query I rowsort
SELECT 65 * col0 * + 34 FROM tab1 AS cor0 GROUP BY cor0.col0
----
181220
48620
61880

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

onlyif mysql # DIV for integer division: 
query I rowsort label-575
SELECT 12 DIV + 3 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4
4
4

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-575
SELECT 12 / + 3 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4
4
4

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

query I rowsort
SELECT cor0.col2 * - 45 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-3195
-360

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

query I rowsort
SELECT cor0.col2 * cor0.col1 + cor0.col2 FROM tab2 AS cor0 GROUP BY col1, col2
----
2436
4740
5394

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

query I rowsort
SELECT + 30 * + cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
2460
660
840

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 89, cor0.col1 * + cor0.col1 ) FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
89
89
89

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

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

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

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

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

query I rowsort
SELECT + cor0.col2 * + cor0.col2 * - 67 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-135675
-337747
-4288

query I rowsort
SELECT 6 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
348
474
522

query I rowsort
SELECT + col2 + cor0.col2 * cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col2, cor0.col1
----
2436
4740
5394

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

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

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

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

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab0 GROUP BY cor0.col2
----
58
79
87

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

query I rowsort
SELECT + 87 * + cor0.col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
1305
7917
8004

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

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

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

query I rowsort
SELECT DISTINCT 63 + 48 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
111

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

query I rowsort
SELECT ALL + 30 FROM tab1 cor0 GROUP BY cor0.col2
----
30
30
30

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

query I rowsort
SELECT DISTINCT 34 * 94 * - cor0.col2 - - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-121410
-252405
-76680

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

skipif mysql # not compatible
query I rowsort label-606
SELECT ALL CAST ( NULL AS REAL ) 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 ALL 29 + col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
112
55
72

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-612
SELECT ALL 35 DIV - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-612
SELECT ALL 35 / - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-613
SELECT - 74 DIV - cor0.col1 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
60
62

skipif mysql # not compatible
query I rowsort label-613
SELECT - 74 / - cor0.col1 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
60
62

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col2 * 25 FROM tab2 AS cor0 GROUP BY col2
----
-1450
-1975
-2175

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

query I rowsort
SELECT 2 + col2 * - cor0.col0 FROM tab2 AS cor0 GROUP BY col2, col0
----
-1303
-5334
-7187

query I rowsort
SELECT DISTINCT - cor0.col2 + - cor0.col2 + + 63 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-27
-79
47

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL NULLIF ( cor0.col2, cor0.col2 + cor0.col2 ) col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

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

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

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

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

query I rowsort
SELECT DISTINCT 35 * + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
1575
2485
280

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

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

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

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

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

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

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

query I rowsort
SELECT col1 * cor0.col1 * + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
185193
216
85184

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

query I rowsort
SELECT DISTINCT - 57 AS col0 FROM tab2 cor0 GROUP BY col2
----
-57

query I rowsort
SELECT - 35 FROM tab0 AS cor0 GROUP BY col1
----
-35
-35

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

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

query I rowsort
SELECT ALL 43 * - 87 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-3741
-3741
-3741

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

query I rowsort
SELECT ALL 58 * cor0.col2 AS col0 FROM tab2 cor0 GROUP BY col2
----
3364
4582
5046

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

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

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

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

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

query I rowsort
SELECT - 73 * 10 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-730
-730
-730

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

query I rowsort
SELECT ALL - cor0.col2 * + 67 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
-3886
-5293
-5829

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

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

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

query I rowsort
SELECT - 67 FROM tab0 GROUP BY tab0.col0
----
-67
-67
-67

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

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

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

query I rowsort
SELECT 82 * - col0 AS col0 FROM tab0 cor0 GROUP BY col0
----
-2132
-3526
-6806

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

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

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

query I rowsort
SELECT DISTINCT - ( + 37 + + cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-116
-61
-75

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-666
SELECT - CAST( NULL AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-666
SELECT - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

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

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

query I rowsort
SELECT DISTINCT + 22 + 47 FROM tab0 GROUP BY tab0.col1
----
69

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

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

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - 94 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
2256
3572
7426

query I rowsort
SELECT 8 + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
14
52
65

query I rowsort
SELECT DISTINCT + 22 FROM tab2 GROUP BY col1
----
22

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

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

query I rowsort
SELECT + 14 + - 38 FROM tab1 GROUP BY tab1.col0
----
-24
-24
-24

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

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

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

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

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

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

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

query I rowsort
SELECT - ( 25 ) FROM tab1 cor0 GROUP BY cor0.col2
----
-25
-25
-25

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

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

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-81
0

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

query I rowsort
SELECT ALL - tab2.col2 * - 33 + 17 AS col2 FROM tab2 GROUP BY tab2.col2
----
1931
2624
2888

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

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

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

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

query I rowsort
SELECT cor0.col2 + + 22 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
30
67
93

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

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

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

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

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

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

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

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

query I rowsort
SELECT ( + 96 ) * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2496
4128
7968

query I rowsort
SELECT ALL + 65 * - col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2665
-3835
-3965

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

skipif mysql # not compatible
query I rowsort label-705
SELECT ALL + 92 / - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-15
-2

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 12 col2 FROM tab0 cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
12

query I rowsort
SELECT 75 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3375
-5325
-600

query I rowsort
SELECT + 69 FROM tab0 cor0 GROUP BY col1
----
69
69

query I rowsort
SELECT - 16 + + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-8
29
55

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

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

query I rowsort
SELECT cor0.col0 * cor0.col0 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
3375
753571
778688

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

query I rowsort
SELECT ALL + cor0.col1 + - col1 * cor0.col1 * 25 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-48356
-81168
-894

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

query I rowsort
SELECT - 46 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1012
-1288
-3772

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

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

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col1 * 69 - - 35 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1394
-2006
-2074

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

query I rowsort
SELECT + ( + CASE - col2 WHEN - cor0.col2 THEN cor0.col1 ELSE NULL END ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
0
0
81

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

query I rowsort
SELECT cor0.col0 - + cor0.col0 * cor0.col0 * 60 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-13485
-496769
-507748

query I rowsort
SELECT + cor0.col0 * + 97 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2522
4171
8051

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab2 cor0 WHERE NOT ( NULL ) NOT BETWEEN ( NULL ) AND NULL GROUP BY col2
----

query I rowsort
SELECT tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NOT NULL
----

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-741
SELECT - 80 DIV - 62 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-741
SELECT - 80 / - 62 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
1
1
1

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 cor0.col0 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

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

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

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

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

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 cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
26
43
83

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * - 69 col0 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
-1518
-1932
-5658

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - COALESCE ( + col0, tab1.col0 ), 76, + col1 ) AS col1 FROM tab1 GROUP BY col0
----
22
28
82

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-756
SELECT - cor0.col1 DIV + 39 col1 FROM tab2 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-756
SELECT - cor0.col1 / + 39 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

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

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

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

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

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

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

query I rowsort
SELECT ALL 80 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
80
80

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

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

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

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

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

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

query I rowsort
SELECT - + 73 * + 46 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-3358
-3358
-3358

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

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

query I rowsort
SELECT ALL - 5 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-5
-5
-5

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 99 * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-2178
-2772
-8118

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

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

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

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

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

query I rowsort
SELECT ALL + 85 FROM tab0 AS cor0 GROUP BY col2
----
85
85
85

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

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

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

query I rowsort
SELECT 90 FROM tab0 AS cor0 GROUP BY col2
----
90
90
90

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

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

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

query I rowsort
SELECT DISTINCT ( 10 ) * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
810

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

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

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

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

query I rowsort
SELECT DISTINCT col0 * - cor0.col0 * + 95 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-45980
-638780
-74480

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

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

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

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

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

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - NULLIF ( + col2, cor0.col2 ) * - COALESCE ( 78, + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

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

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

query I rowsort
SELECT tab1.col2 - + 10 AS col2 FROM tab1 GROUP BY tab1.col2
----
-2
35
61

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

query I rowsort
SELECT DISTINCT + - cor0.col0 * + 74 * 23 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-141266
-44252
-73186

query I rowsort
SELECT - cor1.col1 + cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col1
----
9 values hashing to 5b39905558e099f0f33e2b9eaa979025

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

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

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

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

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

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 + + 14 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2039
5055
78

query I rowsort
SELECT - cor0.col2 * - 56 - 73 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
2447
375
3903

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-819
SELECT + cor0.col1 DIV - 4 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-20
0

skipif mysql # not compatible
query I rowsort label-819
SELECT + cor0.col1 / - 4 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-20
0

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

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

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

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

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

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

query I rowsort
SELECT - col0 * 15 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1245
-390
-645

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col1 / + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

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

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

query I rowsort
SELECT ALL cor1.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2 HAVING NULL > ( NULL )
----

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

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 DISTINCT 53 FROM tab0 cor0 GROUP BY cor0.col2
----
53

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

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

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

query I rowsort
SELECT - tab2.col0 AS col0 FROM tab2 GROUP BY col0 HAVING NULL IS NOT NULL
----

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

query I rowsort
SELECT + cor0.col0 + cor0.col0 AS col1 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 10 col1 FROM tab2 cor0 GROUP BY cor0.col0
----
10
10
10

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

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

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

query I rowsort
SELECT cor0.col2 * - 53 FROM tab1 cor0 GROUP BY cor0.col2
----
-2385
-3763
-424

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-852
SELECT cor0.col0 DIV - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-852
SELECT cor0.col0 / - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-2
0

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

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

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

query I rowsort
SELECT - + 85 * + cor0.col1 + + 67 * 89 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
1118
2223
5453

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

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

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 DISTINCT + 66 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
66

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col1 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0, cor0.col2
----
-29
16
38

query I rowsort
SELECT DISTINCT - 10 + - cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-16
-54
-67

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + cor0.col0 * cor0.col0 col0 FROM tab1 AS cor0 CROSS JOIN tab0 GROUP BY cor0.col0
----
506
6806
812

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-882
SELECT + 0 / + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
0
0

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

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

query I rowsort
SELECT 94 * + 44 + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
4142
4180
4193

query I rowsort
SELECT ALL - 64 + tab1.col2 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
-19
-56
7

query I rowsort
SELECT ALL - 91 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1365
-8281
-8372

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

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

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

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

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

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

query I rowsort
SELECT + + 60 * + cor0.col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
1320
1680
4920

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-205379
-226981
-68921

query I rowsort
SELECT DISTINCT - 33 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1914
-2607
-2871

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-901
SELECT col1 DIV - 13 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
-3
-4
0

skipif mysql # not compatible
query I rowsort label-901
SELECT col1 / - 13 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
-3
-4
0

query I rowsort
SELECT + cor0.col0 * 80 FROM tab1 AS cor0 GROUP BY col1, cor0.col0, cor0.col1
----
1760
2240
6560

query I rowsort
SELECT + 41 * cor0.col1 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
1681
2419
2501

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

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

query I rowsort
SELECT DISTINCT + 18 * - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-1476
-396
-504

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

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

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

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

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

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

query I rowsort
SELECT - 51 FROM tab1 cor0 GROUP BY col1
----
-51
-51
-51

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-916
SELECT + 18 DIV + 49 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-916
SELECT + 18 / + 49 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

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

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

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

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

query I rowsort
SELECT 34 FROM tab1 cor0 GROUP BY col1
----
34
34
34

query I rowsort
SELECT 93 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
115
121
175

query I rowsort
SELECT DISTINCT + 29 FROM tab1 GROUP BY tab1.col2
----
29

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

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

query I rowsort
SELECT - - 95 FROM tab0 GROUP BY col2
----
95
95
95

query I rowsort
SELECT ALL - 23 + + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
18
36
38

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT + cor0.col2 - 82 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-11
-37
-74

query I rowsort
SELECT cor0.col2 * 28 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
1260
1988
224

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-945
SELECT ( - 2 ) DIV + 96 - col0 AS col0 FROM tab1 cor0 GROUP BY col0
----
-22
-28
-82

skipif mysql # not compatible
query I rowsort label-945
SELECT ( - 2 ) / + 96 - col0 AS col0 FROM tab1 cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT col0 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-132
-1596
-3608

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

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

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

query I rowsort
SELECT - cor0.col1 * ( - 53 ) FROM tab0 AS cor0 GROUP BY col1
----
0
4293

query I rowsort
SELECT + cor0.col1 * 17 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
102
748
969

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

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

query I rowsort
SELECT ALL 62 * tab2.col2 AS col0 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
3596
4898
5394

query I rowsort
SELECT NULLIF ( - cor0.col0, - 97 ) + 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-42
12
18

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

query I rowsort
SELECT DISTINCT - cor0.col1 * - ( + cor0.col1 ) - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1892
30
3192

query I rowsort
SELECT + 20 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
20
20
20

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT + col2 * + cor0.col2 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
195112
493039
658503

query I rowsort
SELECT DISTINCT + col1 * 92 * - 93 + cor0.col1 FROM tab2 cor0 GROUP BY col1
----
-350755
-504745
-521855

onlyif mysql # DIV for integer division: 
query I rowsort label-972
SELECT cor0.col0 DIV + 78 AS col1 FROM tab1 cor0 GROUP BY col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-972
SELECT cor0.col0 / + 78 AS col1 FROM tab1 cor0 GROUP BY col0
----
0
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-973
SELECT + col0 DIV 14 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
23
30
87

skipif mysql # not compatible
query I rowsort label-973
SELECT + col0 / 14 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
23
30
87

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

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

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

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

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

query I rowsort
SELECT col1 * + ( cor0.col1 ) + + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
1980
3306
42

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

query I rowsort
SELECT ALL - 61 + - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-142
-61

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

skipif mysql # not compatible
query I rowsort label-981
SELECT DISTINCT cor0.col2 / + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
1

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

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

query I rowsort
SELECT ALL - - 90 * 7 FROM tab1 GROUP BY tab1.col1
----
630
630
630

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

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

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

query I rowsort
SELECT ALL col2 AS col1 FROM tab2 WHERE tab2.col0 IS NULL GROUP BY tab2.col2
----

query I rowsort
SELECT + tab2.col1 AS col2 FROM tab2 GROUP BY col1 HAVING NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL + tab2.col2 AS col2 FROM tab2 WHERE NULL IS NOT NULL GROUP BY tab2.col2
----

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 HAVING NULL < NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-992
SELECT - 17 DIV 87 + cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
22
28
82

skipif mysql # not compatible
query I rowsort label-992
SELECT - 17 / 87 + cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
22
28
82

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

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

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

query I rowsort
SELECT 11 + + col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
52
70
72

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

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

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

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

query I rowsort
SELECT DISTINCT + 16 FROM tab0 GROUP BY col0
----
16

query I rowsort
SELECT ALL + 92 FROM tab1 GROUP BY col0
----
92
92
92

query I rowsort
SELECT cor0.col1 + col1 FROM tab1 cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT ALL - 6 + - cor0.col1 + 85 FROM tab2 AS cor0 GROUP BY cor0.col1
----
18
20
38

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col1 * ( + 12 ) + - col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
484
627
66

query I rowsort
SELECT DISTINCT 76 * - 60 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4560

query I rowsort
SELECT ALL - 97 + cor0.col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-5
-6
-82

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

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

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

query I rowsort
SELECT ALL 6 * cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1350
49686
50784

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1023
SELECT - tab1.col0 DIV 65 FROM tab1 GROUP BY tab1.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1023
SELECT - tab1.col0 / 65 FROM tab1 GROUP BY tab1.col0
----
-1
0
0

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

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

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

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

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

query I rowsort
SELECT - + 43 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-43
-43
-43

query I rowsort
SELECT + 76 AS col0 FROM tab1, tab2 AS cor0, tab0 AS cor1 GROUP BY cor0.col1
----
76
76
76

query I rowsort
SELECT + col1 AS col0 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NOT NULL
----

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

query I rowsort
SELECT 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 - col2 + 54 * + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2385
3763
424

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

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

query I rowsort
SELECT ALL 77 + - col0 * + ( + 29 ) AS col2 FROM tab0 GROUP BY tab0.col0
----
-1170
-2330
-677

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1040
SELECT ALL 69 DIV cor0.col2 + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY col2
----
26
39
79

skipif mysql # not compatible
query I rowsort label-1040
SELECT ALL 69 / cor0.col2 + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY col2
----
26
39
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT ALL NULLIF ( - cor0.col2, + cor0.col2 ) * 35 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-1575
-2485
-280

query I rowsort
SELECT ALL - ( 48 ) FROM tab2 AS cor0 GROUP BY col2
----
-48
-48
-48

query I rowsort
SELECT DISTINCT - cor0.col2 + + col0 * - cor0.col0 + 67 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-425
-6728
-762

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

query I rowsort
SELECT - col0 * + 10 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-260
-430
-830

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

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1051
SELECT DISTINCT CAST( NULL AS SIGNED ) / + 52 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1051
SELECT DISTINCT CAST ( NULL AS INTEGER ) / + 52 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col0
----
NULL

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

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

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

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

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

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

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

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

query I rowsort
SELECT + 83 FROM tab1 cor0 GROUP BY col2
----
83
83
83

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

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( - COALESCE ( 69, col2, + 41, cor0.col1 ), - cor0.col2, 80 ) * cor0.col0 + 76 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1870
3043
5803

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

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

query I rowsort
SELECT 6 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
546
552
90

query I rowsort
SELECT ALL - cor0.col2 * 80 + + 88 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4552
-6232
-6872

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1070
SELECT + cor0.col0 DIV + 36 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-1070
SELECT + cor0.col0 / + 36 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
2
2

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

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

query I rowsort
SELECT 86 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3526
5074
5246

query I rowsort
SELECT + 3 + - 60 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-57
-57
-57

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

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

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

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

query I rowsort
SELECT 90 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
148
169
177

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

query I rowsort
SELECT DISTINCT 66 FROM tab0 GROUP BY col1
----
66

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

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

query I rowsort
SELECT + 9 FROM tab2 GROUP BY tab2.col2
----
9
9
9

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-1084
SELECT ALL - cor0.col2 DIV CAST( 53 AS SIGNED ) + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
57
78
86

skipif mysql # not compatible
query I rowsort label-1084
SELECT ALL - cor0.col2 / CAST ( 53 AS INTEGER ) + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
57
78
86

query I rowsort
SELECT DISTINCT - 73 * 50 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3650

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1090
SELECT col2 + + CASE 42 WHEN + col2 THEN NULL ELSE - cor0.col2 END DIV + 17 FROM tab1 cor0 GROUP BY col2
----
43
67
8

skipif mysql # not compatible
query I rowsort label-1090
SELECT col2 + + CASE 42 WHEN + col2 THEN NULL ELSE - cor0.col2 END / + 17 FROM tab1 cor0 GROUP BY col2
----
43
67
8

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - 99 - - 59 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-40
-40
-40

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col2 * + cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-195112
-493039
-658503

query I rowsort
SELECT + col2 * - ( + tab1.col2 ) - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2070
-5112
-72

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

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col0 * - ( - cor0.col1 ) * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-154652
-316771
-55815

query I rowsort
SELECT DISTINCT + cor0.col0 * + cor0.col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL 52 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
2132
3068
3172

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

query I rowsort
SELECT ALL + 99 FROM tab1 cor0 GROUP BY cor0.col2
----
99
99
99

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

query I rowsort
SELECT DISTINCT - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT ( NULL ) IS NOT NULL
----
-45
-71
-8

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

query I rowsort
SELECT tab0.col0 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

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

query I rowsort
SELECT cor0.col2 + + cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
158
48
76

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

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

query I rowsort
SELECT - 35 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1540
1995
210

query I rowsort
SELECT col1 + - 31 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-31
50

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1134
SELECT ALL 55 DIV col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-1134
SELECT ALL 55 / col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
0
1
2

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 86 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
86
86
86

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

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

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

query I rowsort
SELECT 56 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
1344
2128
4424

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

query I rowsort
SELECT ALL - 32 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1312
-1888
-1952

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

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

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

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

query I rowsort
SELECT + 78 FROM tab2 GROUP BY col2
----
78
78
78

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

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

query I rowsort
SELECT col0 * 37 AS col1 FROM tab1 GROUP BY tab1.col0
----
1036
3034
814

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

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

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

query I rowsort
SELECT 97 - 43 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
54
54
54

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1167
SELECT 65 DIV 77 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1167
SELECT 65 / 77 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1171
SELECT + cor0.col1 * cor0.col1 + cor0.col1 DIV cor0.col1 AS col2 FROM tab1 AS cor0 WHERE NOT NULL IS NOT NULL GROUP BY cor0.col1
----
1937
3250
37

skipif mysql # not compatible
query I rowsort label-1171
SELECT + cor0.col1 * cor0.col1 + cor0.col1 / cor0.col1 AS col2 FROM tab1 AS cor0 WHERE NOT NULL IS NOT NULL GROUP BY cor0.col1
----
1937
3250
37

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

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

query I rowsort
SELECT DISTINCT - 94 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-118
-132
-173

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( + COALESCE ( - 21, tab1.col0 ), + cor0.col0 ) * - cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-1218
-1659
-1827

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

skipif mysql # not compatible
query I rowsort label-1176
SELECT col1 / cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
3

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

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

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

query I rowsort
SELECT 38 * col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2204
3002
3306

query I rowsort
SELECT ALL + 45 * 57 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
2565
2565
2565

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

query I rowsort
SELECT 43 AS col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
43
43

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 88 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-88
-88
-88

query I rowsort
SELECT ALL 88 FROM tab0 AS cor0 GROUP BY cor0.col1
----
88
88

query I rowsort
SELECT 22 * - 92 FROM tab2 cor0 GROUP BY cor0.col0
----
-2024
-2024
-2024

query I rowsort
SELECT DISTINCT - cor0.col0 * - 43 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1204
3526
946

query I rowsort
SELECT ( 17 ) * + 33 FROM tab1 AS cor0 GROUP BY cor0.col0
----
561
561
561

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - cor0.col0 + 51 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-32
25
8

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 * + col2 + 29 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
19604
490941
654228

query I rowsort
SELECT 57 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
57
57
57

query I rowsort
SELECT ALL + 61 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
61
61
61

query I rowsort
SELECT ALL - 34 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0, cor0.col1
----
-8
49
9

onlyif mysql # DIV for integer division: 
query I rowsort label-1196
SELECT DISTINCT + COALESCE ( 20, col1 ) DIV cor0.col1 AS col1 FROM tab1 cor0 GROUP BY col1
----
0
3

skipif mysql # not compatible
query I rowsort label-1196
SELECT DISTINCT + COALESCE ( 20, col1 ) / cor0.col1 AS col1 FROM tab1 cor0 GROUP BY col1
----
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 13 col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-13
-13
-13

query I rowsort
SELECT ALL 65 AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
65
65
65

query I rowsort
SELECT 55 * 78 FROM tab0 cor0 GROUP BY cor0.col1
----
4290
4290

query I rowsort
SELECT ALL 11 AS col2 FROM tab2 cor0 GROUP BY col0
----
11
11
11

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 - + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6642
0

query I rowsort
SELECT DISTINCT + 33 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
33

query I rowsort
SELECT ALL ( 92 ) * + cor0.col1 * - col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-603612
0

query I rowsort
SELECT ALL - 91 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-91
-91
-91

query I rowsort
SELECT - cor0.col0 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1206
SELECT 2 + cor0.col1 DIV + 84 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
2
2
2

skipif mysql # not compatible
query I rowsort label-1206
SELECT 2 + cor0.col1 / + 84 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
2
2
2

query I rowsort
SELECT 77 + col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
101
115
156

query I rowsort
SELECT DISTINCT - 76 FROM tab0 cor0 GROUP BY cor0.col2
----
-76

query I rowsort
SELECT 41 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
41
41
41

query I rowsort
SELECT DISTINCT 89 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
89

query I rowsort
SELECT ALL + cor0.col1 * 98 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
0
0
7938

query I rowsort
SELECT ( 1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 7 * - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY col1
----
-308
-399
-42

query I rowsort
SELECT DISTINCT + 11 AS col0 FROM tab1 cor0 GROUP BY col2
----
11

query I rowsort
SELECT - 16 FROM tab1 GROUP BY tab1.col2
----
-16
-16
-16

query I rowsort
SELECT 20 FROM tab0 AS cor0 GROUP BY cor0.col1
----
20
20

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - + 44 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-44
-44
-44

query I rowsort
SELECT ALL + + 68 FROM tab0 GROUP BY col1
----
68
68

query I rowsort
SELECT DISTINCT + tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + 60 FROM tab1 cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT DISTINCT 86 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
86

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 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 ALL + cor0.col2 col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 26 FROM tab2, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 14 + + cor0.col1 * cor0.col1 col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
14
6575

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 16 col2 FROM tab1 AS cor0 GROUP BY col1
----
-16
-16
-16

query I rowsort
SELECT 49 * 50 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2450
2450
2450

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1229
SELECT - - CAST( NULL AS SIGNED ) * 51 AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1229
SELECT - - CAST ( NULL AS INTEGER ) * 51 AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col1 * + 71 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2911
-4189
-4331

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT 47 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
47

query I rowsort
SELECT DISTINCT + cor0.col2 + + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
116
158
174

query I rowsort
SELECT DISTINCT + 0 FROM tab0 GROUP BY col0
----
0

query I rowsort
SELECT DISTINCT cor0.col2 * 44 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1980
3124
352

query I rowsort
SELECT DISTINCT + 26 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
26

query I rowsort
SELECT ALL cor0.col0 + - 19 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
24
64
7

query I rowsort
SELECT col0 * ( + 54 * cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
314388
68040
9504

query I rowsort
SELECT ALL cor0.col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - 41 * + 68 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col2
----
-2788
-2788
-2788

query I rowsort
SELECT + 51 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, col2
----
-40
-41
36

query I rowsort
SELECT 94 - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
15
36
7

onlyif mysql # DIV for integer division: 
query I rowsort label-1244
SELECT DISTINCT cor0.col0 DIV - 48 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1
0

skipif mysql # not compatible
query I rowsort label-1244
SELECT DISTINCT cor0.col0 / - 48 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1
0

query I rowsort
SELECT + ( + cor0.col2 * cor0.col2 + + 87 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1531
6328
663

query I rowsort
SELECT + cor0.col0 * ( col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL + - 59 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
-59
-59
-59

query I rowsort
SELECT ALL - - cor0.col1 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 0 col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
0
0
0

query I rowsort
SELECT 57 FROM tab2 AS cor0 GROUP BY cor0.col1
----
57
57
57

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT - 18 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-18
-18
-18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 23 + + 19 col0 FROM tab0 cor0 GROUP BY cor0.col1
----
42
42

query I rowsort
SELECT ALL + + tab0.col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT ALL col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL 2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
2
2

query I rowsort
SELECT ALL - ( col2 ) * + tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT + 63 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
63
63
63

query I rowsort
SELECT - 55 FROM tab0 cor0 GROUP BY cor0.col0
----
-55
-55
-55

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1264
SELECT CAST( 11 AS SIGNED ) - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-34
-60
3

skipif mysql # not compatible
query I rowsort label-1264
SELECT CAST ( 11 AS INTEGER ) - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-34
-60
3

query I rowsort
SELECT COALESCE ( - 54, - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-54
-54
-54

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT - 46 FROM tab2 cor0 GROUP BY cor0.col2
----
-46
-46
-46

query I rowsort
SELECT + - 27 AS col2 FROM tab0 GROUP BY col1
----
-27
-27

query I rowsort
SELECT ALL + cor0.col0 * - 64 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-30976
-430336
-50176

query I rowsort
SELECT 49 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
49
49
49

query I rowsort
SELECT ALL - 11 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-242
-308
-902

query I rowsort
SELECT cor0.col2 * - 68 FROM tab2 AS cor0 GROUP BY col2
----
-3944
-5372
-5916

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + cor1.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT 63 FROM tab1 AS cor0 GROUP BY cor0.col2
----
63
63
63

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1280
SELECT DISTINCT CAST( NULL AS SIGNED ) * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1280
SELECT DISTINCT CAST ( NULL AS INTEGER ) * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT DISTINCT 48 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
48

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1282
SELECT DISTINCT cor0.col0 * CAST( NULL AS SIGNED ) * 31 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1282
SELECT DISTINCT cor0.col0 * CAST ( NULL AS INTEGER ) * 31 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT 41 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
41
41
41

query I rowsort
SELECT + 37 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
37
37
37

query I rowsort
SELECT ALL 99 + - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
12
20
41

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1286
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1286
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 * 73 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
5913

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1482
600
6320

query I rowsort
SELECT - - 66 AS col0 FROM tab1 GROUP BY tab1.col0
----
66
66
66

query I rowsort
SELECT - + cor0.col0 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL 63 * - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-1512
-2394
-4977

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - 32 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-2624
-704
-896

query I rowsort
SELECT - 90 * 0 AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT ALL - 46 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-46
-46
-46

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1, tab2 cor0, tab1 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL 68 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
109
127
129

query I rowsort
SELECT DISTINCT + cor0.col1 * + col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL 80 FROM tab1 GROUP BY col1
----
80
80
80

query I rowsort
SELECT + 85 + 46 AS col1 FROM tab0 GROUP BY col0
----
131
131
131

query I rowsort
SELECT + cor0.col1 + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT DISTINCT + ( 94 * 10 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
940

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL 93 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
93
93
93

query I rowsort
SELECT DISTINCT - + 89 AS col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
-89

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT - 26 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-26
-26
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 78 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT ALL 41 FROM tab2 cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT ALL 7 * 26 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
182
182
182

query I rowsort
SELECT 44 + 98 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
142
142

query I rowsort
SELECT ALL 32 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
32
32
32

query I rowsort
SELECT DISTINCT + ( + 10 ) FROM tab0 AS cor0 GROUP BY col0
----
10

query I rowsort
SELECT + + 22 FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
22
22
22

onlyif mysql # DIV for integer division: 
query I rowsort label-1316
SELECT - 84 DIV 98 FROM tab2, tab2 cor0 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1316
SELECT - 84 / 98 FROM tab2, tab2 cor0 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 13 FROM tab1 AS cor0 GROUP BY cor0.col0
----
13

query I rowsort
SELECT ALL - cor0.col2 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-102
-150
-170

query I rowsort
SELECT ALL col2 FROM tab2 AS cor0 WHERE NOT NULL IS NULL AND NOT ( NULL ) BETWEEN NULL AND cor0.col0 OR NOT NULL <= ( cor0.col0 ) GROUP BY cor0.col2
----

query I rowsort
SELECT - 70 + col1 * col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-34
1866
3179

query I rowsort
SELECT 62 * cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
2542
3658
3782

query I rowsort
SELECT ALL col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT cor0.col0 * - CASE + cor0.col1 WHEN cor0.col1 THEN + col0 END * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
149769

query I rowsort
SELECT DISTINCT - 79 FROM tab1 AS cor0 GROUP BY col0
----
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 87 col0 FROM tab2 GROUP BY col2
----
87
87
87

query I rowsort
SELECT DISTINCT cor0.col1 * + 45 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1980
2565
270

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 53 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-53

query I rowsort
SELECT + 39 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
39
39

query I rowsort
SELECT col0 * - cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

onlyif mysql # DIV for integer division: 
query I rowsort label-1330
SELECT 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-1330
SELECT cor0.col2 / cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT + 59 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
59
59
59

onlyif mysql # DIV for integer division: 
query I rowsort label-1332
SELECT DISTINCT + cor0.col0 DIV cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1332
SELECT DISTINCT + cor0.col0 / cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-1334
SELECT - 35 * 49 - + cor0.col1 DIV - ( col1 + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1715
-1715
-1715

skipif mysql # not compatible
query I rowsort label-1334
SELECT - 35 * 49 - + cor0.col1 / - ( col1 + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1715
-1715
-1715

query I rowsort
SELECT - col1 * - cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
6561

query I rowsort
SELECT - 15 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
-15
-15
-15

query I rowsort
SELECT ALL 15 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT 57 FROM tab1 AS cor0 GROUP BY cor0.col2
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 99 col0 FROM tab0 AS cor0 GROUP BY col2
----
99
99
99

query I rowsort
SELECT ALL 86 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
86
86
86

query I rowsort
SELECT + 4 + col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
45
63
65

query I rowsort
SELECT + 61 * - 24 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1464
-1464
-1464

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1343
SELECT DISTINCT + cor0.col2 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1343
SELECT DISTINCT + cor0.col2 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT 81 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1 GROUP BY cor1.col1
----
81
81

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
45
71
8

query I rowsort
SELECT ALL - 9 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-9
-9
-9

query I rowsort
SELECT ALL + tab1.col0 AS col0 FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT - ( 81 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
-81
-81
-81

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 16 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 4 col2 FROM tab0 AS cor0 GROUP BY col1
----
4
4

query I rowsort
SELECT DISTINCT + ( - cor0.col1 ) FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1353
SELECT col0 DIV + col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1353
SELECT col0 / + col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 0 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT 37 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
37
37
37

query I rowsort
SELECT ALL 5 FROM tab1 cor0 GROUP BY cor0.col1
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * - cor0.col1 - - cor0.col1 * - cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3872
-6498
-72

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 29 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT DISTINCT - 0 * 41 FROM tab1, tab1 AS cor0, tab2 AS cor1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT ALL - 42 + + cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-14
-20
40

onlyif mysql # DIV for integer division: 
query I rowsort label-1362
SELECT ALL + cor0.col0 DIV col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1362
SELECT ALL + cor0.col0 / col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT - cor0.col0 + + 1 * 79 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-12
-13
64

query I rowsort
SELECT 56 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
56
56
56

query I rowsort
SELECT + 75 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-16
-17
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 col2 FROM tab0 AS cor0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT DISTINCT + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL - + cor0.col0 AS col1 FROM tab1, tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 4 col1 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 51 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
51

query I rowsort
SELECT 65 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
65
65
65

onlyif mysql # DIV for integer division: 
query I rowsort label-1372
SELECT ALL - - cor0.col1 DIV + cor0.col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1372
SELECT ALL - - cor0.col1 / + cor0.col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT cor0.col2 + - col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 * 23 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1817
552
874

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1375
SELECT CAST( NULL AS SIGNED ) + - 10 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1375
SELECT CAST ( NULL AS INTEGER ) + - 10 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + 33 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
33
33
33

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
44
57
6

query I rowsort
SELECT cor0.col2 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - cor0.col0 * ( cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3772
-5369
-915

query I rowsort
SELECT ALL col2 AS col0 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL <> NULL
----

query I rowsort
SELECT tab0.col0 * tab0.col0 FROM tab0 GROUP BY col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

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.col1
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - 89 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-89

query I rowsort
SELECT ALL 14 * - COALESCE ( - 87, tab0.col2 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
1218
1218
1218

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT CASE - 75 WHEN - 96 THEN - cor0.col1 * - ( cor0.col0 ) WHEN cor0.col0 THEN NULL END FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, col2
----
0
0
81

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT ALL + 40 + 1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
41
41

query I rowsort
SELECT + - 82 FROM tab1 GROUP BY col1
----
-82
-82
-82

query I rowsort
SELECT + ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - ( + col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT 18 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
59
77
79

query I rowsort
SELECT DISTINCT + 56 FROM tab0 cor0 GROUP BY cor0.col0
----
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col2 FROM tab2 AS cor0 GROUP BY col0, col2
----
15
91
92

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 cor0 GROUP BY col1, cor0.col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-1399
SELECT ALL col2 DIV + ( 43 ) AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
1
1
2

skipif mysql # not compatible
query I rowsort label-1399
SELECT ALL col2 / + ( 43 ) AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
1
1
2

query I rowsort
SELECT ALL + cor0.col0 * cor0.col2 + + cor0.col2 + 37 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
1429
5431
7305

query I rowsort
SELECT col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - - tab2.col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
74
74
74

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1936
3249
36

query I rowsort
SELECT ALL - ( cor0.col2 ) AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT 29 FROM tab0 AS cor0 GROUP BY cor0.col1
----
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 86 col2 FROM tab0 GROUP BY tab0.col0
----
86
86
86

query I rowsort
SELECT DISTINCT 81 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
81

query I rowsort
SELECT ALL - 33 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-33
-33

query I rowsort
SELECT DISTINCT 97 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
97

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + cor0.col2 * 93 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
2232
3534
7347

query I rowsort
SELECT DISTINCT cor0.col2 + + 19 FROM tab1 AS cor0 GROUP BY cor0.col2
----
27
64
90

query I rowsort
SELECT ALL - - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL + 66 FROM tab1 AS cor0 GROUP BY cor0.col0
----
66
66
66

query I rowsort
SELECT ALL - 84 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-84
-84
-84

query I rowsort
SELECT ALL + 76 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
76
76
76

query I rowsort
SELECT ALL + 73 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
73
73
73

onlyif mysql # DIV for integer division: 
query I rowsort label-1421
SELECT ALL 6 DIV cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1421
SELECT ALL 6 / cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + cor1.col1 + cor1.col1 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col1
----
114
12
88

query I rowsort
SELECT 0 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - 1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, cor0.col0
----
-1

query I rowsort
SELECT 85 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
85
85
85

onlyif mysql # DIV for integer division: 
query I rowsort label-1426
SELECT DISTINCT cor0.col0 DIV - 6 + + cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-487
-6737
-788

skipif mysql # not compatible
query I rowsort label-1426
SELECT DISTINCT cor0.col0 / - 6 + + cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-487
-6737
-788

query I rowsort
SELECT 69 FROM tab0 cor0 GROUP BY col0
----
69
69
69

query I rowsort
SELECT ALL + CASE - cor0.col1 WHEN - 29 * cor0.col1 THEN NULL ELSE + 5 END AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
5
5
5

query I rowsort
SELECT ALL + 51 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT DISTINCT - 37 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-37

query I rowsort
SELECT + + 49 FROM tab0, tab2 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
49
49
49

query I rowsort
SELECT DISTINCT - cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-26
-43
-83

query I rowsort
SELECT ALL 96 FROM tab1 AS cor0 GROUP BY col0
----
96
96
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 54 col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
54

query I rowsort
SELECT DISTINCT - 13 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-13

query I rowsort
SELECT DISTINCT 61 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 82 * + cor0.col1 col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-3608
-4674
-492

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + cor0.col0 col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1440
SELECT col1 + + CAST( NULL AS DECIMAL ) col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1440
SELECT col1 + + CAST ( NULL AS REAL ) col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 35 FROM tab0 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT ALL - 26 + col2 FROM tab1 cor0 GROUP BY col2
----
-18
19
45

query I rowsort
SELECT ALL - 18 + - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-100
-40
-46

query I rowsort
SELECT ALL 11 FROM tab2 AS cor0 GROUP BY cor0.col1
----
11
11
11

query I rowsort
SELECT 36 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
36
36
36

query I rowsort
SELECT - 92 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-92
-92
-92

query I rowsort
SELECT ALL + 45 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT DISTINCT 19 FROM tab0 AS cor0 GROUP BY cor0.col2
----
19

query I rowsort
SELECT + 48 FROM tab1 AS cor0 GROUP BY cor0.col2
----
48
48
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 91 * - 40 * cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-149240
-214760
-222040

query I rowsort
SELECT 25 FROM tab1 cor0 GROUP BY cor0.col1
----
25
25
25

query I rowsort
SELECT - 13 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-13
-13
-13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + 68 FROM tab2 GROUP BY tab2.col2
----
68
68
68

query I rowsort
SELECT - tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT - 12 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
-12
-12
-12

query I rowsort
SELECT ALL 8 FROM tab2 cor0 GROUP BY cor0.col1
----
8
8
8

query I rowsort
SELECT 40 + - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-31
-5
32

query I rowsort
SELECT DISTINCT - 37 FROM tab1 AS cor0 GROUP BY col1
----
-37

query I rowsort
SELECT DISTINCT - 24 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-24

query I rowsort
SELECT 60 FROM tab1, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT 19 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 35 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT ALL 9 FROM tab0 AS cor0 GROUP BY col2
----
9
9
9

query I rowsort
SELECT DISTINCT - - ( + 36 ) FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
36

query I rowsort
SELECT col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + ( cor0.col1 ) * + cor0.col1 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
158752
792
90972

query I rowsort
SELECT 33 FROM tab2 AS cor0 GROUP BY col2
----
33
33
33

query I rowsort
SELECT DISTINCT + - 47 FROM tab2, tab2 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 41 col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
41
41
41

query I rowsort
SELECT DISTINCT col0 + - ( cor0.col0 ) - + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col1 + col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
118
122
82

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
164
44
56

query I rowsort
SELECT ALL - 93 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
-93
-93
-93

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor0.col2
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1476
SELECT DISTINCT + - CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1476
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - 98 ) col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col1
----
-98
-98
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 50 * cor0.col2 + + 56 * - 24 + - col0 col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1, cor0.col0, cor0.col2
----
-2587
-3327
-5320

query I rowsort
SELECT ALL - 57 FROM tab2 GROUP BY tab2.col2
----
-57
-57
-57

query I rowsort
SELECT ( cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - ( + cor0.col1 ) + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + + 46 AS col2 FROM tab2, tab1 cor0 GROUP BY tab2.col1
----
46

query I rowsort
SELECT DISTINCT 65 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
65

query I rowsort
SELECT DISTINCT + cor0.col0 + 36 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
119
62
79

query I rowsort
SELECT ALL - 77 * col2 AS col0 FROM tab2 GROUP BY col2
----
-4466
-6083
-6699

query I rowsort
SELECT + 89 * - 34 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-3026
-3026

query I rowsort
SELECT ALL + col0 / + tab0.col0 FROM tab0 WHERE NOT ( NULL ) IS NULL GROUP BY tab0.col0
----

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab2 WHERE NOT NULL IS NULL GROUP BY tab2.col1
----

query I rowsort
SELECT DISTINCT + col2 * + col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
1032
2054
3154

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab2, tab2 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT ALL - 86 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-86
-86
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col1
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT - 69 * 65 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
-4485
-4485
-4485

query I rowsort
SELECT ALL 1 FROM tab1 cor0 GROUP BY cor0.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * - cor0.col1 + - 25 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
11
1911
3224

query I rowsort
SELECT - cor0.col1 * ( + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT 28 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
28

query I rowsort
SELECT - - 47 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor1.col0
----
47
47
47

query I rowsort
SELECT ALL - 19 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-19
-19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 27 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-27

query I rowsort
SELECT DISTINCT 96 FROM tab1 AS cor0 GROUP BY cor0.col1
----
96

query I rowsort
SELECT DISTINCT + col1 * + ( - cor0.col1 ) FROM tab0 cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT 82 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * cor0.col2 col0 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + - tab1.col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

query I rowsort
SELECT + 76 * 81 FROM tab1 GROUP BY tab1.col0
----
6156
6156
6156

query I rowsort
SELECT ALL - - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL + cor0.col0 * 92 * + 12 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
28704
47472
91632

query I rowsort
SELECT ALL - 90 FROM tab2 AS cor0 GROUP BY col0
----
-90
-90
-90

query I rowsort
SELECT ALL - COALESCE ( - 89, cor0.col2, + cor0.col2 ) + + NULLIF ( - 30, + cor0.col2 * + 47 ) AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
59
59
59

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
15
91
92

query I rowsort
SELECT ALL cor1.col0 * + 11 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
242
308
902

onlyif mysql # DIV for integer division: 
query I rowsort label-1518
SELECT - tab1.col0 DIV - 35 FROM tab1 GROUP BY tab1.col0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-1518
SELECT - tab1.col0 / - 35 FROM tab1 GROUP BY tab1.col0
----
0
0
2

query I rowsort
SELECT ( - cor0.col0 + + cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( cor0.col0 + - cor0.col0 * cor0.col2 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1290
-5244
-7098

query I rowsort
SELECT ALL 98 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT ALL 77 FROM tab2, tab1 AS cor0, tab0 cor1 GROUP BY tab2.col1
----
77
77
77

query I rowsort
SELECT 24 FROM tab2 AS cor0 GROUP BY cor0.col0
----
24
24
24

query I rowsort
SELECT DISTINCT 14 * + 86 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1204

query I rowsort
SELECT DISTINCT - ( 34 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 13 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-13
-13
-13

query I rowsort
SELECT DISTINCT + 85 + cor0.col0 * - 42 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1007
-1721
-3401

query I rowsort
SELECT 63 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
63
63
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-1530
SELECT DISTINCT cor0.col0 * cor0.col0 + + cor0.col2 + 75 DIV cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
495
6795
831

skipif mysql # not compatible
query I rowsort label-1530
SELECT DISTINCT cor0.col0 * cor0.col0 + + cor0.col2 + 75 / cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
495
6795
831

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL + col0 / cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT - tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT + cor0.col2 + cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab0 GROUP BY cor0.col2 HAVING NOT ( NULL ) IS NOT NULL
----
142
16
90

query I rowsort
SELECT ALL cor0.col1 + + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
124
26
83

query I rowsort
SELECT ALL + col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL 80 * + cor0.col1 + - cor0.col1 + + NULLIF ( cor0.col1, cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1, cor0.col0
----
3520
4560
480

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 54 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col2
----
54
54
54

query I rowsort
SELECT - col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT + - 36 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-36
-36
-36

query I rowsort
SELECT DISTINCT col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL - cor0.col1 + - cor0.col1 * - cor0.col1 AS col1 FROM tab0, tab0 cor0 GROUP BY cor0.col1
----
0
6480

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, col2
----
58
79
87

query I rowsort
SELECT cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col2, cor1.col0
----
0
0
81

query I rowsort
SELECT col1 * + 57 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2508
3249
342

query I rowsort
SELECT 39 FROM tab2 cor0 GROUP BY col1
----
39
39
39

query I rowsort
SELECT DISTINCT - 72 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col1
----
-72

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + ( - 24 ) FROM tab1 cor0 GROUP BY cor0.col2
----
-24
-24
-24

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL 68 * cor0.col0 + 68 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1088
6256
6324

query I rowsort
SELECT ALL 34 FROM tab1 AS cor0 GROUP BY cor0.col0
----
34
34
34

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1554
SELECT ALL - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1554
SELECT ALL - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 28 FROM tab1 cor0 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT COALESCE ( - 0 * + col0 + - 14, 24, col0 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-14
-14
-14

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, col0
----
-22
-28
-82

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT ALL + 81 FROM tab0 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT DISTINCT - tab0.col1 * - 34 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
2754

query I rowsort
SELECT cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT 88 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
88
88
88

query I rowsort
SELECT - 71 AS col1 FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
-71
-71
-71

query I rowsort
SELECT cor0.col2 * col2 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT 39 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
100
80
98

query I rowsort
SELECT - 0 - - 90 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 7 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
7

query I rowsort
SELECT ALL - cor0.col0 * 43 + - 58 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1004
-1262
-3584

query I rowsort
SELECT COALESCE ( + 44, cor0.col2, - 39 ) + - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-14
-35
-43

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT + 23 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
64
82
84

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT + cor0.col0 + 39 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
121
61
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col1 col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ( - col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
0
81

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, col1
----
45
71
8

query I rowsort
SELECT - cor0.col0 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-19
-45
53

query I rowsort
SELECT ALL - 62 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-62
-62
-62

query I rowsort
SELECT ALL + 50 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT ALL 65 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
65
65
65

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + 35 AS col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
35
35
35

query I rowsort
SELECT ALL ( + 69 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT DISTINCT + 30 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
30

query I rowsort
SELECT ALL + 97 FROM tab0 AS cor0 GROUP BY col0
----
97
97
97

query I rowsort
SELECT ALL + 63 FROM tab2 AS cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT 12 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT + cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1, cor0.col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

onlyif mysql # DIV for integer division: 
query I rowsort label-1596
SELECT - cor0.col2 DIV cor0.col2 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
23
37
78

skipif mysql # not compatible
query I rowsort label-1596
SELECT - cor0.col2 / cor0.col2 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
23
37
78

query I rowsort
SELECT ALL - 42 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-42
-42

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 72, + cor0.col2 + - 8 ) FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
72
72
72

query I rowsort
SELECT 81 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT DISTINCT - 80 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-80

query I rowsort
SELECT NULLIF ( cor0.col2, - cor0.col2 ) * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT + 54 FROM tab2 GROUP BY tab2.col1
----
54
54
54

query I rowsort
SELECT ALL + 85 AS col1 FROM tab0 GROUP BY tab0.col2
----
85
85
85

query I rowsort
SELECT DISTINCT - 86 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-86

query I rowsort
SELECT col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col1 + 1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1
82

query I rowsort
SELECT + col1 * 69 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2829
4071
4209

query I rowsort
SELECT DISTINCT 83 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
83

query I rowsort
SELECT DISTINCT + 23 AS col2 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 col0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
8
8
8

query I rowsort
SELECT ALL 50 FROM tab1 AS cor0 GROUP BY cor0.col1
----
50
50
50

query I rowsort
SELECT ALL 30 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
30
30
30

query I rowsort
SELECT DISTINCT + 1 * - cor0.col1 AS col0 FROM tab0, tab1 cor0, tab1 cor1 GROUP BY cor0.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 40 col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
40

query I rowsort
SELECT ALL + NULLIF ( + cor0.col1, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 10 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-10
71

query I rowsort
SELECT 51 FROM tab0, tab0 cor0 GROUP BY cor0.col1
----
51
51

query I rowsort
SELECT ALL cor0.col2 + 82 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4698
-6399
-7047

query I rowsort
SELECT + 80 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
80
80

query I rowsort
SELECT DISTINCT 36 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
36

query I rowsort
SELECT 46 - + col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
-12
-33
-41

query I rowsort
SELECT DISTINCT + 36 FROM tab2 AS cor0 GROUP BY cor0.col0
----
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( 67 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-67

query I rowsort
SELECT - 63 FROM tab1, tab2 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
-63
-63
-63

onlyif mysql # DIV for integer division: 
query I rowsort label-1625
SELECT DISTINCT 24 DIV - 44 FROM tab0 cor0 GROUP BY cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-1625
SELECT DISTINCT 24 / - 44 FROM tab0 cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT ALL + NULLIF ( - tab2.col2, - tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 53 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
53
53
53

query I rowsort
SELECT + tab2.col1 * tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1722
3540
3782

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT cor0.col0 + - 81 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-53
-59
1

query I rowsort
SELECT - tab0.col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT + 92 FROM tab0 cor0 GROUP BY col1
----
92
92

query I rowsort
SELECT 65 FROM tab2 AS cor0 GROUP BY cor0.col1
----
65
65
65

query I rowsort
SELECT cor0.col1 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
105
38
79

query I rowsort
SELECT - 76 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-76
-76
-76

query I rowsort
SELECT 85 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
85
85
85

query I rowsort
SELECT + + 26 * 39 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
1014
1014

query I rowsort
SELECT ALL 19 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 50 + - cor0.col1 col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor0.col1
----
9 values hashing to a40194b71fcd0d0045eed26477b65479

onlyif mysql # DIV for integer division: 
query I rowsort label-1640
SELECT ALL cor0.col2 * + col2 + cor0.col2 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1445
577
6242

skipif mysql # not compatible
query I rowsort label-1640
SELECT ALL cor0.col2 * + col2 + cor0.col2 / cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1445
577
6242

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT - - 33 + 5 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
38
38
38

query I rowsort
SELECT ALL - tab1.col1 - - 58 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
1
14
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col0 FROM tab1 cor0 GROUP BY cor0.col0 HAVING ( NULL ) = ( NULL )
----

query I rowsort
SELECT DISTINCT - tab1.col0 AS col0 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT - 39 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-39
-39
-39

query I rowsort
SELECT + + 42 * 91 AS col0 FROM tab1 GROUP BY col2
----
3822
3822
3822

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL COALESCE ( + 8, cor0.col0 * col0, + cor0.col1 ) + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, col0
----
8
8
89

query I rowsort
SELECT 6 AS col0 FROM tab2 cor0 GROUP BY col2
----
6
6
6

query I rowsort
SELECT ALL col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - 71 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-71
-71
-71

query I rowsort
SELECT DISTINCT - cor0.col2 * + col0 * - COALESCE ( cor0.col0 * cor0.col2, - cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
1065024
4218916
9947716

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col2 - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0, cor0.col2
----
0

query I rowsort
SELECT DISTINCT 29 FROM tab1 cor0 GROUP BY cor0.col1
----
29

query I rowsort
SELECT ALL + - 82 + 3 FROM tab1 GROUP BY tab1.col0
----
-79
-79
-79

query I rowsort
SELECT + col2 FROM tab0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 22 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
22
22

query I rowsort
SELECT + col2 * col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT ALL - cor0.col2 - + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-142
-16
-90

query I rowsort
SELECT ALL - cor0.col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - 43 AS col1 FROM tab1 GROUP BY tab1.col2
----
-43

query I rowsort
SELECT DISTINCT - cor0.col2 * - 45 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1080
1710
3555

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 73 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1898
3139
6059

query I rowsort
SELECT DISTINCT 76 FROM tab2 AS cor0 GROUP BY cor0.col0
----
76

query I rowsort
SELECT - 84 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-84
-84

query I rowsort
SELECT - col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-1671
SELECT ( + cor0.col0 ) DIV + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1671
SELECT ( + cor0.col0 ) / + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
1
1
1

query I rowsort
SELECT ALL - 52 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-52
-52
-52

query I rowsort
SELECT DISTINCT 87 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
87

query I rowsort
SELECT 98 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT ALL - 24 * 82 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
-1968
-1968
-1968

query I rowsort
SELECT ALL + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL + cor0.col0 * - 32 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-2624
-704
-896

query I rowsort
SELECT DISTINCT 81 + 23 FROM tab0 AS cor0 GROUP BY cor0.col2
----
104

query I rowsort
SELECT + 80 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT - 41 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-41
-41
-41

query I rowsort
SELECT DISTINCT + 48 * 52 AS col0 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
2496

query I rowsort
SELECT cor0.col2 - + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT DISTINCT 60 FROM tab2 AS cor0 GROUP BY cor0.col0
----
60

query I rowsort
SELECT ALL + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL - ( + 20 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-20
-20
-20

onlyif mysql # DIV for integer division: 
query I rowsort label-1688
SELECT cor0.col1 DIV 82 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-1688
SELECT cor0.col1 / 82 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 * 31 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
111848
4092
49476

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT ( NULL ) IN ( - cor0.col2 )
----

query I rowsort
SELECT + 11 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
11
11
11

query I rowsort
SELECT 27 FROM tab1 AS cor0 GROUP BY cor0.col2
----
27
27
27

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL cor0.col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL + 76 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT ALL col1 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
124
26
83

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1702
SELECT ALL 34 DIV - 63 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1702
SELECT ALL 34 / - 63 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT cor0.col2 * - cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT 49 FROM tab0 AS cor0 GROUP BY cor0.col1
----
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT 17 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
17
17
17

query I rowsort
SELECT DISTINCT - 51 + 54 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 12 FROM tab2 AS cor0 GROUP BY col0
----
12

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1712
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1712
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1713
SELECT CAST( NULL AS DECIMAL ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1713
SELECT CAST ( NULL AS REAL ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 58 AS col2 FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
-58

query I rowsort
SELECT - - 85 AS col0 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
85
85
85

query I rowsort
SELECT + 99 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
140
158
160

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 * 27 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1204
2324
728

query I rowsort
SELECT 38 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3458
3496
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 35 * cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
1330
2765
840

query I rowsort
SELECT ALL 13 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
13
13
13

query I rowsort
SELECT 10 FROM tab0 AS cor0 GROUP BY cor0.col1
----
10
10

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-44
-57
-6

query I rowsort
SELECT 65 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT + + col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL - 2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2
-2
-2

onlyif mysql # DIV for integer division: 
query I rowsort label-1726
SELECT DISTINCT cor0.col0 DIV + 75 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-1726
SELECT DISTINCT cor0.col0 / + 75 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 22 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
22

query I rowsort
SELECT ALL - 16 FROM tab1 cor0 GROUP BY cor0.col0
----
-16
-16
-16

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
24
38
79

query I rowsort
SELECT cor0.col2 * - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
-2378
-4661
-5307

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1, tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT cor1.col0 * cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor1.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT 49 + 96 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
145

query I rowsort
SELECT ALL + 74 FROM tab2 AS cor0 GROUP BY col1, col1, cor0.col2
----
74
74
74

query I rowsort
SELECT 80 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT DISTINCT - + cor0.col1 * - cor0.col1 AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1739
SELECT DISTINCT + CAST( NULL AS DECIMAL ) FROM tab1 GROUP BY tab1.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1739
SELECT DISTINCT + CAST ( NULL AS REAL ) FROM tab1 GROUP BY tab1.col1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT - 68 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-68
-68
-68

query I rowsort
SELECT - 96 AS col2 FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
-96
-96
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 55 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
55
55
55

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1745
SELECT ALL CAST( NULL AS SIGNED ) - + 79 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1745
SELECT ALL CAST ( NULL AS INTEGER ) - + 79 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + COALESCE ( 12, cor0.col0 ) FROM tab2 cor0 GROUP BY col0
----
12
12
12

query I rowsort
SELECT DISTINCT - NULLIF ( - 14 * cor0.col1 + cor0.col1 * 68, - cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2376
-3078
-324

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * - 34 col1 FROM tab1 AS cor0 GROUP BY col2
----
-1530
-2414
-272

query I rowsort
SELECT DISTINCT + cor0.col1 * - cor0.col1 + cor0.col1 * ( - 83 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-534
-5588
-7980

query I rowsort
SELECT DISTINCT - 47 FROM tab1, tab2 AS cor0, tab0 AS cor1 GROUP BY tab1.col1
----
-47

query I rowsort
SELECT + 1 AS col0 FROM tab2 cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT ALL ( + 56 ) FROM tab0 AS cor0 GROUP BY col1
----
56
56

query I rowsort
SELECT DISTINCT + 49 FROM tab1 GROUP BY tab1.col0
----
49

query I rowsort
SELECT DISTINCT - 60 + + tab0.col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1384
516
6181

query I rowsort
SELECT ALL + + cor0.col0 * 6 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
132
168
492

query I rowsort
SELECT 1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT 42 FROM tab1 AS cor0 GROUP BY cor0.col2
----
42

query I rowsort
SELECT - - cor0.col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - + 10 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
16
33
73

query I rowsort
SELECT DISTINCT cor0.col0 * - 40 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1120
-3280
-880

query I rowsort
SELECT ALL - 75 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-75
-75
-75

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
22
28
82

query I rowsort
SELECT - 74 + - 30 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1424
-2204
-314

query I rowsort
SELECT ALL tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ( - cor0.col1 ) + + 59 * + cor0.col1 + 1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2553
3307
349

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + cor0.col1, 84, cor0.col0 + cor0.col2 ) * - 62 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-2542
-3658
-3782

query I rowsort
SELECT DISTINCT 81 FROM tab0 AS cor0 GROUP BY col2
----
81

query I rowsort
SELECT ALL - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + 44 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT ALL - 0 + - cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col2 AS 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 ALL cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - 87 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-87
-87
-87

query I rowsort
SELECT + 14 * cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
574
826
854

query I rowsort
SELECT ALL + 58 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
58
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT ALL 90 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
90
90
90

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1779
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1779
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT cor0.col1 * + 98 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
4018
5782
5978

query I rowsort
SELECT ALL + 25 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2050
550
700

query I rowsort
SELECT 0 FROM tab1 AS cor0 GROUP BY col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 52 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-52
-52
-52

query I rowsort
SELECT 73 + cor0.col1 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2017
73
73

query I rowsort
SELECT ALL - col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - 61 FROM tab2 GROUP BY tab2.col0
----
-61
-61
-61

query I rowsort
SELECT ALL - col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-118
-122
-82

query I rowsort
SELECT DISTINCT 43 FROM tab2 AS cor0 GROUP BY cor0.col0
----
43

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT - col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT tab2.col2 * tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT - tab1.col1 FROM tab1, tab2 cor0 GROUP BY tab1.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT - cor0.col0 FROM tab2, tab2 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL 45 FROM tab0 AS cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT cor0.col2 + - 96 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-25
-51
-88

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
22
28
82

query I rowsort
SELECT ALL - 57 FROM tab1 GROUP BY col1
----
-57
-57
-57

query I rowsort
SELECT + 31 * + 34 FROM tab2 GROUP BY tab2.col2
----
1054
1054
1054

query I rowsort
SELECT + 39 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
39
39
39

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1806
SELECT - CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1806
SELECT - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 50 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
50

query I rowsort
SELECT 16 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0
81

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
164
44
56

query I rowsort
SELECT ALL - 17 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-17
-17
-17

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 * 44 FROM tab2 cor0 GROUP BY cor0.col2
----
148016
274604
333036

query I rowsort
SELECT - 44 AS col2 FROM tab0 GROUP BY tab0.col0
----
-44
-44
-44

query I rowsort
SELECT DISTINCT + col2 + - cor0.col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1482
600
6320

query I rowsort
SELECT - col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 34 FROM tab2 AS cor0 GROUP BY cor0.col1
----
34

query I rowsort
SELECT + 25 + + col1 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
31
69
82

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
44
57
6

query I rowsort
SELECT cor1.col1 AS col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor0.col0
----
0
0
0
81
81
81

query I rowsort
SELECT ALL + 52 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
52
52
52

query I rowsort
SELECT - cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT cor0.col2 - - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2, cor0.col1
----
142
16
90

query I rowsort
SELECT + 16 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
16
16

query I rowsort
SELECT tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
0
81

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 + col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
44
57
6

query I rowsort
SELECT 50 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4050

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1828
SELECT ALL CAST( NULL AS SIGNED ) col0 FROM tab1 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-1828
SELECT ALL CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 22 * 73 + + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1606
1687

query I rowsort
SELECT ALL 92 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
92
92
92

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1831
SELECT ALL NULLIF ( cor0.col1, + CAST( 90 AS DECIMAL ) ) FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-1831
SELECT ALL NULLIF ( cor0.col1, + CAST ( 90 AS REAL ) ) FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 15 FROM tab0 AS cor0 GROUP BY cor0.col2
----
15

query I rowsort
SELECT DISTINCT 78 FROM tab2, tab2 AS cor0, tab0 AS cor1 GROUP BY cor1.col1
----
78

query I rowsort
SELECT - 66 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-66
-66
-66

query I rowsort
SELECT + 92 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT ALL 27 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
27
27
27

query I rowsort
SELECT - 19 FROM tab1, tab0 AS cor0, tab0 AS cor1 GROUP BY cor1.col0
----
-19
-19
-19

query I rowsort
SELECT DISTINCT 29 * cor0.col0 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2460
660
840

query I rowsort
SELECT DISTINCT - 22 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + + 7 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT 38 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
38
38
38

query I rowsort
SELECT ALL 12 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
528
684
72

query I rowsort
SELECT ALL + cor0.col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 17 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
17
17
17

query I rowsort
SELECT ALL 34 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
34
34
34

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1848
SELECT ALL CAST( NULL AS SIGNED ) + + 4 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1848
SELECT ALL CAST ( NULL AS INTEGER ) + + 4 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 78 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
78

query I rowsort
SELECT 96 * - 85 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-473280
-644640
-709920

query I rowsort
SELECT DISTINCT - 19 + - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-100
-19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 54 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
54

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0, cor0.col1
----
0
81

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT 8 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
8
8
8

query I rowsort
SELECT DISTINCT cor0.col2 * 95 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4275
6745
760

query I rowsort
SELECT - 8 + + col0 + + 9 * 51 AS col2 FROM tab0 GROUP BY tab0.col0
----
477
494
534

query I rowsort
SELECT + 10 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
10
10
10

query I rowsort
SELECT ALL 36 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT DISTINCT - 27 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1862
SELECT + col2 * + 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-1862
SELECT + col2 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 15 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
15
15
15

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, col0
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1865
SELECT ALL cor0.col2 * CAST( NULL AS SIGNED ) + + 90 * + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1865
SELECT ALL cor0.col2 * CAST ( NULL AS INTEGER ) + + 90 * + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 * 0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL 27 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
27
27
27

onlyif mysql # DIV for integer division: 
query I rowsort label-1868
SELECT ALL + ( - col2 ) DIV - 3 FROM tab1 AS cor0 GROUP BY cor0.col2
----
15
2
23

skipif mysql # not compatible
query I rowsort label-1868
SELECT ALL + ( - col2 ) / - 3 FROM tab1 AS cor0 GROUP BY cor0.col2
----
15
2
23

query I rowsort
SELECT - cor0.col2 + cor0.col2 + + 40 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1800
-2840
-320

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 38 col1 FROM tab1 AS cor0 GROUP BY col0
----
-38
-38
-38

query I rowsort
SELECT + 57 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 47 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
47
47

query I rowsort
SELECT + 70 * - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-1540
-1960
-5740

query I rowsort
SELECT + cor0.col0 + - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT - cor0.col0 - ( cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-126
-28
-85

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1878
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1878
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT 53 FROM tab0 cor0 GROUP BY cor0.col1
----
53
53

query I rowsort
SELECT + cor0.col1 * 34 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2754

query I rowsort
SELECT - 35 + 64 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
29
29
29

query I rowsort
SELECT + cor0.col1 * + col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1980
3306
42

query I rowsort
SELECT + ( cor0.col1 + + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT ALL - col1 * - 45 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1886
2714
2806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT col2 + cor0.col2 * cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
2070
5112
72

query I rowsort
SELECT ALL - 74 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-74
-74
-74

query I rowsort
SELECT ALL 9 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT ALL - col0 + + 18 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-73
-74
3

onlyif mysql # DIV for integer division: 
query I rowsort label-1890
SELECT cor0.col0 DIV ( - cor0.col2 ) + col2 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1031
2054
3152

skipif mysql # not compatible
query I rowsort label-1890
SELECT cor0.col0 / ( - cor0.col2 ) + col2 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1031
2054
3152

query I rowsort
SELECT ALL - cor0.col2 + + cor0.col2 * cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
1406
552
6162

query I rowsort
SELECT + 70 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1540
1960
5740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 - - cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT ALL - + ( + 63 ) * + col2 - + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2880
-4544
-512

query I rowsort
SELECT cor0.col1 + 9 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
15
53
66

query I rowsort
SELECT ALL - 81 FROM tab1 AS cor0 GROUP BY col1
----
-81
-81
-81

query I rowsort
SELECT ALL 8 FROM tab1 AS cor0 GROUP BY col1
----
8
8
8

query I rowsort
SELECT cor0.col2 * 23 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1035
1633
184

query I rowsort
SELECT DISTINCT 28 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
28

query I rowsort
SELECT ( 57 ) AS col2 FROM tab0 cor0 GROUP BY col0
----
57
57
57

query I rowsort
SELECT ALL - col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT 63 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
63

query I rowsort
SELECT ALL + 91 AS col2 FROM tab2 GROUP BY tab2.col0
----
91
91
91

query I rowsort
SELECT ALL - cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + 67 FROM tab2, tab1 cor0 GROUP BY cor0.col0
----
67
67
67

query I rowsort
SELECT 89 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT ALL + 35 * + 15 AS col2 FROM tab0 GROUP BY tab0.col1
----
525
525

query I rowsort
SELECT DISTINCT - + ( + 29 ) FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
-29

query I rowsort
SELECT - 22 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-22
-22
-22

query I rowsort
SELECT ALL - 22 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-22
-22

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT - col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT ALL + NULLIF ( cor0.col0, cor0.col2 ) / + CASE + 80 WHEN - 66 THEN - col0 END FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
NULL
NULL
NULL

query I rowsort
SELECT NULLIF ( 22, cor0.col0 ) * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1298
1342
902

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col0 + cor0.col0 - + 42 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1232
3608
968

query I rowsort
SELECT + ( 15 ) - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-13
-67
-7

query I rowsort
SELECT + 23 * + 10 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
230
230
230

query I rowsort
SELECT - cor0.col0 + cor0.col0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
462
6642
756

query I rowsort
SELECT cor0.col1 + - 17 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-17
64

query I rowsort
SELECT + + ( + tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * 49 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2009
2891
2989

query I rowsort
SELECT ALL - 8 FROM tab0 GROUP BY col2
----
-8
-8
-8

query I rowsort
SELECT + 69 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
69
69
69

query I rowsort
SELECT ALL + col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 61 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
61

query I rowsort
SELECT DISTINCT + col2 * 39 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
1482
3081
936

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL + 26 FROM tab2 cor0 GROUP BY cor0.col0
----
26
26
26

onlyif mysql # DIV for integer division: 
query I rowsort label-1931
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-1931
SELECT + cor0.col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 88 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-88
-88
-88

query I rowsort
SELECT + NULLIF ( - cor0.col2, + cor0.col2 ) * - 9 + col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
580
790
870

query I rowsort
SELECT + col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-1936
SELECT cor0.col1 * 51 DIV cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
31
38
64

skipif mysql # not compatible
query I rowsort label-1936
SELECT cor0.col1 * 51 / cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
31
38
64

query I rowsort
SELECT tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT 76 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
76
76
76

query I rowsort
SELECT DISTINCT + 61 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
61

query I rowsort
SELECT ALL - COALESCE ( col0, + cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 95 FROM tab1 cor0 GROUP BY col0
----
95
95
95

query I rowsort
SELECT NULLIF ( cor0.col0 * + 54, + cor0.col0 ) FROM tab1 AS cor0 GROUP BY col0
----
1188
1512
4428

query I rowsort
SELECT ALL 20 FROM tab0 AS cor0 GROUP BY cor0.col0
----
20
20
20

query I rowsort
SELECT + - col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT - 66 FROM tab1 GROUP BY tab1.col0
----
-66
-66
-66

query I rowsort
SELECT col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT - 36 FROM tab0 cor0 GROUP BY cor0.col0
----
-36
-36
-36

query I rowsort
SELECT DISTINCT 24 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
103
48
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1951
SELECT DISTINCT 69 * cor0.col0 DIV col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
69

skipif mysql # not compatible
query I rowsort label-1951
SELECT DISTINCT 69 * cor0.col0 / col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
69

query I rowsort
SELECT col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
26
43
83

query I rowsort
SELECT ALL - 97 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-97
-97
-97

query I rowsort
SELECT ALL - 61 FROM tab0 GROUP BY col1
----
-61
-61

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT - 54 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
-54
-54
-54

query I rowsort
SELECT DISTINCT - col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0

query I rowsort
SELECT DISTINCT - 6 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-6

query I rowsort
SELECT 89 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
89
89

query I rowsort
SELECT DISTINCT 37 FROM tab1 AS cor0 GROUP BY cor0.col1
----
37

query I rowsort
SELECT + - 59 FROM tab0 GROUP BY col0
----
-59
-59
-59

query I rowsort
SELECT ALL ( - 32 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-32
-32
-32

query I rowsort
SELECT ALL 35 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
35
35
35

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - + COALESCE ( + 64, + col2 ) + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-21
-38
19

query I rowsort
SELECT DISTINCT - + 36 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
-36

query I rowsort
SELECT DISTINCT + 59 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
59

query I rowsort
SELECT ALL - 80 * cor0.col2 + - cor0.col2 * 52 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-10428
-11484
-7656

query I rowsort
SELECT DISTINCT - 49 FROM tab0 GROUP BY tab0.col1
----
-49

query I rowsort
SELECT + 66 * + 68 FROM tab0, tab1 AS cor0, tab2 AS cor1 GROUP BY tab0.col1
----
4488
4488

query I rowsort
SELECT ALL - - 88 AS col1 FROM tab1, tab0 cor0 GROUP BY cor0.col1
----
88
88

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2, tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 8 FROM tab1 AS cor0 GROUP BY cor0.col0
----
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 22 col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
22
22

query I rowsort
SELECT + 23 + + 83 FROM tab2 GROUP BY col0
----
106
106
106

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - cor0.col2 - - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT - 99 FROM tab2 cor0 GROUP BY cor0.col0
----
-99
-99
-99

query I rowsort
SELECT ALL cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT - 47 * - 95 FROM tab1 AS cor0 GROUP BY cor0.col0
----
4465
4465
4465

query I rowsort
SELECT ALL col1 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT cor0.col0 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 17 FROM tab0 AS cor0 GROUP BY col2, col1
----
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 46 col1 FROM tab0 cor0 GROUP BY cor0.col0
----
46
46
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 57 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab1.col0 - + 48 * - 97 col0 FROM tab1 GROUP BY col0
----
4574
4628
4634

query I rowsort
SELECT + tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
81

query I rowsort
SELECT cor0.col2 + + 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 ( + tab2.col0 ) col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL - 38 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-38
-38
-38

query I rowsort
SELECT - 73 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-73
-73
-73

query I rowsort
SELECT ALL cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT ALL - cor0.col0 * 10 FROM tab2 cor0 GROUP BY col0
----
-150
-910
-920

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT 39 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
39
39
39

query I rowsort
SELECT + 27 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - cor0.col1 ) + - cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-162
0

query I rowsort
SELECT 71 FROM tab2 AS cor0 GROUP BY cor0.col1
----
71
71
71

query I rowsort
SELECT DISTINCT 76 * cor0.col2 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
1824
2888
6004

query I rowsort
SELECT 16 AS col2
----
16

onlyif mysql # DIV for integer division: 
query I rowsort label-2005
SELECT cor0.col2 DIV - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2005
SELECT cor0.col2 / - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-2006
SELECT - 59 DIV cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2006
SELECT - 59 / cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-1
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2007
SELECT col2 DIV - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2007
SELECT col2 / - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-2008
SELECT cor0.col2 DIV cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2008
SELECT cor0.col2 / cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-2009
SELECT ALL - cor0.col2 DIV - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2009
SELECT ALL - cor0.col2 / - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-2010
SELECT + cor0.col0 DIV cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2010
SELECT + cor0.col0 / cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-2011
SELECT 0 + - 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-2011
SELECT 0 + - cor0.col2 / + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-2013
SELECT ALL - cor0.col1 DIV cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2013
SELECT ALL - cor0.col1 / cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2014
SELECT - cor0.col2 DIV + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2014
SELECT - cor0.col2 / + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-2015
SELECT DISTINCT ( cor0.col2 ) DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-2015
SELECT DISTINCT ( cor0.col2 ) / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

onlyif mysql # DIV for integer division: 
query I rowsort label-2016
SELECT col2 * + cor0.col2 DIV cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
58
79
87

skipif mysql # not compatible
query I rowsort label-2016
SELECT col2 * + cor0.col2 / cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
58
79
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2017
SELECT + - cor0.col0 * + CAST( NULL AS SIGNED ) FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2017
SELECT + - cor0.col0 * + CAST ( NULL AS INTEGER ) FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-2018
SELECT + 32 DIV cor0.col2 - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

skipif mysql # not compatible
query I rowsort label-2018
SELECT + 32 / cor0.col2 - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT 69 * cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
5589

query I rowsort
SELECT DISTINCT - 90 FROM tab1 AS cor0 GROUP BY col1
----
-90

onlyif mysql # DIV for integer division: 
query I rowsort label-2021
SELECT ALL - cor0.col2 DIV + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2021
SELECT ALL - cor0.col2 / + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL col0 - - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
166
52
86

query I rowsort
SELECT ALL cor0.col1 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
124
26
83

onlyif mysql # DIV for integer division: 
query I rowsort label-2024
SELECT DISTINCT cor0.col2 + - 88 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
57
78
86

skipif mysql # not compatible
query I rowsort label-2024
SELECT DISTINCT cor0.col2 + - 88 / cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
57
78
86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2025
SELECT + + CAST( NULL AS SIGNED ) * 11 FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2025
SELECT + + CAST ( NULL AS INTEGER ) * 11 FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-2027
SELECT ALL - tab2.col2 DIV tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2027
SELECT ALL - tab2.col2 / tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-2028
SELECT DISTINCT cor0.col2 DIV col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-2028
SELECT DISTINCT cor0.col2 / col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

onlyif mysql # DIV for integer division: 
query I rowsort label-2029
SELECT ALL 70 - col2 DIV col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
69
69
69

skipif mysql # not compatible
query I rowsort label-2029
SELECT ALL 70 - col2 / col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
69
69
69

query I rowsort
SELECT ALL + 31 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
31
31
31

onlyif mysql # DIV for integer division: 
query I rowsort label-2031
SELECT + 23 + tab2.col2 DIV - col2 FROM tab2 GROUP BY col2
----
22
22
22

skipif mysql # not compatible
query I rowsort label-2031
SELECT + 23 + tab2.col2 / - col2 FROM tab2 GROUP BY col2
----
22
22
22

onlyif mysql # DIV for integer division: 
query I rowsort label-2032
SELECT 77 DIV + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2032
SELECT 77 / + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
1

query I rowsort
SELECT DISTINCT 50 FROM tab1 AS cor0 GROUP BY col0
----
50

onlyif mysql # DIV for integer division: 
query I rowsort label-2034
SELECT tab2.col2 DIV tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2034
SELECT tab2.col2 / tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2035
SELECT DISTINCT - CAST( + col1 AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

skipif mysql # not compatible
query I rowsort label-2035
SELECT DISTINCT - CAST ( + col1 AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-2036
SELECT tab2.col2 + - tab2.col2 DIV + tab2.col2 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
57
78
86

skipif mysql # not compatible
query I rowsort label-2036
SELECT tab2.col2 + - tab2.col2 / + tab2.col2 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
57
78
86

query I rowsort
SELECT DISTINCT ( 12 ) FROM tab0 AS cor0 GROUP BY col0
----
12

query I rowsort
SELECT + + col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL + + 99 AS col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
99
99
99

query I rowsort
SELECT + 99 * ( - cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-4059
-5841
-6039

query I rowsort
SELECT + ( + 78 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
78
78
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL ( cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + + 53 FROM tab2, tab1 AS cor0, tab0 cor1 GROUP BY cor0.col1
----
53
53
53

query I rowsort
SELECT - + cor0.col2 AS col0 FROM tab1, tab2 cor0, tab2 AS cor1 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT - 91 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-91
-91
-91

query I rowsort
SELECT + cor0.col1 + - 94 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-37
-50
-88

query I rowsort
SELECT DISTINCT 76 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
76

query I rowsort
SELECT + - cor0.col1 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col0 * col0 - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1806
650
6806

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-2053
SELECT - 14 DIV 12 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2053
SELECT - 14 / 12 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-2054
SELECT ALL - cor0.col1 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-2054
SELECT ALL - cor0.col1 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-2
0
0

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 + + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-1406
-552
-6162

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
3364
6241
7569

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2057
SELECT - CAST( + 2 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-2057
SELECT - CAST ( + 2 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2
-2
-2

onlyif mysql # DIV for integer division: 
query I rowsort label-2058
SELECT ALL 27 DIV + 49 + - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-41
-59
-61

skipif mysql # not compatible
query I rowsort label-2058
SELECT ALL 27 / + 49 + - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT + col1 * + 26 + - cor0.col2 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
204
4047
4268

query I rowsort
SELECT DISTINCT cor0.col2 + + 30 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
101
38
75

query I rowsort
SELECT ALL tab0.col1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-16
-38
29

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col1 + - 30 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-30
51

query I rowsort
SELECT DISTINCT cor0.col1 * col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
1596
3608

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 - cor0.col1 AS col0 FROM tab0, tab2 AS cor0, tab0 cor1 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT 95 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT DISTINCT - 1 AS col2 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
-1

query I rowsort
SELECT + col0 * + 66 FROM tab0 GROUP BY tab0.col0
----
1716
2838
5478

query I rowsort
SELECT + 95 AS col0 FROM tab0, tab2 cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT ( + 7 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
7
7

query I rowsort
SELECT ALL - 29 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0
----
-29
-29
-29

query I rowsort
SELECT 2 FROM tab0, tab2 cor0 GROUP BY cor0.col0
----
2
2
2

query I rowsort
SELECT - 34 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2754
0

query I rowsort
SELECT - 13 FROM tab1 GROUP BY tab1.col0
----
-13
-13
-13

onlyif mysql # DIV for integer division: 
query I rowsort label-2077
SELECT - 49 DIV + 48 + + cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
25
42
82

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2077
SELECT - 49 / + 48 + + cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
25
42
82

query I rowsort
SELECT DISTINCT 71 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
116
142
79

query I rowsort
SELECT - 38 * + cor0.col1 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor0.col1
----
-3078
0

query I rowsort
SELECT ALL 59 * 5 + cor0.col0 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
310
386
387

query I rowsort
SELECT - - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL - 20 AS col1 FROM tab1 GROUP BY tab1.col2
----
-20
-20
-20

query I rowsort
SELECT ALL - + 78 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-78
-78
-78

onlyif mysql # DIV for integer division: 
query I rowsort label-2084
SELECT cor0.col1 DIV 9 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
-37
-53
-55

skipif mysql # not compatible
query I rowsort label-2084
SELECT cor0.col1 / 9 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
-37
-53
-55

query I rowsort
SELECT DISTINCT 9 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
9

query I rowsort
SELECT 66 * - 61 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-4026
-4026
-4026

query I rowsort
SELECT ALL cor0.col1 * + cor0.col2 + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
1968
38
79

query I rowsort
SELECT - cor0.col1 - - 99 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-4100
-5900
-6100

query I rowsort
SELECT DISTINCT + - col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT - - cor0.col2 FROM tab0, tab0 AS 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 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT + 3 FROM tab2, tab1 AS cor0 GROUP BY tab2.col0
----
3
3
3

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 55, - tab0.col2 + + tab0.col2 ) FROM tab0 GROUP BY tab0.col1
----
55
55

query I rowsort
SELECT + 5 + + 69 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
74
74
74

query I rowsort
SELECT - tab2.col0 + tab2.col0 FROM tab2 WHERE + tab2.col2 IS NOT NULL GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL + ( cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
22
28
82

query I rowsort
SELECT + + 90 AS col0 FROM tab2 GROUP BY col2
----
90
90
90

query I rowsort
SELECT + COALESCE ( - 54, col1 ) + col1 FROM tab1 AS cor0 GROUP BY col1
----
-10
-48
3

query I rowsort
SELECT cor0.col2 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
105
38
79

query I rowsort
SELECT + NULLIF ( 40, - cor0.col1 / + 36 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
40
40

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col1 + 96 AS col2 FROM tab0 AS cor0 GROUP BY col1, col2
----
-1848
96

query I rowsort
SELECT ALL 23 * tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
1886
506
644

query I rowsort
SELECT DISTINCT - 78 AS col1 FROM tab1 GROUP BY tab1.col2
----
-78

query I rowsort
SELECT cor0.col1 + + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
133
150
76

query I rowsort
SELECT + cor0.col1 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT + cor0.col2 FROM tab1, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( + 57, + cor0.col2 * cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-57
-57

query I rowsort
SELECT ALL cor0.col2 * + cor0.col1 + 4 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
2382
4665
5311

onlyif mysql # DIV for integer division: 
query I rowsort label-2109
SELECT - cor0.col0 - + cor0.col0 DIV 14 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-16
-97
-98

skipif mysql # not compatible
query I rowsort label-2109
SELECT - cor0.col0 - + cor0.col0 / 14 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-16
-97
-98

query I rowsort
SELECT + 71 + + cor0.col1 * - ( + 93 + 96 ) FROM tab1, tab1 cor0 GROUP BY cor0.col1
----
-1063
-10702
-8245

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 0 col0 FROM tab2, tab1 cor0 GROUP BY tab2.col1
----
0

query I rowsort
SELECT DISTINCT - cor0.col0 * - ( 99 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2574
4257
8217

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT COALESCE ( - 26, - col2 * cor0.col0 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-26

query I rowsort
SELECT ALL + 93 * cor0.col1 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7614

query I rowsort
SELECT 99 * - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-2178
-2772
-8118

query I rowsort
SELECT DISTINCT - cor0.col0 - - col0 FROM tab1 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT - 97 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1455
-8827
-8924

query I rowsort
SELECT ALL + - 91 AS col1 FROM tab0 GROUP BY tab0.col1
----
-91
-91

query I rowsort
SELECT DISTINCT 44 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
44

query I rowsort
SELECT + 82 FROM tab0, tab1 cor0 GROUP BY cor0.col1
----
82
82
82

query I rowsort
SELECT - 78 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-78
-78
-78

query I rowsort
SELECT DISTINCT ( cor0.col0 ) * - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL - 77 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-77
-77
-77

onlyif mysql # DIV for integer division: 
query I rowsort label-2124
SELECT DISTINCT cor0.col1 DIV - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-2124
SELECT DISTINCT cor0.col1 / - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-1

query I rowsort
SELECT ALL + ( + tab1.col2 ) FROM tab1, tab1 AS cor0 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL + 17 + - col1 * - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1698
3498
3738

query I rowsort
SELECT ALL 65 AS col0 FROM tab2 cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT ALL + cor1.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
24
38
79

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 + 63 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
63
63
63

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - 27 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1, cor1.col0
----
-27
-27
-27

query I rowsort
SELECT DISTINCT 61 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col0
----
61

query I rowsort
SELECT ALL cor1.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT ALL cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col2
----
9 values hashing to ec1f9c518baf89f5f85dda11171d4494

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1, cor0.col2
----
24
24
38
38
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 87 col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
87
87
87

query I rowsort
SELECT cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + 23 + - 92 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
-69

query I rowsort
SELECT 98 AS col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col1
----
98
98
98

query I rowsort
SELECT DISTINCT - cor1.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - 75 * cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor0.col2
----
-1950
-3225
-6225

query I rowsort
SELECT DISTINCT 43 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
43

query I rowsort
SELECT - 77 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-77
-77
-77

query I rowsort
SELECT ALL + cor1.col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor1.col0 * - 66 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-6006
-6072
-990

query I rowsort
SELECT - 55 * cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-1430
-2365
-4565

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0 HAVING NOT ( NULL ) <> NULL
----

query I rowsort
SELECT + 88 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col2
----
88
88
88

query I rowsort
SELECT 35 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
35
35
35

query I rowsort
SELECT + ( 90 ) FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1, cor1.col0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT DISTINCT + cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor1.col2
----
24
38
79

query I rowsort
SELECT ALL 99 * + 22 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
2178
2178

query I rowsort
SELECT cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor0.col2
----
1305
5336
7189

query I rowsort
SELECT ALL 7 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
182
301
581

query I rowsort
SELECT ALL + 4 AS col1 FROM tab1 GROUP BY col2
----
4
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + tab2.col2 ) col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT - - tab1.col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL + 14 FROM tab0 GROUP BY tab0.col2
----
14
14
14

query I rowsort
SELECT DISTINCT 87 FROM tab1 GROUP BY col0
----
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 - tab1.col1 col2 FROM tab1 GROUP BY col1
----
-114
-12
-88

query I rowsort
SELECT DISTINCT 25 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
25

query I rowsort
SELECT col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

onlyif mysql # DIV for integer division: 
query I rowsort label-2170
SELECT col2 DIV col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2170
SELECT col2 / col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - col2 ) col0 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT 78 FROM tab1 GROUP BY tab1.col1
----
78
78
78

query I rowsort
SELECT + 23 AS col2 FROM tab0 GROUP BY tab0.col0
----
23
23
23

query I rowsort
SELECT ALL - - tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
26
43
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2175
SELECT - + CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2175
SELECT - + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 79 AS col0 FROM tab0 GROUP BY tab0.col2
----
79
79
79

query I rowsort
SELECT - - 43 + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
124
43

query I rowsort
SELECT ALL + tab2.col1 * + tab2.col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2179
SELECT ALL - tab2.col0 - + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2179
SELECT ALL - tab2.col0 - + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
-81
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2181
SELECT DISTINCT + tab0.col0 * - CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-2181
SELECT DISTINCT + tab0.col0 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL

query I rowsort
SELECT ALL + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-2183
SELECT ALL - tab1.col1 DIV 48 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2183
SELECT ALL - tab1.col1 / 48 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1
0
0

query I rowsort
SELECT DISTINCT tab0.col1 + 90 AS col2 FROM tab0 GROUP BY col1
----
171
90

query I rowsort
SELECT + 40 FROM tab0 GROUP BY col0
----
40
40
40

query I rowsort
SELECT - col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + - 28 AS col1 FROM tab0 GROUP BY col2
----
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 44 col1 FROM tab2 GROUP BY col0
----
44
44
44

query I rowsort
SELECT + + 80 FROM tab0 GROUP BY tab0.col1
----
80
80

query I rowsort
SELECT - col1 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT - + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - 69 FROM tab0 GROUP BY tab0.col0
----
-69
-69
-69

query I rowsort
SELECT + - tab0.col2 * col2 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT + + col2 * 23 AS col0 FROM tab2 GROUP BY tab2.col2
----
1334
1817
2001

query I rowsort
SELECT + 7 FROM tab2 GROUP BY tab2.col1
----
7
7
7

query I rowsort
SELECT - 54 AS col0 FROM tab1 GROUP BY col1
----
-54
-54
-54

query I rowsort
SELECT 4 FROM tab1 GROUP BY col0
----
4
4
4

query I rowsort
SELECT DISTINCT - 56 AS col1 FROM tab0 GROUP BY tab0.col2
----
-56

query I rowsort
SELECT ALL 9 FROM tab2 GROUP BY tab2.col2
----
9
9
9

query I rowsort
SELECT DISTINCT - 26 FROM tab0 GROUP BY col2
----
-26

query I rowsort
SELECT DISTINCT - 18 AS col2 FROM tab0 GROUP BY tab0.col0
----
-18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 54 col2 FROM tab0 GROUP BY tab0.col1
----
54
54

query I rowsort
SELECT DISTINCT - - 81 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
81

query I rowsort
SELECT - - tab1.col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT tab0.col1 - + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 51 col2 FROM tab2 GROUP BY tab2.col2
----
51

query I rowsort
SELECT ALL - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 83 col0 FROM tab1 GROUP BY tab1.col0
----
-83
-83
-83

query I rowsort
SELECT + + tab2.col1 + + 45 FROM tab2 GROUP BY tab2.col1
----
104
106
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + 89 FROM tab2 GROUP BY col2
----
89
89
89

query I rowsort
SELECT DISTINCT - tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + tab1.col1 + - col1 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT ALL + - 29 AS col0 FROM tab1 GROUP BY tab1.col2
----
-29
-29
-29

query I rowsort
SELECT DISTINCT + 44 * + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1144
1892
3652

query I rowsort
SELECT - 30 FROM tab2 GROUP BY tab2.col1
----
-30
-30
-30

query I rowsort
SELECT ALL - + col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT 73 FROM tab0 GROUP BY tab0.col1
----
73
73

query I rowsort
SELECT DISTINCT + 62 FROM tab1 GROUP BY tab1.col0
----
62

query I rowsort
SELECT tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - 6 FROM tab1 GROUP BY tab1.col2
----
-6
-6
-6

query I rowsort
SELECT ALL + + 42 FROM tab0 GROUP BY col2
----
42
42
42

query I rowsort
SELECT - + ( - 21 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
21
21
21

query I rowsort
SELECT DISTINCT 56 + - 94 FROM tab2 GROUP BY tab2.col2
----
-38

query I rowsort
SELECT DISTINCT + 77 FROM tab0 GROUP BY col1
----
77

query I rowsort
SELECT ALL + - 90 FROM tab2 GROUP BY col1
----
-90
-90
-90

query I rowsort
SELECT ALL - tab0.col0 * tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT 23 FROM tab1 GROUP BY col0
----
23
23
23

query I rowsort
SELECT + col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL - + tab1.col2 * + 71 AS col1 FROM tab1 GROUP BY col2
----
-3195
-5041
-568

query I rowsort
SELECT DISTINCT - NULLIF ( 35, + 61 ) AS col0 FROM tab0 GROUP BY col2
----
-35

query I rowsort
SELECT - - 29 AS col1 FROM tab0 GROUP BY col2
----
29
29
29

query I rowsort
SELECT - + tab2.col1 * 7 FROM tab2 GROUP BY tab2.col1
----
-287
-413
-427

query I rowsort
SELECT ALL - 26 * col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-2366
-2392
-390

query I rowsort
SELECT + 29 FROM tab1 GROUP BY tab1.col2
----
29
29
29

query I rowsort
SELECT ALL - + 10 FROM tab2 GROUP BY tab2.col2
----
-10
-10
-10

onlyif mysql # DIV for integer division: 
query I rowsort label-2240
SELECT ALL + col1 DIV - col1 AS col0 FROM tab2 GROUP BY col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2240
SELECT ALL + col1 / - col1 AS col0 FROM tab2 GROUP BY col1
----
-1
-1
-1

query I rowsort
SELECT - tab0.col0 FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT tab0.col0 * + tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + 35 AS col0 FROM tab0 GROUP BY tab0.col0
----
35
35
35

query I rowsort
SELECT ALL + col0 AS col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT 87 AS col0 FROM tab0 GROUP BY tab0.col2
----
87
87
87

query I rowsort
SELECT DISTINCT - 63 + 39 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-63
3096

query I rowsort
SELECT - 46 AS col2 FROM tab0 GROUP BY tab0.col1
----
-46
-46

query I rowsort
SELECT + 76 FROM tab2 GROUP BY tab2.col1
----
76
76
76

query I rowsort
SELECT - + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL + 84 FROM tab2 GROUP BY col2
----
84
84
84

query I rowsort
SELECT DISTINCT + + tab0.col2 + 36 * + 67 AS col2 FROM tab0 GROUP BY tab0.col2
----
2436
2450
2491

query I rowsort
SELECT DISTINCT tab1.col2 * - 60 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2700
-4260
-480

query I rowsort
SELECT + cor0.col1 + ( cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
0
0
162

query I rowsort
SELECT ALL cor0.col1 + + col2 * 2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
157
217
235

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2257
SELECT + CAST( NULL AS SIGNED ) / - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2257
SELECT + CAST ( NULL AS INTEGER ) / - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 73 * - col1 AS col2 FROM tab2 GROUP BY col1
----
2993
4307
4453

query I rowsort
SELECT 53 FROM tab2 GROUP BY col1
----
53
53
53

query I rowsort
SELECT + + cor0.col2 * cor0.col2 + - 4 FROM tab1, tab0 cor0 GROUP BY cor0.col2
----
1440
572
6237

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 47, - 49 * cor0.col1, col0 * cor0.col1, + col2 + cor0.col0 * - cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
47
47
47

query I rowsort
SELECT cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL tab2.col1 + 73 AS col1 FROM tab2 GROUP BY col1
----
114
132
134

query I rowsort
SELECT ALL - - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL 90 AS col2 FROM tab2 GROUP BY tab2.col2
----
90
90
90

query I rowsort
SELECT DISTINCT + - 91 AS col1 FROM tab0 GROUP BY tab0.col0
----
-91

query I rowsort
SELECT ALL + + 19 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1501
-456
-722

query I rowsort
SELECT ALL 2 FROM tab0 GROUP BY tab0.col0
----
2
2
2

query I rowsort
SELECT DISTINCT + - 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 - - 7 col2 FROM tab0 GROUP BY col1
----
7
7

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 22, col2 ) FROM tab2 GROUP BY col1
----
-22
-22
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab1.col0 + tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL + 14 AS col1 FROM tab0 GROUP BY tab0.col1
----
14
14

query I rowsort
SELECT ALL - 80 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-42
-56

query I rowsort
SELECT 2 AS col1 FROM tab0 GROUP BY tab0.col2
----
2
2
2

query I rowsort
SELECT ALL + cor0.col0 * + col0 + - 85 * - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
1500
16016
16284

query I rowsort
SELECT - 51 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-51
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 45 col1 FROM tab2 GROUP BY tab2.col1
----
45

query I rowsort
SELECT ALL tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL + 62 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2790
4402
496

query I rowsort
SELECT ALL 21 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
21
21
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 37 + tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
116
124
95

query I rowsort
SELECT DISTINCT - - 4 FROM tab0 GROUP BY col2
----
4

query I rowsort
SELECT DISTINCT - - 40 * + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1640
2360
2440

onlyif mysql # DIV for integer division: 
query I rowsort label-2286
SELECT ALL cor0.col1 DIV ( - 95 * cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2286
SELECT ALL cor0.col1 / ( - 95 * cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - ( cor0.col2 ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + 79 * 93 FROM tab1 GROUP BY tab1.col0
----
7347
7347
7347

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2289
SELECT - CAST( tab0.col0 AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif mysql # not compatible
query I rowsort label-2289
SELECT - CAST ( tab0.col0 AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT 76 AS col0 FROM tab0 GROUP BY tab0.col0
----
76
76
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 32 * + 99 col1 FROM tab1 GROUP BY tab1.col2
----
3168
3168
3168

query I rowsort
SELECT - 93 - tab1.col2 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-29
1932
4948

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor0.col1
----
24
38
79

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2294
SELECT CAST( NULL AS DECIMAL ) * - 11 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2294
SELECT CAST ( NULL AS REAL ) * - 11 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT ALL - 23 * col0 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col2, cor0.col0
----
-1909
-598
-989

query I rowsort
SELECT ALL 66 AS col0 FROM tab0 GROUP BY col2
----
66
66
66

query I rowsort
SELECT ALL - 74 + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-74
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT - 46 * - tab0.col0 FROM tab0 GROUP BY col0
----
1196
1978
3818

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 18 col2 FROM tab0 GROUP BY col1
----
18
18

query I rowsort
SELECT + + 94 AS col0 FROM tab1 GROUP BY col2
----
94
94
94

query I rowsort
SELECT - - 13 * + 4 FROM tab2 GROUP BY tab2.col1
----
52
52
52

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL + - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT + cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT - + cor0.col1 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT 69 FROM tab1 GROUP BY tab1.col1
----
69
69
69

query I rowsort
SELECT DISTINCT + 39 AS col1 FROM tab2 GROUP BY tab2.col2
----
39

query I rowsort
SELECT col0 + tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 65 col2 FROM tab1 GROUP BY tab1.col0
----
65
65
65

query I rowsort
SELECT 40 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
40
40
40

query I rowsort
SELECT DISTINCT NULLIF ( + cor0.col2, + cor0.col2 * col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + tab1.col1 + col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
114
12
88

onlyif mysql # DIV for integer division: 
query I rowsort label-2316
SELECT + tab1.col1 DIV + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2316
SELECT + tab1.col1 / + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT ALL + - 0 AS col2 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT - 72 * + 45 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col1
----
9 values hashing to 55804156d124fe87ccba0e5acdf75b9d

query I rowsort
SELECT + 36 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
36
36

query I rowsort
SELECT 64 + 38 FROM tab0 AS cor0 GROUP BY cor0.col2
----
102
102
102

query I rowsort
SELECT cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor1.col1
----
0
0
81

query I rowsort
SELECT + + tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL + ( 42 ) FROM tab1 GROUP BY tab1.col2
----
42
42
42

query I rowsort
SELECT DISTINCT - 43 AS col0 FROM tab1 GROUP BY tab1.col1
----
-43

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 - cor1.col2 col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor0.col2
----
-21
-29
-8
0
21
29
8

query I rowsort
SELECT - 53 FROM tab2 GROUP BY tab2.col2
----
-53
-53
-53

query I rowsort
SELECT + 80 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
80
80
80

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - CASE - cor0.col1 WHEN COALESCE ( + 63, cor0.col2 * col2 ) + cor0.col1 THEN cor0.col1 END AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT - 40 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-40
-40
-40

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2331
SELECT DISTINCT + + CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2331
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL

query I rowsort
SELECT - ( + 85 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-85
-85
-85

query I rowsort
SELECT DISTINCT 10 AS col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
10

onlyif mysql # DIV for integer division: 
query I rowsort label-2334
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-2334
SELECT ALL - cor0.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 - 53 * - tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
1272
2014
4187

query I rowsort
SELECT DISTINCT + 72 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
72

query I rowsort
SELECT + 60 AS col0 FROM tab0 GROUP BY tab0.col2
----
60
60
60

query I rowsort
SELECT ( + 14 ) * - 92 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1288
-1288

onlyif mysql # DIV for integer division: 
query I rowsort label-2339
SELECT ALL COALESCE ( 57, - col2 DIV col0 + + ( 49 ) * cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
57
57
57

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2339
SELECT ALL COALESCE ( 57, - col2 / col0 + + ( 49 ) * cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
57
57
57

query I rowsort
SELECT cor0.col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT 70 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-11
70

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

query I rowsort
SELECT ALL + 46 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor0.col2
----
46
46
46

query I rowsort
SELECT ALL 54 AS col1 FROM tab2 GROUP BY tab2.col1
----
54
54
54

query I rowsort
SELECT - + 77 AS col2 FROM tab2 GROUP BY col0
----
-77
-77
-77

query I rowsort
SELECT ALL - 98 + cor0.col0 * - 43 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1044
-1302
-3624

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col0 col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-22
-28
-82

query I rowsort
SELECT ( cor0.col2 ) * + col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - 8 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-14
-52
-65

query I rowsort
SELECT - 94 FROM tab2 GROUP BY tab2.col0
----
-94
-94
-94

query I rowsort
SELECT ALL - - 20 AS col0 FROM tab0 GROUP BY tab0.col0
----
20
20
20

query I rowsort
SELECT DISTINCT 87 AS col0 FROM tab0 GROUP BY tab0.col0
----
87

query I rowsort
SELECT ALL + 3 FROM tab2 GROUP BY tab2.col2
----
3
3
3

query I rowsort
SELECT - tab0.col2 * - 43 FROM tab0 GROUP BY col2
----
1032
1634
3397

query I rowsort
SELECT ALL + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-2356
SELECT + cor0.col0 DIV ( 48 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2356
SELECT + cor0.col0 / ( 48 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT DISTINCT - 45 FROM tab0 GROUP BY tab0.col1
----
-45

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT NULLIF ( 13, cor0.col2 * + col2 ) * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
104
585
923

query I rowsort
SELECT 95 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
95
95
95

query I rowsort
SELECT - + 28 AS col2 FROM tab0 GROUP BY tab0.col0
----
-28
-28
-28

query I rowsort
SELECT ALL 47 + - 39 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2215
-3034
-3346

query I rowsort
SELECT DISTINCT 0 FROM tab2 GROUP BY col0
----
0

query I rowsort
SELECT ALL ( + cor0.col2 ) FROM tab1 AS cor0 GROUP BY col2, col1
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 74 + cor0.col2 * - cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1231
-5262
-7115

query I rowsort
SELECT + 67 * col1 FROM tab1 GROUP BY tab1.col1
----
2948
3819
402

query I rowsort
SELECT ALL - + 61 FROM tab0 GROUP BY tab0.col2
----
-61
-61
-61

query I rowsort
SELECT 52 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
52
52
52

query I rowsort
SELECT + - cor0.col2 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT + 90 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT + cor1.col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to 7a3bee88c68cb011ab3d0cb5e0bd7e7c

query I rowsort
SELECT ALL + 20 AS col2 FROM tab0 GROUP BY tab0.col0
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + 50 * 6 col2 FROM tab1 GROUP BY tab1.col0
----
322
328
382

query I rowsort
SELECT DISTINCT - 84 AS col0 FROM tab2 GROUP BY col0
----
-84

query I rowsort
SELECT + tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT cor0.col1 + + 96 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col1
----
9 values hashing to 04ab494256c4092a6ff17acb1c563c46

query I rowsort
SELECT DISTINCT + 50 AS col1 FROM tab1 GROUP BY col1
----
50

query I rowsort
SELECT 45 * 44 FROM tab1 cor0 GROUP BY cor0.col1
----
1980
1980
1980

query I rowsort
SELECT NULLIF ( + 87, cor0.col1 + + 90 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
87
87
87

query I rowsort
SELECT - 48 AS col0 FROM tab2, tab2 AS cor0 GROUP BY tab2.col2
----
-48
-48
-48

query I rowsort
SELECT ALL + ( - 22 ) FROM tab1 GROUP BY tab1.col0
----
-22
-22
-22

query I rowsort
SELECT DISTINCT 24 + - 53 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-29

query I rowsort
SELECT 93 FROM tab0 GROUP BY tab0.col2
----
93
93
93

query I rowsort
SELECT tab0.col1 - - 19 FROM tab0 GROUP BY tab0.col1
----
100
19

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT + 12 FROM tab2 GROUP BY tab2.col0
----
12
12
12

query I rowsort
SELECT DISTINCT + 88 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3608
5192
5368

onlyif mysql # DIV for integer division: 
query I rowsort label-2389
SELECT ALL cor0.col0 DIV + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2389
SELECT ALL cor0.col0 / + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT + col1 - 76 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3075
-4425
-4575

query I rowsort
SELECT ALL cor1.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-2392
SELECT + + 64 DIV col1 + col1 AS col1 FROM tab1 GROUP BY col1
----
16
45
58

skipif mysql # not compatible
query I rowsort label-2392
SELECT + + 64 / col1 + col1 AS col1 FROM tab1 GROUP BY col1
----
16
45
58

query I rowsort
SELECT DISTINCT - cor0.col2 * - 60 FROM tab1 AS cor0 GROUP BY col0, cor0.col1, cor0.col2
----
2700
4260
480

query I rowsort
SELECT + 36 AS col0 FROM tab0 GROUP BY tab0.col1
----
36
36

query I rowsort
SELECT DISTINCT - 75 FROM tab0 GROUP BY col0
----
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 82 col2 FROM tab2 GROUP BY tab2.col2
----
82

query I rowsort
SELECT DISTINCT tab1.col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT 38 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
38

query I rowsort
SELECT - tab2.col0 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT + col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL CASE + cor0.col2 WHEN cor0.col2 + cor0.col2 THEN NULL ELSE cor0.col2 END + - 7 FROM tab1 AS cor0 GROUP BY col2
----
1
38
64

query I rowsort
SELECT DISTINCT - + 1 AS col0 FROM tab2 GROUP BY col1
----
-1

query I rowsort
SELECT + cor0.col1 + + cor0.col1 * - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-1640
-3422
-3660

onlyif mysql # DIV for integer division: 
query I rowsort label-2404
SELECT DISTINCT - cor0.col0 DIV - 73 + COALESCE ( 83, + cor0.col0 + + cor0.col2, cor0.col2 * - cor0.col0 - - cor0.col2 ) FROM tab1 cor0 GROUP BY cor0.col0
----
83
84

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2404
SELECT DISTINCT - cor0.col0 / - 73 + COALESCE ( 83, + cor0.col0 + + cor0.col2, cor0.col2 * - cor0.col0 - - cor0.col2 ) FROM tab1 cor0 GROUP BY cor0.col0
----
83
84

query I rowsort
SELECT ALL - + 9 FROM tab1 GROUP BY tab1.col1
----
-9
-9
-9

query I rowsort
SELECT ALL + - 47 FROM tab0 GROUP BY col0
----
-47
-47
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + cor0.col2 ) col0 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT 91 * 79 AS col1 FROM tab0 GROUP BY tab0.col0
----
7189
7189
7189

query I rowsort
SELECT ALL 12 + - 45 AS col0 FROM tab0 GROUP BY col2
----
-33
-33
-33

query I rowsort
SELECT ALL + - tab2.col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT 6 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
6
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 84 col0 FROM tab2 GROUP BY col2
----
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 46 col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
46
46
46

query I rowsort
SELECT ALL + 41 FROM tab0 GROUP BY tab0.col1
----
41
41

query I rowsort
SELECT DISTINCT 27 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
27

query I rowsort
SELECT DISTINCT + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-2417
SELECT DISTINCT 34 DIV 82 FROM tab1 GROUP BY col1
----
0

skipif mysql # not compatible
query I rowsort label-2417
SELECT DISTINCT 34 / 82 FROM tab1 GROUP BY col1
----
0

query I rowsort
SELECT ALL + 22 FROM tab1 GROUP BY col2
----
22
22
22

query I rowsort
SELECT 93 FROM tab1 GROUP BY tab1.col0
----
93
93
93

query I rowsort
SELECT + 65 FROM tab0 GROUP BY tab0.col0
----
65
65
65

query I rowsort
SELECT + - 7 + 9 FROM tab1 GROUP BY tab1.col0
----
2
2
2

onlyif mysql # DIV for integer division: 
query I rowsort label-2422
SELECT DISTINCT COALESCE ( + 2, cor0.col0 DIV + col0 ) - - 22 AS col1 FROM tab0 cor0 GROUP BY col0
----
24

skipif mysql # not compatible
query I rowsort label-2422
SELECT DISTINCT COALESCE ( + 2, cor0.col0 / + col0 ) - - 22 AS col1 FROM tab0 cor0 GROUP BY col0
----
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * + tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT - 79 AS col1 FROM tab1 GROUP BY tab1.col1
----
-79
-79
-79

query I rowsort
SELECT ALL tab2.col1 * + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT + 67 + + 49 FROM tab2 GROUP BY tab2.col1
----
116

query I rowsort
SELECT ALL 99 AS col0 FROM tab0 GROUP BY tab0.col0
----
99
99
99

query I rowsort
SELECT + 21 FROM tab1 GROUP BY tab1.col0
----
21
21
21

query I rowsort
SELECT - ( col2 ) * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1032
-2054
-3154

query I rowsort
SELECT ( - cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT cor0.col0 * cor0.col0 + - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
1806
650
6806

query I rowsort
SELECT ALL 18 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col2
----
18
18
18

query I rowsort
SELECT - cor0.col2 + + cor0.col1 * + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2520
3053
40

query I rowsort
SELECT + cor0.col0 + 63 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1612
-2666
-5146

query I rowsort
SELECT - ( 42 ) FROM tab1 GROUP BY col2
----
-42
-42
-42

onlyif mysql # DIV for integer division: 
query I rowsort label-2436
SELECT col1 DIV + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2436
SELECT col1 / + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT + tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT + 11 FROM tab0 GROUP BY tab0.col2
----
11

query I rowsort
SELECT ALL 68 AS col0 FROM tab2 GROUP BY tab2.col2
----
68
68
68

onlyif mysql # DIV for integer division: 
query I rowsort label-2440
SELECT DISTINCT cor0.col0 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY col2, col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-2440
SELECT DISTINCT cor0.col0 / cor0.col2 FROM tab0 AS cor0 GROUP BY col2, col0
----
0
1
2

query I rowsort
SELECT cor0.col0 - 5 FROM tab0 AS cor0 GROUP BY cor0.col0
----
21
38
78

query I rowsort
SELECT DISTINCT - 11 * + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-451
-649
-671

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 + + cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
240
8372
8556

query I rowsort
SELECT ALL col1 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-1944
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2445
SELECT COALESCE ( - 66, col1, cor0.col1 ) DIV - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
11

skipif mysql # not compatible
query I rowsort label-2445
SELECT COALESCE ( - 66, col1, cor0.col1 ) / - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
11

onlyif mysql # DIV for integer division: 
query I rowsort label-2446
SELECT - 91 DIV 55 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
25
42
82

skipif mysql # not compatible
query I rowsort label-2446
SELECT - 91 / 55 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
25
42
82

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( - 13, + cor1.col2, - cor1.col2 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-13
-13

query I rowsort
SELECT DISTINCT 45 * 25 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
1125

query I rowsort
SELECT ALL 15 AS col1 FROM tab1 GROUP BY tab1.col1
----
15
15
15

query I rowsort
SELECT ALL - + ( tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT 38 FROM tab0 GROUP BY tab0.col0
----
38
38
38

query I rowsort
SELECT DISTINCT 24 FROM tab2 GROUP BY col1
----
24

query I rowsort
SELECT 88 AS col2 FROM tab2 GROUP BY col0
----
88
88
88

query I rowsort
SELECT ALL - + 35 FROM tab1 GROUP BY tab1.col2
----
-35
-35
-35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 18 col2 FROM tab2 GROUP BY tab2.col1
----
18
18
18

query I rowsort
SELECT ALL 45 * - 31 - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1436
-1454
-1456

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - cor0.col0 ) col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-2458
SELECT DISTINCT cor0.col1 DIV 63 - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor0.col1
----
-26
-42
-83

skipif mysql # not compatible
query I rowsort label-2458
SELECT DISTINCT cor0.col1 / 63 - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor0.col1
----
-26
-42
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-2459
SELECT DISTINCT - tab2.col2 DIV col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-1

skipif mysql # not compatible
query I rowsort label-2459
SELECT DISTINCT - tab2.col2 / col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-1

query I rowsort
SELECT DISTINCT 41 FROM tab0 GROUP BY tab0.col2
----
41

query I rowsort
SELECT 60 * + col0 FROM tab0 GROUP BY tab0.col0
----
1560
2580
4980

onlyif mysql # DIV for integer division: 
query I rowsort label-2462
SELECT tab0.col2 DIV + 56 + 89 FROM tab0 GROUP BY tab0.col2
----
89
89
90

skipif mysql # not compatible
query I rowsort label-2462
SELECT tab0.col2 / + 56 + 89 FROM tab0 GROUP BY tab0.col2
----
89
89
90

query I rowsort
SELECT + 31 + 19 AS col0 FROM tab0 GROUP BY tab0.col2
----
50
50
50

onlyif mysql # DIV for integer division: 
query I rowsort label-2464
SELECT ALL + cor0.col2 DIV 4 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
11
17
2

skipif mysql # not compatible
query I rowsort label-2464
SELECT ALL + cor0.col2 / 4 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
11
17
2

query I rowsort
SELECT 72 AS col1 FROM tab1 cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
72
72
72

query I rowsort
SELECT DISTINCT + 1 AS col2 FROM tab2 GROUP BY col2
----
1

query I rowsort
SELECT DISTINCT tab2.col2 * + col2 AS col2 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT 88 + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
110
116
170

onlyif mysql # DIV for integer division: 
query I rowsort label-2470
SELECT DISTINCT + COALESCE ( + 98, cor0.col2, + cor0.col2 DIV 71 + col1 * - cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
98

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2470
SELECT DISTINCT + COALESCE ( + 98, cor0.col2, + cor0.col2 / 71 + col1 * - cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
98

query I rowsort
SELECT DISTINCT 73 * - cor0.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col1, cor1.col0
----
-1606
-2044
-5986

query I rowsort
SELECT - + col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 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 ) * - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT - 62 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1364
-1736
-5084

query I rowsort
SELECT ( 53 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
53
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col1 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 16 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1456
-1472
-240

query I rowsort
SELECT ALL tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT + col2 + - 22 * - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
1334
1817
2001

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 ALL - cor0.col2 * 48 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2160
-3408
-384

query I rowsort
SELECT DISTINCT col1 * - cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1892
-30
-3192

query I rowsort
SELECT ALL + tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL + tab0.col0 * 58 FROM tab0 GROUP BY col0
----
1508
2494
4814

query I rowsort
SELECT ALL cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT ALL + + 36 FROM tab2 GROUP BY tab2.col0
----
36
36
36

query I rowsort
SELECT + 25 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
25
25
25

query I rowsort
SELECT - cor1.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-24
-38
-79

query I rowsort
SELECT - + col1 AS col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

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 col1 FROM tab0 GROUP BY col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT 82 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT - 64 FROM tab0 GROUP BY tab0.col1
----
-64
-64

query I rowsort
SELECT ALL + - 71 FROM tab2 GROUP BY tab2.col0
----
-71
-71
-71

query I rowsort
SELECT 68 * cor0.col2 - col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3015
4757
536

query I rowsort
SELECT ALL + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT col0 AS col1 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 56 AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-56

query I rowsort
SELECT + - 26 FROM tab2 GROUP BY tab2.col2
----
-26
-26
-26

query I rowsort
SELECT DISTINCT + - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - 20 FROM tab1 GROUP BY tab1.col2
----
-20
-20
-20

query I rowsort
SELECT 25 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT - 94 AS col0 FROM tab1 GROUP BY tab1.col0
----
-94
-94
-94

query I rowsort
SELECT NULLIF ( - 12, + cor0.col0 ) FROM tab1 AS cor0 GROUP BY col0
----
-12
-12
-12

onlyif mysql # DIV for integer division: 
query I rowsort label-2508
SELECT + tab2.col0 DIV - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2508
SELECT + tab2.col0 / - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

query I rowsort
SELECT col1 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT cor0.col0 * 50 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1100
1400
4100

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2511
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2511
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 62 FROM tab1 GROUP BY col0
----
62

query I rowsort
SELECT + ( col0 ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col0 * - 66 FROM tab1 AS cor0 GROUP BY col0
----
-1452
-1848
-5412

query I rowsort
SELECT ALL - 82 FROM tab2 GROUP BY tab2.col2
----
-82
-82
-82

query I rowsort
SELECT ALL 89 FROM tab0 GROUP BY tab0.col2
----
89
89
89

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2517
SELECT + CAST( 30 AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col1
----
30
30
30

skipif mysql # not compatible
query I rowsort label-2517
SELECT + CAST ( 30 AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col1
----
30
30
30

query I rowsort
SELECT ALL + 45 * + 76 FROM tab2 GROUP BY tab2.col0
----
3420
3420
3420

onlyif mysql # DIV for integer division: 
query I rowsort label-2519
SELECT ALL - + ( COALESCE ( - 22, tab1.col0 DIV - ( - 25 ) ) ) col1 FROM tab1 GROUP BY tab1.col0
----
22
22
22

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2519
SELECT ALL - + ( COALESCE ( - 22, tab1.col0 / - ( - 25 ) ) ) col1 FROM tab1 GROUP BY tab1.col0
----
22
22
22

query I rowsort
SELECT ALL + 59 FROM tab0 GROUP BY tab0.col1
----
59
59

query I rowsort
SELECT 23 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
-1
-15
-56

query I rowsort
SELECT ALL - - 91 FROM tab1 GROUP BY tab1.col0
----
91
91
91

query I rowsort
SELECT DISTINCT col0 + col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT + - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - 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 DISTINCT - 60 col0 FROM tab1 GROUP BY tab1.col1
----
-60

query I rowsort
SELECT ALL - 34 * 71 FROM tab0 GROUP BY tab0.col1
----
-2414
-2414

query I rowsort
SELECT - + tab0.col0 * 38 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1634
-3154
-988

query I rowsort
SELECT ALL - + tab2.col1 FROM tab2, tab0 AS cor0 GROUP BY tab2.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + - col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT tab0.col1 + 70 FROM tab0 GROUP BY tab0.col1
----
151
70

query I rowsort
SELECT ALL + 13 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
13
13
13

query I rowsort
SELECT 13 FROM tab1 GROUP BY tab1.col1
----
13
13
13

query I rowsort
SELECT - + tab1.col2 + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL 82 AS col1 FROM tab2 GROUP BY tab2.col0
----
82
82
82

query I rowsort
SELECT - ( - 54 ) FROM tab1 cor0 GROUP BY cor0.col1, col1
----
54
54
54

query I rowsort
SELECT DISTINCT 21 FROM tab1 GROUP BY col2
----
21

query I rowsort
SELECT ALL + 17 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT tab1.col1 * 0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL + 34 FROM tab1 GROUP BY col2
----
34
34
34

query I rowsort
SELECT DISTINCT - 68 AS col1 FROM tab1 GROUP BY tab1.col2
----
-68

query I rowsort
SELECT DISTINCT - + 73 AS col0 FROM tab2 GROUP BY tab2.col2
----
-73

query I rowsort
SELECT + cor0.col1 * 91 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7371

query I rowsort
SELECT - + 81 AS col1 FROM tab0 GROUP BY col2
----
-81
-81
-81

query I rowsort
SELECT 24 FROM tab1 GROUP BY col1
----
24
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 87 + - cor0.col0 * - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1936
6976
763

query I rowsort
SELECT DISTINCT 13 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
13

query I rowsort
SELECT DISTINCT + tab0.col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + NULLIF ( 55, cor0.col1 * cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1, cor0.col0
----
55
55
55

query I rowsort
SELECT ALL 3 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
3
3
3

query I rowsort
SELECT - + tab1.col1 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT + 37 FROM tab2 GROUP BY tab2.col1
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 28 col0 FROM tab1 GROUP BY tab1.col1
----
28
28
28

onlyif mysql # DIV for integer division: 
query I rowsort label-2555
SELECT + cor0.col1 DIV + cor0.col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2555
SELECT + cor0.col1 / + cor0.col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
0
1

query I rowsort
SELECT - 20 FROM tab1 GROUP BY col0
----
-20
-20
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT 34 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1530
2414
272

query I rowsort
SELECT + ( - 93 ) + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-11
-65
-71

onlyif mysql # DIV for integer division: 
query I rowsort label-2560
SELECT DISTINCT cor0.col1 DIV + 47 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-2560
SELECT DISTINCT cor0.col1 / + 47 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
1

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2561
SELECT CAST( NULL AS DECIMAL ) + 30 * 31 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2561
SELECT CAST ( NULL AS REAL ) + 30 * 31 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 74 FROM tab2 GROUP BY tab2.col2
----
-74
-74
-74

query I rowsort
SELECT + - 26 FROM tab1 GROUP BY tab1.col2
----
-26
-26
-26

query I rowsort
SELECT DISTINCT + 72 AS col1 FROM tab1 GROUP BY tab1.col2
----
72

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
1849
676
6889

query I rowsort
SELECT - + tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 72 col0 FROM tab2 GROUP BY tab2.col1
----
-72

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
15
91
92

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 + 6 * cor0.col2 + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
440
537
565

onlyif mysql # DIV for integer division: 
query I rowsort label-2571
SELECT - 42 - + tab0.col1 DIV 15 AS col0 FROM tab0 GROUP BY col1
----
-42
-47

skipif mysql # not compatible
query I rowsort label-2571
SELECT - 42 - + tab0.col1 / 15 AS col0 FROM tab0 GROUP BY col1
----
-42
-47

query I rowsort
SELECT - 38 AS col1 FROM tab2 GROUP BY col2
----
-38
-38
-38

query I rowsort
SELECT + 83 FROM tab2 GROUP BY col2
----
83
83
83

query I rowsort
SELECT + cor0.col2 - - 86 FROM tab2 AS cor0 GROUP BY cor0.col2
----
144
165
173

query I rowsort
SELECT ALL - col2 * + 18 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1044
-1422
-1566

onlyif mysql # DIV for integer division: 
query I rowsort label-2576
SELECT cor0.col2 DIV cor0.col2 - - cor0.col2 FROM tab1 cor0 GROUP BY col2
----
46
72
9

skipif mysql # not compatible
query I rowsort label-2576
SELECT cor0.col2 / cor0.col2 - - cor0.col2 FROM tab1 cor0 GROUP BY col2
----
46
72
9

query I rowsort
SELECT 45 AS col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor0.col1
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

query I rowsort
SELECT - 92 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor1.col2
----
-92
-92
-92
-92
-92
-92

query I rowsort
SELECT DISTINCT + 38 FROM tab0 GROUP BY tab0.col2
----
38

query I rowsort
SELECT DISTINCT ( 50 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
50

query I rowsort
SELECT + 8 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
8
8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT 46 * cor1.col0 - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
4095
4140
675

query I rowsort
SELECT 58 AS col1 FROM tab1 GROUP BY col0
----
58
58
58

query I rowsort
SELECT - + 79 FROM tab1 GROUP BY col2
----
-79
-79
-79

query I rowsort
SELECT ALL 46 * cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
4186
4232
690

query I rowsort
SELECT - + 21 FROM tab1 GROUP BY tab1.col2
----
-21
-21
-21

query I rowsort
SELECT 14 + - tab2.col1 * - 90 AS col2 FROM tab2 GROUP BY tab2.col1
----
3704
5324
5504

query I rowsort
SELECT - ( 28 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-28
-28
-28

query I rowsort
SELECT DISTINCT - 22 * - cor0.col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
1254
132
968

query I rowsort
SELECT ALL + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - ( 79 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
-79

query I rowsort
SELECT + 41 AS col0 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
41
41
41

query I rowsort
SELECT DISTINCT - + 42 * 36 AS col0 FROM tab0, tab0 cor0 GROUP BY cor0.col0
----
-1512

query I rowsort
SELECT 24 - - cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
105
24

query I rowsort
SELECT DISTINCT + - 27 AS col0 FROM tab1 GROUP BY tab1.col2
----
-27

onlyif mysql # DIV for integer division: 
query I rowsort label-2597
SELECT ALL ( - cor0.col1 ) DIV - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-2597
SELECT ALL ( - cor0.col1 ) / - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
3

query I rowsort
SELECT cor0.col0 * 72 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1080
6552
6624

query I rowsort
SELECT - 10 FROM tab0 GROUP BY col2
----
-10
-10
-10

query I rowsort
SELECT - - 74 FROM tab0 GROUP BY tab0.col0
----
74
74
74

query I rowsort
SELECT - - 72 AS col0 FROM tab1 GROUP BY tab1.col2
----
72
72
72

query I rowsort
SELECT + + col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 36 * - cor0.col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
1548
2988
936

query I rowsort
SELECT ALL tab2.col0 * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT + - 14 AS col1 FROM tab1 GROUP BY tab1.col0
----
-14
-14
-14

query I rowsort
SELECT ALL - col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - 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 - tab2.col1 + tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + tab1.col0 - 13 FROM tab1 GROUP BY col0
----
15
69
9

query I rowsort
SELECT DISTINCT + 26 * + 75 AS col0 FROM tab0 GROUP BY tab0.col1
----
1950

query I rowsort
SELECT - - 7 AS col2 FROM tab0 GROUP BY tab0.col1
----
7
7

query I rowsort
SELECT DISTINCT 65 AS col0 FROM tab0 GROUP BY tab0.col0
----
65

query I rowsort
SELECT + 20 * - 35 FROM tab0 GROUP BY tab0.col0
----
-700
-700
-700

query I rowsort
SELECT DISTINCT + 3 AS col2 FROM tab0 GROUP BY col0
----
3

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( + 75, - cor0.col2 + - cor0.col0, + cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
75

query I rowsort
SELECT - 65 * 90 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-5850
-5850
-5850

query I rowsort
SELECT ALL cor0.col2 - - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col1 * 80 col1 FROM tab1 GROUP BY tab1.col1
----
3520
4560
480

query I rowsort
SELECT DISTINCT 64 FROM tab2 GROUP BY tab2.col0
----
64

query I rowsort
SELECT DISTINCT + - 81 AS col2 FROM tab0 GROUP BY tab0.col0
----
-81

query I rowsort
SELECT + - 80 + + tab2.col0 FROM tab2 GROUP BY col0
----
-65
11
12

query I rowsort
SELECT DISTINCT tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 96 FROM tab2 GROUP BY col2
----
96

query I rowsort
SELECT ALL - 12 * 74 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-888
-888

query I rowsort
SELECT ALL - + 87 FROM tab0 GROUP BY tab0.col1
----
-87
-87

query I rowsort
SELECT ALL 7 FROM tab0 GROUP BY tab0.col2
----
7
7
7

query I rowsort
SELECT - 77 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col1
----
-77
-77
-77

query I rowsort
SELECT ALL - col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL + col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL - + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - 31 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-31
-31

query I rowsort
SELECT + + 13 FROM tab2 GROUP BY col0
----
13
13
13

query I rowsort
SELECT 70 FROM tab1 GROUP BY tab1.col1
----
70
70
70

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 - tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT 29 * col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
1305
2059
232

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - 15 + + col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
13
67
7

query I rowsort
SELECT ALL - NULLIF ( + cor0.col1, cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-2640
SELECT DISTINCT - 9 DIV + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0

skipif mysql # not compatible
query I rowsort label-2640
SELECT DISTINCT - 9 / + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + NULLIF ( - 40, cor0.col0 ) AS col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-40
-40
-40

query I rowsort
SELECT DISTINCT + 72 FROM tab2 GROUP BY col2
----
72

query I rowsort
SELECT ALL - col0 * - col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT 67 FROM tab1 GROUP BY tab1.col1
----
67
67
67

query I rowsort
SELECT cor0.col0 * CASE cor0.col2 * cor0.col2 WHEN cor0.col2 THEN NULL WHEN - 31 THEN NULL ELSE + cor0.col2 END AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
1032
2054
3154

query I rowsort
SELECT + 33 + + 82 FROM tab2 GROUP BY tab2.col1
----
115
115
115

query I rowsort
SELECT ALL + 10 AS col0 FROM tab2 GROUP BY tab2.col1
----
10
10
10

query I rowsort
SELECT 49 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, col1
----
2842
3871
4263

query I rowsort
SELECT - 94 * + 34 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-3211
-3287
-3288

query I rowsort
SELECT + col0 + + 83 * + tab0.col0 FROM tab0 GROUP BY col0
----
2184
3612
6972

query I rowsort
SELECT + cor0.col0 + cor0.col0 * 19 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
1660
520
860

query I rowsort
SELECT DISTINCT + 78 FROM tab0 GROUP BY tab0.col0
----
78

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 + 50 AS col1 FROM tab1 GROUP BY tab1.col0
----
50
50
50

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2656
SELECT DISTINCT + CAST( 46 AS SIGNED ) AS col1 FROM tab1 GROUP BY col0
----
46

skipif mysql # not compatible
query I rowsort label-2656
SELECT DISTINCT + CAST ( 46 AS INTEGER ) AS col1 FROM tab1 GROUP BY col0
----
46

query I rowsort
SELECT DISTINCT 85 + col1 FROM tab2 GROUP BY col1
----
126
144
146

onlyif mysql # DIV for integer division: 
query I rowsort label-2658
SELECT DISTINCT - 95 DIV + 18 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-5

skipif mysql # not compatible
query I rowsort label-2658
SELECT DISTINCT - 95 / + 18 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-5

query I rowsort
SELECT ALL 87 FROM tab2 GROUP BY tab2.col1
----
87
87
87

query I rowsort
SELECT DISTINCT - tab1.col0 * - 52 FROM tab1 GROUP BY tab1.col0
----
1144
1456
4264

query I rowsort
SELECT DISTINCT - tab0.col1 + 73 AS col1 FROM tab0 GROUP BY col1
----
-8
73

query I rowsort
SELECT - 28 AS col2 FROM tab0 GROUP BY tab0.col0
----
-28
-28
-28

query I rowsort
SELECT ALL - 2 FROM tab0 GROUP BY tab0.col0
----
-2
-2
-2

query I rowsort
SELECT + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-2665
SELECT + cor0.col1 DIV - 66 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2665
SELECT + cor0.col1 / - 66 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL 25 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
25
25
25

query I rowsort
SELECT ALL + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT - - 85 AS col2 FROM tab1 GROUP BY tab1.col0
----
85
85
85

query I rowsort
SELECT ALL + - tab0.col2 + + 2 FROM tab0 GROUP BY tab0.col2
----
-22
-36
-77

query I rowsort
SELECT ALL + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + NULLIF ( - 74, - cor0.col2 + - col2 * 83 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-74

query I rowsort
SELECT + + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 8 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
8

query I rowsort
SELECT ALL + 24 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
24
24
24

onlyif mysql # DIV for integer division: 
query I rowsort label-2675
SELECT ALL - 61 DIV + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-2675
SELECT ALL - 61 / + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-4
0
0

query I rowsort
SELECT - 2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-2
-2
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 col2 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL + cor0.col0 * 0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - + 53 FROM tab0 GROUP BY col1
----
-53

query I rowsort
SELECT DISTINCT 97 + + tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
105
142
168

query I rowsort
SELECT + 49 * + col1 FROM tab2 AS cor0 GROUP BY col1
----
2009
2891
2989

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 41 * cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3731
3772
615

query I rowsort
SELECT DISTINCT + 48 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
48

query I rowsort
SELECT + col0 + - cor0.col0 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
-2028
-3071
-989

query I rowsort
SELECT - col0 AS col2 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT + 53 AS col1 FROM tab2 GROUP BY col2
----
53
53
53

query I rowsort
SELECT DISTINCT + - col0 + - tab1.col0 * + col0 FROM tab1 GROUP BY tab1.col0
----
-506
-6806
-812

query I rowsort
SELECT ALL - - col1 AS col1 FROM tab2 GROUP BY col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor1.col0 col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT + - ( + 1 ) FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + 39 AS col2 FROM tab2 GROUP BY col1
----
39

query I rowsort
SELECT ALL - ( 30 ) AS col2 FROM tab2 GROUP BY tab2.col1
----
-30
-30
-30

query I rowsort
SELECT + - 44 AS col0 FROM tab0 GROUP BY tab0.col1
----
-44
-44

query I rowsort
SELECT ( + cor1.col0 ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT ALL - 24 FROM tab1 GROUP BY tab1.col2
----
-24
-24
-24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 45 col0 FROM tab2 GROUP BY tab2.col2
----
45

query I rowsort
SELECT ALL + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT - col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT cor0.col0 * 42 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1176
3444
924

query I rowsort
SELECT - 75 AS col1 FROM tab0 GROUP BY col2
----
-75
-75
-75

query I rowsort
SELECT + 40 + + 34 * cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1502
2862
924

query I rowsort
SELECT + - col2 AS col0 FROM tab0 GROUP BY col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-2704
SELECT ALL + tab0.col0 DIV 6 col2 FROM tab0 GROUP BY tab0.col0
----
13
4
7

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2704
SELECT ALL + tab0.col0 / 6 col2 FROM tab0 GROUP BY tab0.col0
----
13
4
7

query I rowsort
SELECT DISTINCT + 48 FROM tab0 GROUP BY tab0.col2
----
48

query I rowsort
SELECT DISTINCT - + 75 AS col1 FROM tab2 GROUP BY tab2.col2
----
-75

query I rowsort
SELECT DISTINCT + - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2708
SELECT DISTINCT + CAST( - 35 AS SIGNED ) - col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-126
-127
-50

skipif mysql # not compatible
query I rowsort label-2708
SELECT DISTINCT + CAST ( - 35 AS INTEGER ) - col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-126
-127
-50

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2709
SELECT + tab0.col2 * CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2709
SELECT + tab0.col2 * CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 45 * tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
2610
3555
3915

query I rowsort
SELECT - - 91 FROM tab1 GROUP BY tab1.col2
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT cor0.col2 + - 93 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-14
-55
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col2 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + 12 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
12
12

onlyif mysql # DIV for integer division: 
query I rowsort label-2717
SELECT + cor0.col0 DIV + cor0.col0 + - col0 * 14 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
-1147
-307
-391

skipif mysql # not compatible
query I rowsort label-2717
SELECT + cor0.col0 / + cor0.col0 + - col0 * 14 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
-1147
-307
-391

query I rowsort
SELECT COALESCE ( 5, + cor0.col1 * cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT + 14 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
14
14
14

query I rowsort
SELECT + 42 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
42
42
42

onlyif mysql # DIV for integer division: 
query I rowsort label-2722
SELECT + cor0.col2 - - ( - 19 + cor0.col2 DIV 84 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-11
26
52

skipif mysql # not compatible
query I rowsort label-2722
SELECT + cor0.col2 - - ( - 19 + cor0.col2 / 84 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-11
26
52

query I rowsort
SELECT DISTINCT + ( 69 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
69

query I rowsort
SELECT DISTINCT + cor0.col0 + + cor0.col1 * - col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-1901
26
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 55 col2 FROM tab2 GROUP BY tab2.col0
----
55
55
55

query I rowsort
SELECT - + tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - - 42 AS col1 FROM tab2 GROUP BY tab2.col1
----
42
42
42

query I rowsort
SELECT + 63 * cor0.col2 + col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1536
2432
5056

onlyif mysql # DIV for integer division: 
query I rowsort label-2729
SELECT ALL 88 DIV + 85 FROM tab2 cor0 GROUP BY col0, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2729
SELECT ALL 88 / + 85 FROM tab2 cor0 GROUP BY col0, cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT + 12 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
12

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) FROM tab0 cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2733
SELECT ALL + CAST( - 87 AS SIGNED ) FROM tab0 GROUP BY col0
----
-87
-87
-87

skipif mysql # not compatible
query I rowsort label-2733
SELECT ALL + CAST ( - 87 AS INTEGER ) FROM tab0 GROUP BY col0
----
-87
-87
-87

query I rowsort
SELECT ALL - COALESCE ( tab0.col0, tab0.col0 * tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 30, cor0.col1 * - cor0.col1, NULLIF ( - cor0.col2, - cor0.col1 * - CASE - col0 WHEN cor0.col2 THEN cor0.col2 WHEN - ( 78 ) THEN cor0.col0 * - cor0.col0 ELSE NULL END + cor0.col0 * cor0.col2 ) ) AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
30
30
30

query I rowsort
SELECT + 56 AS col2 FROM tab2 GROUP BY col0
----
56
56
56

query I rowsort
SELECT DISTINCT - 32 AS col0 FROM tab2 GROUP BY col0
----
-32

query I rowsort
SELECT DISTINCT 93 AS col2 FROM tab2 GROUP BY tab2.col1
----
93

query I rowsort
SELECT ALL - 42 AS col2 FROM tab1 GROUP BY tab1.col1
----
-42
-42
-42

query I rowsort
SELECT DISTINCT - COALESCE ( - cor0.col2, cor0.col2 * - 31 ) + + col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
142
16
90

onlyif mysql # DIV for integer division: 
query I rowsort label-2741
SELECT cor0.col2 DIV + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2741
SELECT cor0.col2 / + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
1
1
1

query I rowsort
SELECT + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 47 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-4277
-4324
-705

query I rowsort
SELECT + - 82 AS col2 FROM tab0 GROUP BY tab0.col0
----
-82
-82
-82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2745
SELECT DISTINCT - cor1.col2 - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2745
SELECT DISTINCT - cor1.col2 - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col2
----
NULL

query I rowsort
SELECT ( 57 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
57
57
57

query I rowsort
SELECT + col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT + tab2.col2 - 41 AS col2 FROM tab2 GROUP BY tab2.col2
----
17
38
46

query I rowsort
SELECT + col0 * - 12 FROM tab1 GROUP BY col0
----
-264
-336
-984

query I rowsort
SELECT ALL + 86 FROM tab0 GROUP BY tab0.col1
----
86
86

query I rowsort
SELECT 15 AS col0 FROM tab1 GROUP BY tab1.col2
----
15
15
15

query I rowsort
SELECT + 1 + + 86 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
87
87
87

query I rowsort
SELECT DISTINCT COALESCE ( cor0.col0, 47 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + 46 FROM tab0 GROUP BY tab0.col0
----
46
46
46

query I rowsort
SELECT ALL + 44 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
44
44

query I rowsort
SELECT 28 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
28
28
28

query I rowsort
SELECT 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 - col2 col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-2760
SELECT DISTINCT cor0.col0 DIV + cor0.col0 + ( 16 ) * + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1329
417
689

skipif mysql # not compatible
query I rowsort label-2760
SELECT DISTINCT cor0.col0 / + cor0.col0 + ( 16 ) * + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1329
417
689

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 94 col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
94
94
94

onlyif mysql # DIV for integer division: 
query I rowsort label-2762
SELECT - col1 * ( + 79 DIV 85 ) FROM tab0 GROUP BY tab0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-2762
SELECT - col1 * ( + 79 / 85 ) FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL cor0.col2 + + 76 FROM tab2 AS cor0 GROUP BY cor0.col2
----
134
155
163

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

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 - - 56 AS col0 FROM tab2 GROUP BY col1
----
56
56
56

query I rowsort
SELECT ALL - cor0.col1 + - 67 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-111
-124
-73

query I rowsort
SELECT DISTINCT + 44 FROM tab0 GROUP BY tab0.col1
----
44

query I rowsort
SELECT ALL cor0.col1 + - col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT 3 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
3

query I rowsort
SELECT 73 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
73
73
73

query I rowsort
SELECT DISTINCT - cor0.col0 + - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0, cor0.col1
----
-102
-150
-170

query I rowsort
SELECT DISTINCT col2 * + tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT cor0.col2 - + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT - 61 FROM tab2 GROUP BY tab2.col0
----
-61

query I rowsort
SELECT DISTINCT + 55 AS col2 FROM tab1 GROUP BY tab1.col0
----
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 98 col1 FROM tab2 GROUP BY tab2.col1
----
98

query I rowsort
SELECT ALL - + 50 FROM tab2 GROUP BY tab2.col2
----
-50
-50
-50

query I rowsort
SELECT - + 51 FROM tab2 GROUP BY tab2.col2
----
-51
-51
-51

query I rowsort
SELECT ALL + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT + CASE + cor0.col1 WHEN cor0.col1 THEN NULL ELSE cor0.col1 END * - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT + - 47 AS col2 FROM tab1 GROUP BY tab1.col1
----
-47
-47
-47

query I rowsort
SELECT ALL 33 * 98 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
3234
3234
3234

query I rowsort
SELECT 37 FROM tab0 GROUP BY tab0.col0
----
37
37
37

query I rowsort
SELECT - + cor0.col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + 50 AS col0 FROM tab2 GROUP BY col2
----
50
50
50

query I rowsort
SELECT 38 * - cor0.col0 + + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-3367
-3404
-555

query I rowsort
SELECT - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL col2 + - cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1406
-552
-6162

onlyif mysql # DIV for integer division: 
query I rowsort label-2791
SELECT - tab0.col1 DIV + 21 AS col1 FROM tab0 GROUP BY tab0.col1
----
-3
0

skipif mysql # not compatible
query I rowsort label-2791
SELECT - tab0.col1 / + 21 AS col1 FROM tab0 GROUP BY tab0.col1
----
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col0 FROM tab2 GROUP BY col0
----
15
91
92

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 DISTINCT - cor0.col1 col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 90 + + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
171
90
90

query I rowsort
SELECT DISTINCT + 22 * + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
1562
176
990

query I rowsort
SELECT DISTINCT + + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + 94 * 29 AS col1 FROM tab1 GROUP BY tab1.col1
----
2726
2726
2726

query I rowsort
SELECT - + tab1.col2 * ( 91 + - col2 ) FROM tab1 GROUP BY tab1.col2
----
-1420
-2070
-664

query I rowsort
SELECT 81 + cor0.col0 AS col0 FROM tab2 cor0 GROUP BY col0
----
172
173
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT 5 AS col1 FROM tab0 GROUP BY tab0.col2
----
5
5
5

query I rowsort
SELECT DISTINCT 83 * - 25 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2075

query I rowsort
SELECT - 0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL - COALESCE ( 18, - cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
-18
-18
-18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 52 col2 FROM tab0 GROUP BY col0
----
52
52
52

query I rowsort
SELECT ALL + cor0.col1 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT + 83 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
1245
7553
7636

query I rowsort
SELECT ALL COALESCE ( 15, cor0.col2 * cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
15
15
15

query I rowsort
SELECT ALL - CASE cor0.col1 WHEN + cor0.col2 THEN 63 END + cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 66 col0 FROM tab2 GROUP BY tab2.col2
----
-66
-66
-66

query I rowsort
SELECT ALL - cor0.col0 - cor0.col0 FROM tab1 cor0 GROUP BY col0
----
-164
-44
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 96 - + tab2.col0 col0 FROM tab2 GROUP BY col0
----
4
5
81

query I rowsort
SELECT DISTINCT + + 44 AS col1 FROM tab1 GROUP BY tab1.col0
----
44

query I rowsort
SELECT - 36 AS col2 FROM tab0 GROUP BY tab0.col0
----
-36
-36
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * 35 + - cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
1496
1938
204

query I rowsort
SELECT - - col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - 6 FROM tab0 GROUP BY tab0.col0
----
-6
-6
-6

query I rowsort
SELECT NULLIF ( cor0.col1, - col1 * 35 + 87 ) * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT cor0.col2 * + cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * + col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT - - 90 AS col1 FROM tab0 GROUP BY col2
----
90
90
90

query I rowsort
SELECT - ( 54 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-54
-54

query I rowsort
SELECT + + 32 FROM tab0 GROUP BY tab0.col1
----
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + NULLIF ( 65, - cor0.col0 ) col2 FROM tab0 cor0 GROUP BY cor0.col0
----
108
148
91

query I rowsort
SELECT - cor0.col1 * + 12 + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-929
26
83

query I rowsort
SELECT ALL + 98 + tab2.col2 FROM tab2 GROUP BY col2
----
156
177
185

query I rowsort
SELECT + cor0.col0 * cor0.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 - ( + tab0.col0 ) col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT - 67 FROM tab2 GROUP BY tab2.col0
----
-67
-67
-67

query I rowsort
SELECT - 3 FROM tab2 GROUP BY tab2.col1
----
-3
-3
-3

query I rowsort
SELECT ALL + 30 FROM tab1 GROUP BY tab1.col1
----
30
30
30

query I rowsort
SELECT DISTINCT + 48 AS col2 FROM tab2 GROUP BY tab2.col1
----
48

query I rowsort
SELECT ALL 7 FROM tab2 GROUP BY tab2.col2
----
7
7
7

query I rowsort
SELECT DISTINCT + 82 FROM tab1 GROUP BY tab1.col2
----
82

query I rowsort
SELECT DISTINCT 87 - + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
30
43
81

query I rowsort
SELECT DISTINCT + cor0.col1 - - cor0.col1 * + 0 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - 50 FROM tab1 GROUP BY col1
----
-50
-50
-50

query I rowsort
SELECT + + tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT 13 * - 82 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1066
-1066
-1066

query I rowsort
SELECT + 54 + - 42 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
12
12
12

query I rowsort
SELECT ALL + 19 FROM tab2 GROUP BY col0
----
19
19
19

query I rowsort
SELECT DISTINCT - ( COALESCE ( tab2.col2, - col2 ) ) AS col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL - - tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT - + 97 AS col2 FROM tab1 GROUP BY tab1.col0
----
-97
-97
-97

query I rowsort
SELECT + cor0.col1 * - 66 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5346
0

query I rowsort
SELECT DISTINCT - 1 + - 4 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5

query I rowsort
SELECT ALL - - tab2.col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT - 65 AS col0 FROM tab2 GROUP BY tab2.col1
----
-65
-65
-65

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2852
SELECT ALL col2 * NULLIF ( CASE - col1 WHEN + cor0.col1 THEN 27 + - cor0.col2 WHEN + cor0.col2 THEN NULL END * CAST( NULL AS DECIMAL ), 94 ) FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2852
SELECT ALL col2 * NULLIF ( CASE - col1 WHEN + cor0.col1 THEN 27 + - cor0.col2 WHEN + cor0.col2 THEN NULL END * CAST ( NULL AS REAL ), 94 ) FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - 66 AS col0 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
-66
-66
-66

query I rowsort
SELECT cor0.col0 + + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab0 GROUP BY cor0.col0 HAVING NULL IN ( cor0.col0 )
----

query I rowsort
SELECT ALL - + col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT - 99 FROM tab0 GROUP BY col2
----
-99
-99
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 53 col0 FROM tab1 GROUP BY col1
----
53
53
53

query I rowsort
SELECT ( 42 ) + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
100
121
129

query I rowsort
SELECT 81 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
81
81
81

query I rowsort
SELECT DISTINCT 60 AS col0 FROM tab1 GROUP BY tab1.col2
----
60

query I rowsort
SELECT 19 + + 84 AS col0 FROM tab1 GROUP BY tab1.col1
----
103
103
103

query I rowsort
SELECT DISTINCT + COALESCE ( cor0.col1, 99 * - cor0.col2 ) * cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
2378
4661
5307

query I rowsort
SELECT 81 FROM tab2 GROUP BY tab2.col1
----
81
81
81

query I rowsort
SELECT DISTINCT + ( + col2 ) * - col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1944
0

query I rowsort
SELECT ALL - NULLIF ( cor0.col1, cor0.col1 ) / + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 * 12 FROM tab0 cor0 GROUP BY cor0.col0
----
312
516
996

query I rowsort
SELECT - 85 AS col2 FROM tab0 GROUP BY tab0.col2
----
-85
-85
-85

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 - 26 AS col1 FROM tab0 GROUP BY tab0.col2
----
-26
-26
-26

query I rowsort
SELECT DISTINCT col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT 28 AS col2 FROM tab0 GROUP BY tab0.col0
----
28
28
28

query I rowsort
SELECT - 12 * col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-528
-684
-72

query I rowsort
SELECT - ( 85 ) FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-85
-85
-85

query I rowsort
SELECT ( + 24 ) - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-67
-68
9

query I rowsort
SELECT DISTINCT 76 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
76

query I rowsort
SELECT ALL + CASE 59 WHEN - cor0.col2 THEN NULL ELSE ( 53 ) END AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT + 89 + + 83 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
172
172
172

query I rowsort
SELECT - 9 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor1.col2
----
-9
-9
-9

query I rowsort
SELECT ALL + 47 + cor0.col0 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
129
69
75

query I rowsort
SELECT ALL ( 79 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
79
79
79

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col1
----
9 values hashing to bda869d038eeb58e7cc0eec369c174f5

query I rowsort
SELECT tab1.col2 + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT + cor0.col2 + cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT - 40 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-40
-40
-40

query I rowsort
SELECT 43 * + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1118
1849
3569

query I rowsort
SELECT DISTINCT - + col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col1, cor0.col0
----
9 values hashing to 90cf6ec6406229dce3ed591cac36d8fb

query I rowsort
SELECT DISTINCT - col0 + - 96 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-122
-139
-179

query I rowsort
SELECT ALL - 23 AS col1 FROM tab1 GROUP BY tab1.col1
----
-23
-23
-23

query I rowsort
SELECT ALL 47 AS col0 FROM tab1 GROUP BY tab1.col1
----
47
47
47

query I rowsort
SELECT ALL - - 32 * 58 FROM tab0 GROUP BY tab0.col1
----
1856
1856

query I rowsort
SELECT + - 27 FROM tab2 GROUP BY tab2.col2
----
-27
-27
-27

query I rowsort
SELECT - - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL 86 + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor1.col0
----
112
112
129
129
169
169

query I rowsort
SELECT + ( 38 ) FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
38
38
38

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2899
SELECT DISTINCT - CAST( - ( cor1.col2 ) AS SIGNED ) * cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
1444
576
6241

skipif mysql # not compatible
query I rowsort label-2899
SELECT DISTINCT - CAST ( - ( cor1.col2 ) AS INTEGER ) * cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
1444
576
6241

query I rowsort
SELECT 40 AS col1 FROM tab1 GROUP BY tab1.col2
----
40
40
40

query I rowsort
SELECT ALL + 34 AS col1 FROM tab0 GROUP BY tab0.col1
----
34
34

query I rowsort
SELECT 39 AS col0 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
39
39
39

query I rowsort
SELECT DISTINCT - 65 FROM tab1 GROUP BY tab1.col0
----
-65

query I rowsort
SELECT - 21 AS col0 FROM tab2 GROUP BY tab2.col1
----
-21
-21
-21

query I rowsort
SELECT DISTINCT + + col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT 2 FROM tab0 GROUP BY tab0.col1
----
2

query I rowsort
SELECT ALL cor0.col2 * + 67 FROM tab1 cor0 GROUP BY cor0.col2
----
3015
4757
536

query I rowsort
SELECT - cor0.col2 + - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-105
-121
-67

query I rowsort
SELECT + col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT - col2 * + cor0.col2 + 91 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3273
-6150
-7478

query I rowsort
SELECT DISTINCT - - ( + 1 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
1

query I rowsort
SELECT ALL - + 84 * 64 FROM tab0 GROUP BY tab0.col2
----
-5376
-5376
-5376

query I rowsort
SELECT DISTINCT ( + 58 ) + + tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
139
58

query I rowsort
SELECT - + col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT + cor0.col0 + - ( 19 ) AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-4
72
73

query I rowsort
SELECT - - 82 * col2 FROM tab1 GROUP BY tab1.col2
----
3690
5822
656

query I rowsort
SELECT + - 83 FROM tab2 GROUP BY col0
----
-83
-83
-83

query I rowsort
SELECT ALL - ( 95 ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-95
-95

query I rowsort
SELECT DISTINCT - 67 AS col1 FROM tab2 GROUP BY tab2.col0
----
-67

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 DISTINCT - col1 + + 65 FROM tab0 GROUP BY tab0.col1
----
-16
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT 65 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
65
65
65

onlyif mysql # DIV for integer division: 
query I rowsort label-2926
SELECT DISTINCT 35 + tab0.col2 DIV + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
36

skipif mysql # not compatible
query I rowsort label-2926
SELECT DISTINCT 35 + tab0.col2 / + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
36

query I rowsort
SELECT - cor0.col1 * 93 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-3813
-5487
-5673

query I rowsort
SELECT ( + 52 ) + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-27
-35
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 col1 FROM tab1 GROUP BY col0
----
22
28
82

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( - 43, + cor0.col1 - + cor0.col2, + 80 + + cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-43

query I rowsort
SELECT DISTINCT ( 10 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
10

query I rowsort
SELECT ALL tab0.col0 + col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - 7 FROM tab2 GROUP BY tab2.col0
----
-7

query I rowsort
SELECT - - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT + 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 + NULLIF ( cor0.col2, col2 + cor0.col2 ) - - 48 * cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2026
2911
3015

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - + 63 FROM tab1 GROUP BY tab1.col2
----
-63

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT - 77 FROM tab0 GROUP BY col0
----
-77
-77
-77

query I rowsort
SELECT ALL + col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT + cor0.col2 + + cor0.col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col0
----
1873
6927
755

query I rowsort
SELECT ALL - - col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT 35 AS col0 FROM tab0 GROUP BY col1
----
35
35

query I rowsort
SELECT + 34 AS col1 FROM tab0 GROUP BY tab0.col2
----
34
34
34

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2946
SELECT DISTINCT CAST( 2 AS SIGNED ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2

skipif mysql # not compatible
query I rowsort label-2946
SELECT DISTINCT CAST ( 2 AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 22 + - 65 col0 FROM tab0 GROUP BY tab0.col0
----
-87
-87
-87

query I rowsort
SELECT ALL - 97 + - 88 AS col0 FROM tab0 GROUP BY tab0.col1
----
-185
-185

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - NULLIF ( cor0.col2, + cor0.col2 + - ( cor0.col2 ) ) col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - ( cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 7 AS col2 FROM tab0 GROUP BY tab0.col1
----
-7

onlyif mysql # DIV for integer division: 
query I rowsort label-2953
SELECT + 8 DIV 60 col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2953
SELECT + 8 / 60 col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT + cor0.col1 + - col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
0
0
0

query I rowsort
SELECT - 41 * col2 FROM tab2 GROUP BY tab2.col2
----
-2378
-3239
-3567

query I rowsort
SELECT DISTINCT + + 34 AS col1 FROM tab1 GROUP BY tab1.col1
----
34

query I rowsort
SELECT 93 AS col2 FROM tab1 GROUP BY tab1.col1
----
93
93
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( 44 ) col0 FROM tab0 GROUP BY tab0.col1
----
-44
-44

query I rowsort
SELECT DISTINCT tab2.col1 * + col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT ALL col1 AS col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL - 84 FROM tab2 GROUP BY tab2.col0
----
-84
-84
-84

query I rowsort
SELECT DISTINCT + tab0.col1 * - tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT 89 AS col0 FROM tab1 GROUP BY tab1.col0
----
89

query I rowsort
SELECT 26 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
26
26
26

query I rowsort
SELECT 64 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
64
64
64

query I rowsort
SELECT DISTINCT - 71 AS col2 FROM tab1 GROUP BY tab1.col2
----
-71

query I rowsort
SELECT DISTINCT col0 * ( cor0.col0 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
1849
676
6889

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor1.col1
----
44
57
6

query I rowsort
SELECT + - 40 * 38 AS col2 FROM tab0 GROUP BY tab0.col1
----
-1520
-1520

query I rowsort
SELECT cor0.col2 * ( - cor0.col2 * + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-13824
-493039
-54872

query I rowsort
SELECT - 0 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT - col1 * 48 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3888
0

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor0.col0
----
0
81

query I rowsort
SELECT + 80 + cor1.col0 * 32 AS col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
1456
2736
912

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col1 col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-38
26
83

query I rowsort
SELECT col1 * - 54 FROM tab0 GROUP BY tab0.col1
----
-4374
0

query I rowsort
SELECT ( + 57 ) FROM tab2 GROUP BY tab2.col0
----
57
57
57

query I rowsort
SELECT ALL + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 73 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
73

query I rowsort
SELECT ALL + + 10 FROM tab1 GROUP BY tab1.col1
----
10
10
10

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2982
SELECT + CAST( cor0.col0 AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
26
43
83

skipif mysql # not compatible
query I rowsort label-2982
SELECT + CAST ( cor0.col0 AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 82 FROM tab2 GROUP BY tab2.col1
----
82

query I rowsort
SELECT DISTINCT 29 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
1305
2059
232

query I rowsort
SELECT + 44 AS col1 FROM tab0 GROUP BY tab0.col0
----
44
44
44

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - 98 AS col1 FROM tab2 GROUP BY col2
----
-98
-98
-98

query I rowsort
SELECT ALL + tab2.col0 * + 25 FROM tab2 GROUP BY tab2.col0
----
2275
2300
375

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT col2 * COALESCE ( - 62 * - 77, col0 + NULLIF ( cor0.col1 - cor0.col0, - col0 - - cor0.col1 ) ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
276892
377146
415338

query I rowsort
SELECT cor0.col0 * + 95 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1425
8645
8740

query I rowsort
SELECT + + col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col2
----
9 values hashing to 66267ca705f58a4488972e09499aeb2b

query I rowsort
SELECT + - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + 52 FROM tab1 GROUP BY tab1.col1
----
52
52
52

query I rowsort
SELECT 48 AS col1 FROM tab0 GROUP BY tab0.col2
----
48
48
48

query I rowsort
SELECT ALL - 4 AS col0 FROM tab0 GROUP BY col1
----
-4
-4

query I rowsort
SELECT ALL - 53 AS col1 FROM tab0 GROUP BY tab0.col1
----
-53
-53

query I rowsort
SELECT cor0.col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-3002
SELECT DISTINCT + tab2.col0 DIV + 23 AS col2 FROM tab2 GROUP BY tab2.col0
----
0
3
4

skipif mysql # not compatible
query I rowsort label-3002
SELECT DISTINCT + tab2.col0 / + 23 AS col2 FROM tab2 GROUP BY tab2.col0
----
0
3
4

query I rowsort
SELECT + 42 AS col1 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
42
42
42

query I rowsort
SELECT + + cor0.col1 FROM tab1, tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT + tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL + 43 + - 41 AS col1 FROM tab2 GROUP BY tab2.col0
----
2
2
2

query I rowsort
SELECT DISTINCT - + 82 AS col1 FROM tab1 GROUP BY tab1.col0
----
-82

query I rowsort
SELECT DISTINCT - 13 - + tab0.col1 FROM tab0 GROUP BY col1
----
-13
-94

query I rowsort
SELECT 4 FROM tab1 GROUP BY tab1.col1
----
4
4
4

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 WHERE ( NULL ) NOT BETWEEN NULL AND NULL GROUP BY cor0.col2
----

query I rowsort
SELECT ALL tab1.col0 + 70 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1562
1988
5822

query I rowsort
SELECT DISTINCT 78 AS col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col0, cor1.col2
----
78

query I rowsort
SELECT 17 * 95 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1615
1615
1615

query I rowsort
SELECT 2 - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-39
-57
-59

query I rowsort
SELECT ALL + + 69 AS col2 FROM tab1 GROUP BY col1
----
69
69
69

query I rowsort
SELECT ALL - 4 FROM tab1 GROUP BY col2
----
-4
-4
-4

query I rowsort
SELECT ALL 87 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
87
87
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3018
SELECT DISTINCT CAST( + cor0.col0 AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

skipif mysql # not compatible
query I rowsort label-3018
SELECT DISTINCT CAST ( + cor0.col0 AS INTEGER ) 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 ALL - tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3020
SELECT - 73 + 66 DIV + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-71
-72
-73

skipif mysql # not compatible
query I rowsort label-3020
SELECT - 73 + 66 / + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-71
-72
-73

query I rowsort
SELECT + col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - - 52 * col1 FROM tab2 GROUP BY col1
----
2132
3068
3172

query I rowsort
SELECT DISTINCT - - col0 * + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT ALL + tab1.col2 * tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT - 90 AS col0 FROM tab0 GROUP BY tab0.col2
----
-90
-90
-90

onlyif mysql # DIV for integer division: 
query I rowsort label-3026
SELECT COALESCE ( + 41, - cor0.col0 ) DIV + cor0.col1 + - CASE cor0.col2 WHEN - cor0.col1 THEN NULL WHEN cor0.col0 THEN NULL ELSE col0 + - cor0.col2 END FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-12
-33
72

skipif mysql # not compatible
query I rowsort label-3026
SELECT COALESCE ( + 41, - cor0.col0 ) / + cor0.col1 + - CASE cor0.col2 WHEN - cor0.col1 THEN NULL WHEN cor0.col0 THEN NULL ELSE col0 + - cor0.col2 END FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-12
-33
72

query I rowsort
SELECT DISTINCT - 90 * - tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
3960
5130
540

query I rowsort
SELECT 13 * cor0.col1 + + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
574
826
854

query I rowsort
SELECT ALL - 24 AS col2 FROM tab1 GROUP BY tab1.col2
----
-24
-24
-24

query I rowsort
SELECT - - 20 FROM tab2 GROUP BY tab2.col1
----
20
20
20

query I rowsort
SELECT + + col1 + tab2.col1 * - 43 FROM tab2 GROUP BY tab2.col1
----
-1722
-2478
-2562

query I rowsort
SELECT - + 34 FROM tab0 GROUP BY col0
----
-34
-34
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 86 col0 FROM tab0 GROUP BY col2
----
86
86
86

query I rowsort
SELECT cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT 37 AS col2 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
37
37
37

query I rowsort
SELECT + 0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + 89 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0, cor0.col1
----
89

query I rowsort
SELECT ( - 96 ) FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
-96
-96

query I rowsort
SELECT - 82 FROM tab2 GROUP BY tab2.col2
----
-82
-82
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
81

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 - 38 FROM tab1 GROUP BY tab1.col0
----
-38
-38
-38

query I rowsort
SELECT 37 AS col2 FROM tab0 GROUP BY tab0.col0
----
37
37
37

query I rowsort
SELECT ALL - 33 * + tab0.col0 FROM tab0 GROUP BY col0
----
-1419
-2739
-858

query I rowsort
SELECT ALL - tab2.col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-3047
SELECT ALL NULLIF ( + 91, - cor0.col0 ) + - ( cor0.col0 + - col2 DIV cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
49
66
9

skipif mysql # not compatible
query I rowsort label-3047
SELECT ALL NULLIF ( + 91, - cor0.col0 ) + - ( cor0.col0 + - col2 / cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
49
66
9

query I rowsort
SELECT - + 67 + 41 FROM tab0 GROUP BY tab0.col0
----
-26
-26
-26

query I rowsort
SELECT - ( 64 ) * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1664
-2752
-5312

query I rowsort
SELECT ALL 97 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
97
97
97

query I rowsort
SELECT DISTINCT 82 FROM tab0 GROUP BY tab0.col0
----
82

query I rowsort
SELECT + 16 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
16
16
16

query I rowsort
SELECT cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT ALL 26 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT 2 FROM tab1 GROUP BY col2
----
2
2
2

query I rowsort
SELECT DISTINCT + 48 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
48

query I rowsort
SELECT DISTINCT - 97 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-97

query I rowsort
SELECT ALL + 90 FROM tab0 GROUP BY tab0.col2
----
90
90
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 16 * - cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1456
-1472
-240

query I rowsort
SELECT ALL col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 62 + + 93 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
155

query I rowsort
SELECT - 14 FROM tab2 GROUP BY tab2.col2
----
-14
-14
-14

query I rowsort
SELECT DISTINCT + 12 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
12

query I rowsort
SELECT - tab2.col0 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT 15 + cor0.col1 * 90 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3705
5325
5505

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL + 7 FROM tab0 GROUP BY col2
----
7
7
7

query I rowsort
SELECT + 37 FROM tab2 GROUP BY col0
----
37
37
37

query I rowsort
SELECT ALL - 50 FROM tab1 GROUP BY tab1.col1
----
-50
-50
-50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT ( cor1.col2 ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT - cor0.col0 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT - 22 FROM tab2 GROUP BY col1
----
-22
-22
-22

query I rowsort
SELECT ALL + 13 FROM tab1 GROUP BY tab1.col0
----
13
13
13

query I rowsort
SELECT tab2.col0 - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + + 67 AS col1 FROM tab0 GROUP BY tab0.col2
----
67

query I rowsort
SELECT DISTINCT + 95 AS col0 FROM tab2 GROUP BY tab2.col1
----
95

query I rowsort
SELECT col0 * 31 AS col1 FROM tab1 GROUP BY col0
----
2542
682
868

query I rowsort
SELECT COALESCE ( - 47, - col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-47
-47
-47

query I rowsort
SELECT ALL + - tab1.col2 + + 31 AS col1 FROM tab1 GROUP BY tab1.col2
----
-14
-40
23

query I rowsort
SELECT 95 AS col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
95
95
95

onlyif mysql # DIV for integer division: 
query I rowsort label-3085
SELECT DISTINCT COALESCE ( + 5, cor0.col2 + - col2, cor0.col0 * - cor0.col0, cor0.col0 DIV 56 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
5

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3085
SELECT DISTINCT COALESCE ( + 5, cor0.col2 + - col2, cor0.col0 * - cor0.col0, cor0.col0 / 56 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
5

query I rowsort
SELECT DISTINCT + + 73 FROM tab1 GROUP BY tab1.col0
----
73

query I rowsort
SELECT ALL + col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT + 39 + tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
110
47
84

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 - - 95 + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
101
139
152

query I rowsort
SELECT cor0.col2 * + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT + 61 AS col2 FROM tab2 GROUP BY tab2.col1
----
61
61
61

query I rowsort
SELECT - 40 AS col0 FROM tab2, tab2 cor0 GROUP BY cor0.col0
----
-40
-40
-40

query I rowsort
SELECT - 76 FROM tab2 GROUP BY col1
----
-76
-76
-76

query I rowsort
SELECT ALL - col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + + col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + 30 * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1140
-2370
-720

query I rowsort
SELECT DISTINCT + - 79 * 73 AS col2 FROM tab1 GROUP BY tab1.col0
----
-5767

query I rowsort
SELECT ALL + 90 AS col2 FROM tab1 GROUP BY tab1.col0
----
90
90
90

query I rowsort
SELECT DISTINCT + 31 AS col1 FROM tab0 GROUP BY col1
----
31

query I rowsort
SELECT DISTINCT + + 87 AS col2 FROM tab2 GROUP BY tab2.col1
----
87

query I rowsort
SELECT - 20 * + 91 FROM tab2 GROUP BY tab2.col2
----
-1820
-1820
-1820

query I rowsort
SELECT + 75 AS col2 FROM tab1 GROUP BY tab1.col2
----
75
75
75

query I rowsort
SELECT DISTINCT + COALESCE ( 55, + tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
55

query I rowsort
SELECT + 58 AS col1 FROM tab1 GROUP BY tab1.col2
----
58
58
58

query I rowsort
SELECT ALL - cor0.col1 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-114
-12
-88

query I rowsort
SELECT + 27 AS col0 FROM tab0 GROUP BY tab0.col1
----
27
27

query I rowsort
SELECT ALL + 13 FROM tab2 GROUP BY tab2.col1
----
13
13
13

query I rowsort
SELECT ALL + ( - cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col0
----
26
43
83

query I rowsort
SELECT 91 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
117
134
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col2 FROM tab0 AS cor0 CROSS JOIN tab0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - tab0.col0 * - 47 FROM tab0 GROUP BY tab0.col0
----
1222
2021
3901

query I rowsort
SELECT 34 FROM tab1 GROUP BY col2
----
34
34
34

query I rowsort
SELECT + + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL + 32 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
32
32
32

query I rowsort
SELECT ALL - - 39 AS col0 FROM tab1 GROUP BY tab1.col1
----
39
39
39

query I rowsort
SELECT + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + 25 FROM tab1 GROUP BY tab1.col0
----
25
25
25

query I rowsort
SELECT ALL + - tab2.col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT + - tab1.col2 * 43 AS col0 FROM tab1 GROUP BY col2
----
-1935
-3053
-344

query I rowsort
SELECT + 43 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
43
43
43

onlyif mysql # DIV for integer division: 
query I rowsort label-3125
SELECT + cor0.col2 * COALESCE ( 49, cor0.col0 - col0, cor0.col1 DIV + cor0.col0 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2842
3871
4263

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3125
SELECT + cor0.col2 * COALESCE ( 49, cor0.col0 - col0, cor0.col1 / + cor0.col0 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2842
3871
4263

query I rowsort
SELECT + + cor0.col1 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 1 + cor0.col2 * cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3363
6240
7568

onlyif mysql # DIV for integer division: 
query I rowsort label-3128
SELECT ALL - tab2.col2 DIV - col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3128
SELECT ALL - tab2.col2 / - col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT + 26 FROM tab2 GROUP BY col1
----
26
26
26

query I rowsort
SELECT + 44 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1980
3124
352

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3131
SELECT ALL CAST( NULL AS DECIMAL ) * + 44 - - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3131
SELECT ALL CAST ( NULL AS REAL ) * + 44 - - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 49 * cor0.col1 + + 77 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2086
2968
3066

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3134
SELECT - cor0.col1 + + CAST( cor0.col1 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3134
SELECT - cor0.col1 + + CAST ( cor0.col1 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT cor1.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - + 86 AS col2 FROM tab0 GROUP BY col2
----
-86

query I rowsort
SELECT + 60 AS col2 FROM tab2 GROUP BY tab2.col1
----
60
60
60

query I rowsort
SELECT ALL 52 AS col0 FROM tab1 GROUP BY tab1.col2
----
52
52
52

query I rowsort
SELECT - + col1 AS col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT tab0.col0 + tab0.col0 * col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1892
6972
702

query I rowsort
SELECT ALL - col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT + - 1 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( tab1.col1 ) col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT 75 + 9 FROM tab2 AS cor0 GROUP BY cor0.col1
----
84
84
84

query I rowsort
SELECT ALL + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-3149
SELECT ALL + - 68 DIV + 32 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-3149
SELECT ALL + - 68 / + 32 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2
-2
-2

query I rowsort
SELECT cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col2
----
9 values hashing to ec1f9c518baf89f5f85dda11171d4494

query I rowsort
SELECT + 55 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
55
55
55

query I rowsort
SELECT ALL + 74 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
74
74
74

query I rowsort
SELECT + 30 * cor0.col2 + cor0.col1 * NULLIF ( + cor0.col2, cor0.col2 * 58 ) FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
1140
2370
2664

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 3, - cor0.col1 * + cor0.col1, 76, + cor0.col0 * 65 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
3
3
3

query I rowsort
SELECT + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + + col0 * - 66 FROM tab2 GROUP BY tab2.col0
----
-6006
-6072
-990

query I rowsort
SELECT DISTINCT + 90 AS col2 FROM tab2 GROUP BY tab2.col2
----
90

query I rowsort
SELECT + ( - tab2.col2 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL 98 FROM tab1 GROUP BY tab1.col0
----
98
98
98

query I rowsort
SELECT 22 * 16 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
352
352
352

query I rowsort
SELECT + cor1.col0 * 79 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
2054
3397
6557

query I rowsort
SELECT ALL + 81 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT 53 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT cor1.col0 AS col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - col2 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT - + col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT + tab1.col2 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - cor0.col0 * 23 - + cor0.col0 FROM tab2 AS cor0 GROUP BY col0, col0, cor0.col0, cor0.col2
----
-2184
-2208
-360

query I rowsort
SELECT + + col0 AS col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT 94 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
94
94
94

query I rowsort
SELECT DISTINCT - tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT - 98 FROM tab2 GROUP BY col2
----
-98
-98
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 35 * - col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1330
2765
840

query I rowsort
SELECT - 62 * cor0.col0 + - ( - 67 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1545
-2599
-5079

onlyif mysql # DIV for integer division: 
query I rowsort label-3175
SELECT + 62 DIV + 58 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3175
SELECT + 62 / + 58 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT ALL - - tab2.col0 + + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT ALL 55 FROM tab0 GROUP BY tab0.col2
----
55
55
55

query I rowsort
SELECT DISTINCT + 25 AS col2 FROM tab0 GROUP BY col2
----
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT COALESCE ( + cor0.col1, cor0.col1, + cor0.col1 + 3 ) * cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

onlyif mysql # DIV for integer division: 
query I rowsort label-3180
SELECT - col2 DIV - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3180
SELECT - col2 / - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT cor0.col0 + + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
105
121
67

query I rowsort
SELECT cor0.col1 - - ( 35 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
116
35

query I rowsort
SELECT DISTINCT - cor1.col0 - 18 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-101
-44
-61

query I rowsort
SELECT ALL - 32 - col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-38
-76
-89

query I rowsort
SELECT + 55 FROM tab0 GROUP BY tab0.col2
----
55
55
55

query I rowsort
SELECT ALL - cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-81
0

query I rowsort
SELECT - NULLIF ( - cor0.col0, 52 ) FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - 26 FROM tab2 GROUP BY tab2.col2
----
-26
-26
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 69 col2 FROM tab0 GROUP BY tab0.col1
----
69

query I rowsort
SELECT + 66 FROM tab1 GROUP BY col2
----
66
66
66

query I rowsort
SELECT DISTINCT - - tab1.col1 + - 68 * - col1 FROM tab1 GROUP BY tab1.col1
----
3036
3933
414

query I rowsort
SELECT col0 + 71 FROM tab0 cor0 GROUP BY col0
----
114
154
97

query I rowsort
SELECT - 99 FROM tab0 GROUP BY tab0.col2
----
-99
-99
-99

query I rowsort
SELECT + 21 - 74 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-53
-53
-53

query I rowsort
SELECT ALL - col1 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL 38 * - 47 FROM tab2 AS cor0 GROUP BY col0
----
-1786
-1786
-1786

query I rowsort
SELECT ALL - + 76 FROM tab0 GROUP BY col2
----
-76
-76
-76

query I rowsort
SELECT + 35 FROM tab1 GROUP BY tab1.col2
----
35
35
35

query I rowsort
SELECT DISTINCT 11 AS col0 FROM tab2 GROUP BY tab2.col0
----
11

query I rowsort
SELECT - 39 AS col1 FROM tab2 GROUP BY tab2.col2
----
-39
-39
-39

query I rowsort
SELECT 58 FROM tab1 GROUP BY tab1.col1
----
58
58
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 12 col2 FROM tab0 GROUP BY tab0.col1
----
12
12

query I rowsort
SELECT 44 FROM tab0 GROUP BY tab0.col0
----
44
44
44

query I rowsort
SELECT - - col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT ALL col2 - 3 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
232
316
348

query I rowsort
SELECT - cor0.col0 - - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3207
SELECT DISTINCT - 99 DIV + tab0.col2 FROM tab0 GROUP BY col2
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-3207
SELECT DISTINCT - 99 / + tab0.col2 FROM tab0 GROUP BY col2
----
-1
-2
-4

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 cor0.col0 + + 62 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
144
84
90

query I rowsort
SELECT DISTINCT - 39 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
-39

query I rowsort
SELECT - 4 AS col1 FROM tab0 GROUP BY col0
----
-4
-4
-4

query I rowsort
SELECT + cor0.col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT ALL tab1.col0 + tab1.col0 FROM tab1 GROUP BY col0 HAVING ( NULL ) IS NULL
----
164
44
56

query I rowsort
SELECT - 61 AS col1 FROM tab1, tab0 cor0 GROUP BY cor0.col2
----
-61
-61
-61

query I rowsort
SELECT ALL ( - 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 - 61 col1 FROM tab0 GROUP BY tab0.col0
----
-61
-61
-61

query I rowsort
SELECT DISTINCT 59 FROM tab1 cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2, cor1.col2
----
59

query I rowsort
SELECT col0 * NULLIF ( cor0.col0, + cor0.col2 + + col0 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1849
676
6889

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3219
SELECT - CAST( 10 AS SIGNED ) FROM tab2 AS cor0 GROUP BY col0
----
-10
-10
-10

skipif mysql # not compatible
query I rowsort label-3219
SELECT - CAST ( 10 AS INTEGER ) FROM tab2 AS cor0 GROUP BY col0
----
-10
-10
-10

onlyif mysql # DIV for integer division: 
query I rowsort label-3220
SELECT ALL - + col1 DIV 86 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3220
SELECT ALL - + col1 / 86 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT + + 74 + + 14 AS col1 FROM tab1 GROUP BY tab1.col0
----
88
88
88

query I rowsort
SELECT DISTINCT + ( tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT - 32 * - 70 + - col1 FROM tab2 GROUP BY tab2.col1
----
2179
2181
2199

query I rowsort
SELECT 67 * - 47 AS col2 FROM tab2 GROUP BY tab2.col0
----
-3149
-3149
-3149

query I rowsort
SELECT DISTINCT + - col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT - 41 FROM tab0 GROUP BY tab0.col2
----
-41
-41
-41

query I rowsort
SELECT DISTINCT cor1.col2 * cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2, cor1.col1
----
2378
4661
5307

query I rowsort
SELECT tab0.col0 * + tab0.col0 FROM tab0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT + 27 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
35
72
98

query I rowsort
SELECT ALL - ( - cor1.col2 ) FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT - col2 + + ( 19 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
-26
-52
11

query I rowsort
SELECT ( - tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT ( cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + col1 AS col1 FROM tab0 GROUP BY col1
----
0
81

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT cor0.col2 + - cor0.col0 * + NULLIF ( COALESCE ( cor0.col2, - 37, + ( - cor0.col0 ) + cor0.col1 ) - + 9, - 15 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-1741
-2369
-621

query I rowsort
SELECT DISTINCT + 1 FROM tab2 GROUP BY tab2.col0
----
1

query I rowsort
SELECT DISTINCT + 40 AS col1 FROM tab1 GROUP BY tab1.col1
----
40

query I rowsort
SELECT DISTINCT - tab1.col1 + col1 * + 47 AS col2 FROM tab1 GROUP BY tab1.col1
----
2024
2622
276

query I rowsort
SELECT tab1.col0 + 13 FROM tab1 GROUP BY col0
----
35
41
95

query I rowsort
SELECT col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - tab1.col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT ( - cor0.col2 ) * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
-1032
-2054
-3154

query I rowsort
SELECT ALL ( cor0.col2 ) + cor0.col2 * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1215
-168
-5751

query I rowsort
SELECT DISTINCT ( + 62 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
62

query I rowsort
SELECT - ( cor0.col0 ) FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - 20 AS col1 FROM tab0 GROUP BY col0
----
-20
-20
-20

query I rowsort
SELECT 73 FROM tab1 GROUP BY tab1.col0
----
73
73
73

query I rowsort
SELECT 70 FROM tab2 cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
70
70
70

query I rowsort
SELECT cor0.col1 * - 32 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2592
0

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor1.col2
----
-24
-38
-79

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT - 96 * tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-4224
-5472
-576

query I rowsort
SELECT + 56 FROM tab1 GROUP BY tab1.col1
----
56
56
56

query I rowsort
SELECT + 57 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-2508
-3249
-342

query I rowsort
SELECT + 78 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col1
----
78
78
78

query I rowsort
SELECT DISTINCT + - tab2.col0 + - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 92 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
92

query I rowsort
SELECT DISTINCT - COALESCE ( tab2.col1, tab2.col1 ) FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL - 70 AS col0 FROM tab1 GROUP BY tab1.col2
----
-70
-70
-70

query I rowsort
SELECT ALL + - 5 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
53
74
82

query I rowsort
SELECT ALL + 41 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-16
-3
35

query I rowsort
SELECT - + col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-3265
SELECT ALL ( + 85 ) DIV tab2.col1 col2 FROM tab2 GROUP BY col1
----
1
1
2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3265
SELECT ALL ( + 85 ) / tab2.col1 col2 FROM tab2 GROUP BY col1
----
1
1
2

query I rowsort
SELECT DISTINCT + 98 AS col1 FROM tab1 GROUP BY tab1.col1
----
98

query I rowsort
SELECT DISTINCT 66 AS col0 FROM tab1 GROUP BY tab1.col2
----
66

query I rowsort
SELECT DISTINCT + cor0.col2 + NULLIF ( col2 + cor0.col2, + COALESCE ( - 23, col1 ) ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
114
237
72

onlyif mysql # DIV for integer division: 
query I rowsort label-3269
SELECT ALL - cor0.col2 DIV ( 68 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3269
SELECT ALL - cor0.col2 / ( 68 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT ( - 26 ) + + col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-26
55

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT - col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 9 col0 FROM tab1 GROUP BY tab1.col2
----
-9
-9
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + 85 FROM tab1 GROUP BY tab1.col2
----
85
85
85

query I rowsort
SELECT ALL 39 - - 91 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
130
130
130

query I rowsort
SELECT + tab2.col2 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT + tab1.col0 + 60 AS col1 FROM tab1 GROUP BY tab1.col0
----
142
82
88

query I rowsort
SELECT ALL - 82 FROM tab0 GROUP BY col2
----
-82
-82
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-3283
SELECT + COALESCE ( 34, + cor1.col0 DIV - cor0.col2, CASE + 87 WHEN - cor0.col2 * cor0.col1 + + 5 THEN - cor1.col2 * - cor0.col2 ELSE NULL END - cor1.col1, - cor0.col0 * cor0.col1 + cor1.col1 ) col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
34
34

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3283
SELECT + COALESCE ( 34, + cor1.col0 / - cor0.col2, CASE + 87 WHEN - cor0.col2 * cor0.col1 + + 5 THEN - cor1.col2 * - cor0.col2 ELSE NULL END - cor1.col1, - cor0.col0 * cor0.col1 + cor1.col1 ) col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
34
34

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * + cor0.col2 col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col1
----
9 values hashing to 244e899494d93a3a5a5f3593cc29226d

query I rowsort
SELECT DISTINCT + 78 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
78

query I rowsort
SELECT ALL ( cor0.col1 ) FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - + 13 FROM tab0 GROUP BY col2
----
-13
-13
-13

query I rowsort
SELECT 30 FROM tab0 GROUP BY tab0.col1
----
30
30

query I rowsort
SELECT + 33 FROM tab1 GROUP BY tab1.col0
----
33
33
33

query I rowsort
SELECT - - tab0.col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL 83 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
83
83
83

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT 30 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
30
30
30

query I rowsort
SELECT DISTINCT - 0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
0

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT - cor0.col2 + 78 FROM tab1 AS cor0 GROUP BY cor0.col2
----
33
7
70

query I rowsort
SELECT ( - 63 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-63
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * 25 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2025
0

query I rowsort
SELECT ALL - 0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - 68 FROM tab2 GROUP BY tab2.col2
----
-68
-68
-68

query I rowsort
SELECT 64 + 15 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
79
79
79

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT 95 FROM tab2 GROUP BY tab2.col2
----
95
95
95

query I rowsort
SELECT - - tab2.col2 * + 52 FROM tab2 GROUP BY tab2.col2
----
3016
4108
4524

query I rowsort
SELECT - - 14 * 21 FROM tab2 GROUP BY col2
----
294
294
294

onlyif mysql # DIV for integer division: 
query I rowsort label-3309
SELECT ALL 80 DIV 95 + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

skipif mysql # not compatible
query I rowsort label-3309
SELECT ALL 80 / 95 + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - 38 FROM tab0 GROUP BY tab0.col1
----
-38
-38

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor1.col1
----
0
0
0
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab0.col2 * - tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT + + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL + 82 FROM tab0 GROUP BY tab0.col2
----
82
82
82

query I rowsort
SELECT + - 69 FROM tab2 GROUP BY tab2.col2
----
-69
-69
-69

query I rowsort
SELECT - 53 FROM tab0 GROUP BY tab0.col2
----
-53
-53
-53

query I rowsort
SELECT + - 2 FROM tab0 GROUP BY tab0.col2
----
-2
-2
-2

query I rowsort
SELECT + col0 * 54 FROM tab1 GROUP BY col0
----
1188
1512
4428

query I rowsort
SELECT + 55 AS col2 FROM tab2 GROUP BY tab2.col0
----
55
55
55

query I rowsort
SELECT + 28 FROM tab0 GROUP BY tab0.col0
----
28
28
28

query I rowsort
SELECT ALL - 60 - + 92 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-152
-152
-152

query I rowsort
SELECT + 57 FROM tab2 GROUP BY tab2.col1
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 81 col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
81

query I rowsort
SELECT ALL + cor0.col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT ALL ( 50 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col0 / cor0.col0 + CASE + cor0.col0 + + cor0.col0 * cor0.col0 WHEN cor0.col0 THEN cor0.col0 WHEN - col0 + cor0.col0 THEN + 31 END AS col2 FROM tab1 cor0 GROUP BY col0, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 21 AS col0 FROM tab2 GROUP BY col2
----
-21

query I rowsort
SELECT ALL cor1.col1 AS col2 FROM tab1 cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 41 col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
41
41
41

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3332
SELECT ALL - CAST( NULL AS SIGNED ) * + 73 AS col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3332
SELECT ALL - CAST ( NULL AS INTEGER ) * + 73 AS col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - ( 77 ) FROM tab0 GROUP BY tab0.col1
----
-77

onlyif mysql # DIV for integer division: 
query I rowsort label-3334
SELECT - cor0.col0 DIV - 57 + - 58 FROM tab1 AS cor0 GROUP BY col0
----
-57
-58
-58

skipif mysql # not compatible
query I rowsort label-3334
SELECT - cor0.col0 / - 57 + - 58 FROM tab1 AS cor0 GROUP BY col0
----
-57
-58
-58

query I rowsort
SELECT ALL + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 31 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
31

query I rowsort
SELECT ( 66 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col0
----
9 values hashing to 29794915b585eea848ad670075452c88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT 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 ALL - + 71 col1 FROM tab0 GROUP BY tab0.col2
----
-71
-71
-71

query I rowsort
SELECT 82 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT ALL + + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + - 55 AS col2 FROM tab1 GROUP BY col0
----
-55
-55
-55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT COALESCE ( cor0.col2, - cor0.col2 * cor0.col2 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - cor0.col2 * 3 + col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-142
-16
-90

query I rowsort
SELECT - cor0.col2 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-38
-79
57

query I rowsort
SELECT ALL + + tab0.col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col2, - cor0.col2 / + 63 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 2 col1 FROM tab1 GROUP BY col2
----
-2
-2
-2

query I rowsort
SELECT ALL + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1 HAVING NOT NULL IS NOT NULL
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab0.col0 col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - tab0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - col1 + + tab1.col1 * 57 FROM tab1 GROUP BY tab1.col1
----
2464
3192
336

query I rowsort
SELECT ALL - + tab0.col2 * col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT + 29 AS col0 FROM tab1 GROUP BY tab1.col0
----
29
29
29

query I rowsort
SELECT DISTINCT - + tab1.col2 * 46 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2070
-3266
-368

query I rowsort
SELECT - cor1.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-41
-59
-61

query I rowsort
SELECT ALL + 51 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
51
51
51

query I rowsort
SELECT DISTINCT + + 50 FROM tab0 GROUP BY col2
----
50

query I rowsort
SELECT ALL 10 FROM tab0 GROUP BY col0
----
10
10
10

query I rowsort
SELECT ALL + 78 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT 85 + 73 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
158
158
158

query I rowsort
SELECT ALL - 69 AS col2 FROM tab0 GROUP BY tab0.col0
----
-69
-69
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 + 29 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
29
6590

query I rowsort
SELECT ALL + 78 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT DISTINCT - cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-44
-57
-6

query I rowsort
SELECT + col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 29 * - 50 + - 67 col1 FROM tab2 GROUP BY tab2.col0
----
-1517
-1517
-1517

query I rowsort
SELECT 46 FROM tab2 GROUP BY tab2.col0
----
46
46
46

query I rowsort
SELECT DISTINCT + - 99 AS col2 FROM tab0 GROUP BY tab0.col0
----
-99

query I rowsort
SELECT + 74 FROM tab0 GROUP BY tab0.col2
----
74
74
74

query I rowsort
SELECT 65 AS col2 FROM tab2 GROUP BY tab2.col2
----
65
65
65

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-3375
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-3375
SELECT cor0.col0 / cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
0
1
1

query I rowsort
SELECT + + 17 AS col0 FROM tab2 GROUP BY tab2.col1
----
17
17
17

query I rowsort
SELECT + + col0 AS col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - 91 * - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
2184
3458
7189

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - 77 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
-77
-77
-77

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3381
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3381
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 36 FROM tab1 GROUP BY col0
----
36

query I rowsort
SELECT DISTINCT + 5 FROM tab2 GROUP BY tab2.col2
----
5

query I rowsort
SELECT ALL + + 92 FROM tab2 GROUP BY col0
----
92
92
92

query I rowsort
SELECT ALL + CASE + cor0.col2 WHEN NULLIF ( 23, col0 ) THEN - cor0.col1 * cor0.col2 WHEN - cor0.col2 * cor0.col1 THEN NULL END * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + 47 AS col0 FROM tab0 GROUP BY tab0.col1
----
47
47

query I rowsort
SELECT + tab2.col1 - col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT 80 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
80
80
80

query I rowsort
SELECT DISTINCT + 9 FROM tab2 GROUP BY col2
----
9

query I rowsort
SELECT DISTINCT - 19 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT cor1.col2 + 98 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor1.col2, cor0.col2
----
9 values hashing to b1893097067a483a4a8788ddd23da330

query I rowsort
SELECT cor0.col1 + cor0.col1 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT ALL + tab0.col0 FROM tab0 GROUP BY col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-3396
SELECT DISTINCT 11 DIV 64 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-3396
SELECT DISTINCT 11 / 64 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col2 * col2 col2 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NULL
----
2025
5041
64

query I rowsort
SELECT + 44 AS col0 FROM tab2 GROUP BY tab2.col0
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 22 col0 FROM tab0 GROUP BY tab0.col0
----
22
22
22

query I rowsort
SELECT + 9 FROM tab0 GROUP BY col0
----
9
9
9

query I rowsort
SELECT + cor0.col0 + + cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT + 55 AS col1 FROM tab2 GROUP BY tab2.col2
----
55
55
55

query I rowsort
SELECT ALL - 75 + cor0.col1 * cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
-39
1861
3174

query I rowsort
SELECT + 95 + - 76 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT - 85 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
-85
-85

query I rowsort
SELECT 86 * tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
0
6966

query I rowsort
SELECT ALL - tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT cor0.col2 + + 86 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
110
124
165

query I rowsort
SELECT ALL + + 84 AS col0 FROM tab2 GROUP BY tab2.col1
----
84
84
84

query I rowsort
SELECT DISTINCT + 15 AS col1 FROM tab2 GROUP BY tab2.col2
----
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 6 col2 FROM tab2 GROUP BY tab2.col1
----
6

query I rowsort
SELECT cor0.col0 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-17
11
14

query I rowsort
SELECT + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT col0 + col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
166
52
86

query I rowsort
SELECT DISTINCT - 13 AS col2 FROM tab2 GROUP BY tab2.col2
----
-13

query I rowsort
SELECT cor0.col2 * cor0.col2 + + 33 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1477
609
6274

query I rowsort
SELECT - tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - COALESCE ( + 60, cor0.col2 * + cor0.col2 + 52, 31 + - col0 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-60

query I rowsort
SELECT - ( + 26 ) FROM tab2 GROUP BY tab2.col1
----
-26
-26
-26

query I rowsort
SELECT ALL - cor0.col2 + + 40 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-18
-39
-47

query I rowsort
SELECT - cor0.col0 - 87 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-109
-115
-169

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT cor0.col1 * + ( - 32 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1312
-1888
-1952

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3424
SELECT ALL CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3424
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - - col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL - 39 FROM tab2 GROUP BY tab2.col0
----
-39
-39
-39

query I rowsort
SELECT ALL 87 FROM tab2 GROUP BY col2
----
87
87
87

query I rowsort
SELECT + 68 FROM tab0 GROUP BY tab0.col2
----
68
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 85 col1 FROM tab2 GROUP BY col0
----
85
85
85

query I rowsort
SELECT DISTINCT 86 FROM tab2 GROUP BY tab2.col1
----
86

query I rowsort
SELECT - 12 AS col2 FROM tab1 GROUP BY tab1.col1
----
-12
-12
-12

query I rowsort
SELECT DISTINCT 31 FROM tab0 GROUP BY tab0.col1
----
31

onlyif mysql # DIV for integer division: 
query I rowsort label-3433
SELECT DISTINCT - tab1.col2 * tab1.col2 - 85 DIV col2 FROM tab1 GROUP BY col2
----
-2026
-5042
-74

skipif mysql # not compatible
query I rowsort label-3433
SELECT DISTINCT - tab1.col2 * tab1.col2 - 85 / col2 FROM tab1 GROUP BY col2
----
-2026
-5042
-74

query I rowsort
SELECT - tab1.col0 - - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT ALL + 57 FROM tab1 GROUP BY tab1.col0
----
57
57
57

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - 98, + cor0.col2 + cor0.col1, col1 + + cor0.col2, - cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-98

query I rowsort
SELECT DISTINCT + 57 FROM tab0 GROUP BY tab0.col1
----
57

query I rowsort
SELECT DISTINCT + col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL - cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-2025
-5041
-64

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor0.col1, cor0.col2
----
9 values hashing to cca41de50bd454833d55050217f62aa5

query I rowsort
SELECT DISTINCT - 64 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-64

query I rowsort
SELECT - col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT cor0.col2 * + 7 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
360
568
64

query I rowsort
SELECT - 27 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-27
-27
-27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 54 col0 FROM tab2 GROUP BY tab2.col2
----
54
54
54

query I rowsort
SELECT 91 FROM tab0 GROUP BY tab0.col1
----
91
91

query I rowsort
SELECT + - tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL 42 AS col0 FROM tab2 GROUP BY col1
----
42
42
42

query I rowsort
SELECT cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col0
----
22
28
82

query I rowsort
SELECT - + 93 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-119
-136
-176

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 84 col2 FROM tab2 GROUP BY tab2.col2
----
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 17 col0 FROM tab2 GROUP BY tab2.col0
----
-17

query I rowsort
SELECT ALL ( cor0.col2 ) * col2 + ( 77 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
3441
6318
7646

query I rowsort
SELECT 78 FROM tab1 GROUP BY col1
----
78
78
78

query I rowsort
SELECT ALL - col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + - 31 FROM tab0 GROUP BY tab0.col0
----
-31
-31
-31

query I rowsort
SELECT cor0.col1 * cor0.col2 + + 98 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2042
98
98

query I rowsort
SELECT ALL + cor0.col2 + + cor0.col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
158
48
76

query I rowsort
SELECT ALL col2 + - 3 * - 10 AS col1 FROM tab2 GROUP BY tab2.col2
----
109
117
88

query I rowsort
SELECT + 50 FROM tab0 GROUP BY col2
----
50
50
50

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - - 2 FROM tab0 GROUP BY col1
----
2

query I rowsort
SELECT 90 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
90
90
90

query I rowsort
SELECT + 67 AS col2 FROM tab0 GROUP BY tab0.col0
----
67
67
67

query I rowsort
SELECT ALL - 59 AS col0 FROM tab0 GROUP BY tab0.col1
----
-59
-59

query I rowsort
SELECT ALL - + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT tab1.col0 * tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

onlyif mysql # DIV for integer division: 
query I rowsort label-3469
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-3469
SELECT DISTINCT - cor0.col1 / - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT - cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0, cor0.col1, cor0.col1
----
-15
-15
-91
-91
-92
-92

query I rowsort
SELECT ALL + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2

query I rowsort
SELECT - 43 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-43
-43
-43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col0 col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3476
SELECT - - CAST( - 86 AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
-86
-86
-86

skipif mysql # not compatible
query I rowsort label-3476
SELECT - - CAST ( - 86 AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
-86
-86
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 44 * + 27 + 61 * cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
-700
1557
3143

query I rowsort
SELECT + 9 FROM tab2 GROUP BY col1
----
9
9
9

query I rowsort
SELECT cor0.col0 + - 52 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-26
-9
31

query I rowsort
SELECT DISTINCT - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT - 7 + tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
34
52
54

query I rowsort
SELECT - cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + 63 AS col1 FROM tab1 GROUP BY tab1.col2
----
63
63
63

query I rowsort
SELECT DISTINCT cor0.col0 * + ( - cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

onlyif mysql # DIV for integer division: 
query I rowsort label-3485
SELECT DISTINCT cor0.col2 DIV + 67 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
1

skipif mysql # not compatible
query I rowsort label-3485
SELECT DISTINCT cor0.col2 / + 67 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
1

query I rowsort
SELECT - - 97 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
2134
2716
7954

query I rowsort
SELECT DISTINCT cor1.col0 * cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor0.col1
----
484
6724
784

query I rowsort
SELECT ALL + 63 + + 9 * cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
297
450
810

query I rowsort
SELECT DISTINCT - 36 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor1.col1
----
-36

query I rowsort
SELECT - + 19 AS col2 FROM tab2 GROUP BY col1
----
-19
-19
-19

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL - - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT + - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL 82 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT ALL - 96 AS col1 FROM tab1 GROUP BY tab1.col2
----
-96
-96
-96

query I rowsort
SELECT COALESCE ( - 80, cor0.col2 ) * - ( - cor0.col2 + + cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - 95 FROM tab0 GROUP BY tab0.col2
----
-95
-95
-95

query I rowsort
SELECT + 90 AS col0 FROM tab2 GROUP BY tab2.col2
----
90
90
90

query I rowsort
SELECT ALL - 79 AS col0 FROM tab0 GROUP BY col1
----
-79
-79

query I rowsort
SELECT cor0.col0 * - 90 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1980
-2520
-7380

query I rowsort
SELECT ( + cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT ALL + 46 AS col2 FROM tab2 GROUP BY tab2.col2
----
46
46
46

query I rowsort
SELECT - 75 * + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1800
-2850
-5925

query I rowsort
SELECT DISTINCT + + 8 FROM tab1 GROUP BY tab1.col1
----
8

query I rowsort
SELECT 87 * 44 AS col1 FROM tab2 GROUP BY tab2.col0
----
3828
3828
3828

query I rowsort
SELECT DISTINCT 3 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
3

query I rowsort
SELECT - + 41 + + cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
17
38
46

query I rowsort
SELECT ALL - 89 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-46
-6
-63

query I rowsort
SELECT ALL + tab2.col2 * - 14 FROM tab2 GROUP BY tab2.col2
----
-1106
-1218
-812

query I rowsort
SELECT + ( - col1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL 74 FROM tab0 GROUP BY col2
----
74
74
74

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-3518
SELECT ALL - 43 DIV 57 FROM tab1 GROUP BY col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3518
SELECT ALL - 43 / 57 FROM tab1 GROUP BY col2
----
0
0
0

query I rowsort
SELECT DISTINCT - + col1 + - 64 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
2583
3717
3843

query I rowsort
SELECT 63 AS col2 FROM tab1 GROUP BY tab1.col2
----
63
63
63

query I rowsort
SELECT ALL 41 * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1148
-3362
-902

query I rowsort
SELECT DISTINCT + 54 AS col2 FROM tab1 GROUP BY tab1.col0
----
54

query I rowsort
SELECT - ( cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 81 * + col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
3645
5751
648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 42 col2 FROM tab1 GROUP BY tab1.col2
----
42
42
42

query I rowsort
SELECT ALL - 25 AS col0 FROM tab0 GROUP BY tab0.col0
----
-25
-25
-25

query I rowsort
SELECT DISTINCT 22 AS col2 FROM tab0 GROUP BY tab0.col2
----
22

query I rowsort
SELECT DISTINCT tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT + tab0.col0 FROM tab0, tab2 cor0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL 54 FROM tab2 GROUP BY tab2.col0
----
54
54
54

onlyif mysql # DIV for integer division: 
query I rowsort label-3531
SELECT ALL + 61 DIV 58 FROM tab0 GROUP BY tab0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3531
SELECT ALL + 61 / 58 FROM tab0 GROUP BY tab0.col0
----
1
1
1

query I rowsort
SELECT ( 44 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
44
44

query I rowsort
SELECT ALL 38 AS col1 FROM tab2 GROUP BY tab2.col0
----
38
38
38

query I rowsort
SELECT ALL + col0 * + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
225
8281
8464

query I rowsort
SELECT CASE cor0.col2 WHEN ( + COALESCE ( cor0.col1, col1, NULLIF ( cor0.col0, + cor0.col1 ) ) ) / CASE col1 WHEN + cor0.col0 + + cor0.col2 THEN NULL ELSE + cor0.col2 * col0 + cor0.col0 * 5 END THEN + cor0.col1 - cor0.col0 * - cor0.col2 WHEN COALESCE ( - cor0.col0, cor0.col1 ) THEN 81 END / CASE cor0.col2 / cor0.col2 WHEN cor0.col2 THEN + cor0.col0 + + cor0.col1 * COALESCE ( - 97 * + col1, - cor0.col1, - cor0.col1 - + cor0.col0 ) ELSE NULL END FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 68 FROM tab0 GROUP BY tab0.col2
----
68

query I rowsort
SELECT - col0 + + tab0.col0 FROM tab0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL + 43 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col0
----
43
43
43

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT cor0.col2 * COALESCE ( + 40, + cor0.col0 + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
2320
3160
3480

query I rowsort
SELECT - 7 - + cor1.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-48
-66
-68

query I rowsort
SELECT DISTINCT 17 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1343
-1479
-986

query I rowsort
SELECT cor0.col0 * ( 13 ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor0.col0
----
1066
286
364

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3543
SELECT - tab0.col1 + CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3543
SELECT - tab0.col1 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT - 55 FROM tab2 GROUP BY col1
----
-55
-55
-55

onlyif mysql # DIV for integer division: 
query I rowsort label-3546
SELECT + tab0.col0 DIV 34 FROM tab0 GROUP BY col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-3546
SELECT + tab0.col0 / 34 FROM tab0 GROUP BY col0
----
0
1
2

query I rowsort
SELECT + 89 * + 51 FROM tab0 GROUP BY col1
----
4539
4539

query I rowsort
SELECT ALL + 68 FROM tab2 GROUP BY col2
----
68
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 70 + - 71 col2 FROM tab2 GROUP BY col0
----
-1
-1
-1

query I rowsort
SELECT + cor0.col0 + + cor0.col0 * + 43 FROM tab2 AS cor0 GROUP BY col0, cor0.col0, cor0.col2
----
4004
4048
660

query I rowsort
SELECT DISTINCT - + tab2.col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-3552
SELECT ALL col0 DIV tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3552
SELECT ALL col0 / tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT + - col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 43 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
43

query I rowsort
SELECT ALL - 53 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-53
-53
-53

query I rowsort
SELECT ALL + cor0.col1 * + col1 AS 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 cor0.col1 col1 FROM tab2 cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL cor1.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - - col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - - tab2.col0 * col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT cor0.col2 * 1 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
105
121
67

query I rowsort
SELECT DISTINCT - + 9 AS col2 FROM tab2 GROUP BY tab2.col0
----
-9

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3563
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3563
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - 82 AS col0 FROM tab2 GROUP BY tab2.col1
----
82
82
82

query I rowsort
SELECT + 52 + + 70 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
122
122
122

query I rowsort
SELECT + 43 FROM tab1 GROUP BY col0
----
43
43
43

query I rowsort
SELECT - 50 + col2 FROM tab0 GROUP BY tab0.col2
----
-12
-26
29

query I rowsort
SELECT ALL + 7 FROM tab2 GROUP BY col1
----
7
7
7

query I rowsort
SELECT + ( 6 ) FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT + - 19 FROM tab2 GROUP BY tab2.col1
----
-19
-19
-19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - + 30 FROM tab1 GROUP BY tab1.col0
----
-30

query I rowsort
SELECT ALL - 25 AS col0 FROM tab2 GROUP BY tab2.col2
----
-25
-25
-25

query I rowsort
SELECT + 28 * - 41 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1148
-1148
-1148

query I rowsort
SELECT ALL 83 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor1.col0
----
83
83
83

query I rowsort
SELECT + - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT + tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT 26 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
26
26
26

query I rowsort
SELECT + 65 FROM tab1 GROUP BY tab1.col1
----
65
65
65

query I rowsort
SELECT - 86 AS col2 FROM tab1 GROUP BY tab1.col2
----
-86
-86
-86

query I rowsort
SELECT ALL - cor0.col0 - cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3456
-6332
-7584

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 AS col0 FROM tab2 cor0 CROSS JOIN tab0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 WHERE NOT ( NULL ) NOT IN ( col2 / cor0.col0 + cor0.col1 ) GROUP BY cor0.col2
----

query I rowsort
SELECT DISTINCT col1 * - ( - col2 * - cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-115425
-221804
-384

query I rowsort
SELECT - 34 * - cor0.col0 + + ( col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2870
770
980

query I rowsort
SELECT cor0.col2 * cor0.col1 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
2025

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - 65 AS col2 FROM tab0 GROUP BY col2
----
-65

query I rowsort
SELECT 90 * 20 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1800
1800
1800

query I rowsort
SELECT - 60 FROM tab1 GROUP BY col2
----
-60
-60
-60

query I rowsort
SELECT 53 AS col2 FROM tab2 GROUP BY tab2.col2
----
53
53
53

query I rowsort
SELECT ALL + - 7 * tab0.col0 FROM tab0 GROUP BY col0
----
-182
-301
-581

query I rowsort
SELECT 66 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
66
66
66

query I rowsort
SELECT 78 AS col1 FROM tab2 GROUP BY tab2.col0
----
78
78
78

query I rowsort
SELECT ALL tab2.col0 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT ALL - + col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL - - 93 + 51 FROM tab1 GROUP BY col2
----
144
144
144

query I rowsort
SELECT ALL + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - cor0.col1 * + 29 AS col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
-1276
-1653
-174

query I rowsort
SELECT cor1.col0 * cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
1849
676
6889

query I rowsort
SELECT + - 14 FROM tab1 GROUP BY tab1.col2
----
-14
-14
-14

query I rowsort
SELECT 80 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
23
36
74

query I rowsort
SELECT - 43 + + col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-19
-5
36

query I rowsort
SELECT + 4 AS col2 FROM tab0 GROUP BY col0
----
4
4
4

query I rowsort
SELECT ALL 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 - + col1 col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT col2 - - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

onlyif mysql # DIV for integer division: 
query I rowsort label-3610
SELECT cor0.col0 DIV + 69 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3610
SELECT cor0.col0 / + 69 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1
1

query I rowsort
SELECT - + 18 FROM tab2 GROUP BY col0
----
-18
-18
-18

onlyif mysql # DIV for integer division: 
query I rowsort label-3612
SELECT 84 DIV tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3612
SELECT 84 / tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
0
1
1

query I rowsort
SELECT ALL - tab2.col1 - - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT 12 * + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
288
456
948

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab1, tab0 cor0 GROUP BY cor0.col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3616
SELECT ALL + ( + COALESCE ( 27, cor0.col2 DIV cor0.col1, - 39 + cor0.col0 ) ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
27
27
27

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3616
SELECT ALL + ( + COALESCE ( 27, cor0.col2 / cor0.col1, - 39 + cor0.col0 ) ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
27
27
27

query I rowsort
SELECT ( - tab1.col0 ) FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col1 + - cor0.col1 * 43 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1848
-2394
-252

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 + cor0.col2 * 27 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
10030
10414
2574

query I rowsort
SELECT ALL 43 FROM tab0 GROUP BY tab0.col1
----
43
43

query I rowsort
SELECT ALL + col2 AS col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 67 AS col1 FROM tab0 GROUP BY tab0.col1
----
-67

query I rowsort
SELECT + cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + 13 * 89 FROM tab2 GROUP BY tab2.col1
----
1157

query I rowsort
SELECT ALL - - 62 AS col0 FROM tab1 GROUP BY tab1.col2
----
62
62
62

query I rowsort
SELECT ALL + + 74 + - tab0.col0 FROM tab0 GROUP BY col0
----
-9
31
48

query I rowsort
SELECT DISTINCT - 73 FROM tab1 GROUP BY col0
----
-73

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
-81
0

query I rowsort
SELECT - + 33 AS col2 FROM tab1 GROUP BY tab1.col0
----
-33
-33
-33

query I rowsort
SELECT DISTINCT 78 FROM tab1 GROUP BY tab1.col2
----
78

query I rowsort
SELECT DISTINCT - + 25 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-25

query I rowsort
SELECT DISTINCT + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 55 * col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
2420
3135
330

query I rowsort
SELECT + - 2 AS col1 FROM tab0 GROUP BY tab0.col1
----
-2
-2

query I rowsort
SELECT ALL cor0.col1 + ( - cor0.col1 + + col1 ) * + 25 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ( cor0.col1 ) + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
492
6795
829

query I rowsort
SELECT ALL - + tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 76 FROM tab1 GROUP BY col2
----
76

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3642
SELECT - + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3642
SELECT - + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - 95 AS col2 FROM tab1 GROUP BY col1
----
-95

query I rowsort
SELECT + 77 * 56 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
4312
4312
4312

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 ALL + tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT 67 AS col2 FROM tab2 GROUP BY tab2.col0
----
67
67
67

query I rowsort
SELECT cor0.col2 + NULLIF ( + cor0.col2, + cor0.col2 * col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
142
16
90

query I rowsort
SELECT ALL - cor0.col1 + 50 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-7
44
6

onlyif mysql # DIV for integer division: 
query I rowsort label-3650
SELECT ALL col2 DIV + 92 + 90 FROM tab2 GROUP BY tab2.col2
----
90
90
90

skipif mysql # not compatible
query I rowsort label-3650
SELECT ALL col2 / + 92 + 90 FROM tab2 GROUP BY tab2.col2
----
90
90
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab1.col1 - + 45 col2 FROM tab1 GROUP BY tab1.col1
----
-1
-39
12

query I rowsort
SELECT ALL - + 3 AS col2 FROM tab1 GROUP BY col0
----
-3
-3
-3

query I rowsort
SELECT + 38 AS col0 FROM tab2 GROUP BY col1
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col0
----
15
91
92

query I rowsort
SELECT ALL - 70 * 75 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-5250
-5250
-5250

query I rowsort
SELECT - - 69 FROM tab1 GROUP BY tab1.col1
----
69
69
69

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + 34 AS col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col0
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 59 * + col2 col1 FROM tab0 GROUP BY col2
----
-1416
-2242
-4661

query I rowsort
SELECT ALL 80 - col0 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-1974
-3074
-952

query I rowsort
SELECT DISTINCT - + 57 AS col2 FROM tab2 GROUP BY tab2.col2
----
-57

query I rowsort
SELECT - 89 FROM tab1 GROUP BY tab1.col0
----
-89
-89
-89

query I rowsort
SELECT DISTINCT + tab0.col0 + 81 FROM tab0 GROUP BY tab0.col0
----
107
124
164

query I rowsort
SELECT + - 97 AS col2 FROM tab0 GROUP BY tab0.col1
----
-97
-97

query I rowsort
SELECT DISTINCT - 6 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-6

query I rowsort
SELECT ALL + - col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT 38 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
38
38
38

query I rowsort
SELECT DISTINCT tab2.col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL + ( - col1 ) * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT 81 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 42 col2 FROM tab2 GROUP BY tab2.col1
----
-42
-42
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 48 col2 FROM tab1 GROUP BY tab1.col1
----
48

query I rowsort
SELECT DISTINCT + - 73 FROM tab1 GROUP BY col0
----
-73

query I rowsort
SELECT + 19 + - 61 FROM tab1 GROUP BY tab1.col2
----
-42
-42
-42

query I rowsort
SELECT - + 34 AS col0 FROM tab2 GROUP BY tab2.col2
----
-34
-34
-34

query I rowsort
SELECT cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + 56 AS col1 FROM tab0 GROUP BY tab0.col1
----
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT ALL + ( tab0.col2 ) FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT - COALESCE ( + 50, - cor1.col1 ) + 83 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1
----
33

query I rowsort
SELECT DISTINCT - 22 + tab1.col0 * 68 FROM tab1 GROUP BY tab1.col0
----
1474
1882
5554

query I rowsort
SELECT ALL 21 + cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
62
80
82

query I rowsort
SELECT DISTINCT + - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT + 43 FROM tab2 GROUP BY tab2.col0
----
43
43
43

query I rowsort
SELECT - cor0.col2 + cor0.col2 * cor0.col2 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
1980
4970
56

query I rowsort
SELECT ALL - - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + 50 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-2050
-2950
-3050

query I rowsort
SELECT + ( cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + col1 * - 9 AS col0 FROM tab0 GROUP BY tab0.col1
----
-729
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( cor0.col0 ) col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + + tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL - cor0.col2 + 9 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-49
-70
-78

query I rowsort
SELECT ALL + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - + tab0.col1 + - 53 FROM tab0 GROUP BY tab0.col1
----
-134
-53

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT - cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-3699
SELECT DISTINCT 93 DIV tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1
11
2

skipif mysql # not compatible
query I rowsort label-3699
SELECT DISTINCT 93 / tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1
11
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor1.col0 * cor1.col0 col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor1.col0
----
9 values hashing to 5f4f342c0a950319a85f5d8a908743dd

query I rowsort
SELECT + - 40 AS col1 FROM tab0 GROUP BY col2
----
-40
-40
-40

query I rowsort
SELECT ( + col2 ) AS col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + - tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col0 + 87 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1936
2464
7216

query I rowsort
SELECT 75 - 34 AS col2 FROM tab2 GROUP BY tab2.col0
----
41
41
41

query I rowsort
SELECT - + tab0.col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL 16 * + cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
1264
384
608

query I rowsort
SELECT - 87 AS col1 FROM tab0 GROUP BY tab0.col2
----
-87
-87
-87

query I rowsort
SELECT DISTINCT - + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - 72 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-72

query I rowsort
SELECT ALL + 67 + + col1 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
148
67
67

query I rowsort
SELECT DISTINCT - col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 41 col1 FROM tab1 GROUP BY tab1.col0
----
-41
-41
-41

query I rowsort
SELECT + 52 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
135
78
95

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 + col2 AS col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL 15 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
15
15
15

query I rowsort
SELECT ALL 78 FROM tab2 GROUP BY tab2.col2
----
78
78
78

query I rowsort
SELECT DISTINCT + 74 FROM tab1 GROUP BY tab1.col2
----
74

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col2
----
9 values hashing to 7a3bee88c68cb011ab3d0cb5e0bd7e7c

onlyif mysql # DIV for integer division: 
query I rowsort label-3721
SELECT DISTINCT 40 DIV 2 AS col0 FROM tab0 GROUP BY tab0.col1
----
20

skipif mysql # not compatible
query I rowsort label-3721
SELECT DISTINCT 40 / 2 AS col0 FROM tab0 GROUP BY tab0.col1
----
20

query I rowsort
SELECT cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col1, cor1.col0
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-3723
SELECT + cor0.col2 DIV + 45 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3723
SELECT + cor0.col2 / + 45 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
1

query I rowsort
SELECT ALL 20 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1660
-520
-860

query I rowsort
SELECT tab1.col0 * + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3726
SELECT cor0.col1 * + cor0.col1 + CAST( NULL AS DECIMAL ) 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-3726
SELECT cor0.col1 * + cor0.col1 + CAST ( NULL AS REAL ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT ALL col0 + + tab0.col0 FROM tab0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT + 93 FROM tab1 GROUP BY tab1.col1
----
93
93
93

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 col1 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + cor0.col0 + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT - col1 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT - 30 FROM tab2 GROUP BY col1
----
-30

query I rowsort
SELECT - COALESCE ( col1, cor0.col1 * - cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3738
SELECT CAST( 0 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-3738
SELECT CAST ( 0 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT ALL CASE - cor0.col1 WHEN cor0.col1 THEN NULL ELSE cor0.col1 END FROM tab0 cor0 GROUP BY cor0.col1
----
81
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-3740
SELECT DISTINCT + cor1.col1 DIV 80 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
0

skipif mysql # not compatible
query I rowsort label-3740
SELECT DISTINCT + cor1.col1 / 80 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
0

query I rowsort
SELECT ALL 34 FROM tab0 GROUP BY tab0.col0
----
34
34
34

query I rowsort
SELECT + tab2.col0 * 93 FROM tab2 GROUP BY tab2.col0
----
1395
8463
8556

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 73 * col0 - col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1080
6552
6624

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 + + 19 FROM tab1 GROUP BY col1
----
19
19
19

query I rowsort
SELECT - 88 * 34 AS col0 FROM tab0 GROUP BY col2
----
-2992
-2992
-2992

query I rowsort
SELECT - - 25 FROM tab2 GROUP BY col1
----
25
25
25

onlyif mysql # DIV for integer division: 
query I rowsort label-3748
SELECT ALL 84 DIV col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3748
SELECT ALL 84 / col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
1
1

query I rowsort
SELECT - + 19 AS col2 FROM tab1 GROUP BY tab1.col0
----
-19
-19
-19

query I rowsort
SELECT + col2 * - col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

onlyif mysql # DIV for integer division: 
query I rowsort label-3751
SELECT + + tab2.col1 DIV - 22 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1
-2
-2

skipif mysql # not compatible
query I rowsort label-3751
SELECT + + tab2.col1 / - 22 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1
-2
-2

query I rowsort
SELECT cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
225
8281
8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + NULLIF ( + cor0.col2, - cor0.col2 * COALESCE ( 9, + cor0.col0 * cor0.col1 ) ) * cor0.col2 col1 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT + 84 * 29 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2436
2436
2436

query I rowsort
SELECT - - tab2.col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT + 69 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
150
69

query I rowsort
SELECT ALL - + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT - cor0.col0 + 2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-24
-41
-81

query I rowsort
SELECT 5 FROM tab2 GROUP BY tab2.col1
----
5
5
5

query I rowsort
SELECT ALL + + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col2 - 55 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
-17
-31
24

query I rowsort
SELECT - COALESCE ( - 76, cor0.col0 ) FROM tab0 AS cor0 GROUP BY col0
----
76
76
76

query I rowsort
SELECT 47 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
47
47

query I rowsort
SELECT DISTINCT - 14 FROM tab1 GROUP BY tab1.col0
----
-14

query I rowsort
SELECT ALL + + 68 FROM tab1 GROUP BY tab1.col0
----
68
68
68

query I rowsort
SELECT 74 FROM tab2 GROUP BY tab2.col1
----
74
74
74

query I rowsort
SELECT ALL - 25 AS col2 FROM tab2 GROUP BY tab2.col2
----
-25
-25
-25

query I rowsort
SELECT cor0.col1 + - 55 AS col0 FROM tab0 cor0 GROUP BY col1
----
-55
26

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
182
184
30

query I rowsort
SELECT - 23 FROM tab0 GROUP BY col2
----
-23
-23
-23

onlyif mysql # DIV for integer division: 
query I rowsort label-3771
SELECT 13 DIV + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3771
SELECT 13 / + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT ALL - + 74 * 8 FROM tab0 GROUP BY tab0.col2
----
-592
-592
-592

query I rowsort
SELECT ALL tab2.col2 FROM tab2 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( 74, - cor0.col2, - cor0.col0 * cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
74
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 98 col2 FROM tab0 GROUP BY col0
----
-98
-98
-98

onlyif mysql # DIV for integer division: 
query I rowsort label-3776
SELECT COALESCE ( 77, - cor0.col2 + + cor0.col1 DIV - 24, - cor0.col1 - - cor0.col2 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
77
77

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3776
SELECT COALESCE ( 77, - cor0.col2 + + cor0.col1 / - 24, - cor0.col1 - - cor0.col2 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
77
77

query I rowsort
SELECT + tab2.col0 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL + ( 95 ) * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4180
5415
570

query I rowsort
SELECT + - col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + 95 AS col0 FROM tab0 cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0, cor0.col1
----
95
95
95

query I rowsort
SELECT DISTINCT 26 FROM tab0 cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
26

query I rowsort
SELECT + 91 FROM tab1 GROUP BY tab1.col1
----
91
91
91

query I rowsort
SELECT 41 AS col2 FROM tab0 GROUP BY tab0.col2
----
41
41
41

query I rowsort
SELECT DISTINCT - 15 FROM tab2 GROUP BY col1
----
-15

query I rowsort
SELECT - 82 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-82
-82

query I rowsort
SELECT DISTINCT - - cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL + + tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT + NULLIF ( + 14, + cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
14

query I rowsort
SELECT + cor0.col2 * col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT col1 * - cor0.col2 + - 76 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-124
-2641
-3200

query I rowsort
SELECT - 31 AS col1 FROM tab0 GROUP BY tab0.col2
----
-31
-31
-31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 85 + + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
130
156
93

query I rowsort
SELECT DISTINCT 96 * cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
4224
5472
576

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3796
SELECT DISTINCT CAST( - 60 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-60

skipif mysql # not compatible
query I rowsort label-3796
SELECT DISTINCT CAST ( - 60 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-60

query I rowsort
SELECT DISTINCT tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL 51 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col1
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

query I rowsort
SELECT - - 17 FROM tab0 GROUP BY col0
----
17
17
17

query I rowsort
SELECT 1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT 84 AS col1 FROM tab0 GROUP BY tab0.col1
----
84
84

query I rowsort
SELECT + 8 FROM tab1 GROUP BY tab1.col1
----
8
8
8

query I rowsort
SELECT - tab2.col1 - 88 AS col2 FROM tab2 GROUP BY col1
----
-129
-147
-149

query I rowsort
SELECT 19 - col0 FROM tab1 GROUP BY tab1.col0
----
-3
-63
-9

query I rowsort
SELECT + col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col0 FROM tab1, tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + - NULLIF ( tab1.col0, 71 / 47 ) FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - 56 AS col1 FROM tab0 GROUP BY tab0.col1
----
-56
-56

query I rowsort
SELECT + 22 - - cor0.col0 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col1, col0
----
506
6746
806

query I rowsort
SELECT DISTINCT - ( tab0.col0 ) FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL + - 0 + - 41 AS col1 FROM tab1 GROUP BY tab1.col2
----
-41
-41
-41

query I rowsort
SELECT ALL - ( 93 ) + 75 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-18
-18
-18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - 83 FROM tab0 GROUP BY tab0.col2
----
-83
-83
-83

query I rowsort
SELECT - cor0.col2 * 28 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1260
-1988
-224

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT col2 + col2 * 56 AS col1 FROM tab0 GROUP BY col2
----
1368
2166
4503

query I rowsort
SELECT ALL cor0.col0 + CASE cor0.col1 + + cor0.col0 WHEN 68 * cor0.col1 THEN cor0.col1 END AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + CASE + 13 WHEN + cor0.col0 * - col2 + - 68 / cor0.col0 THEN NULL ELSE cor0.col0 END FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
15
91
92

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3821
SELECT ALL + CAST( NULL AS DECIMAL ) + ( cor0.col0 ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col1, cor0.col0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3821
SELECT ALL + CAST ( NULL AS REAL ) + ( cor0.col0 ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col1, cor0.col0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT 39 AS col1 FROM tab2 GROUP BY tab2.col1
----
39
39
39

query I rowsort
SELECT + 29 * 14 AS col1 FROM tab2 GROUP BY tab2.col2
----
406
406
406

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 92 col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
92
92
92

query I rowsort
SELECT + + tab1.col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL + 95 FROM tab0 GROUP BY col2
----
95
95
95

query I rowsort
SELECT DISTINCT + - 16 AS col2 FROM tab2 GROUP BY tab2.col1
----
-16

query I rowsort
SELECT DISTINCT + 75 - 28 FROM tab0 GROUP BY tab0.col1
----
47

query I rowsort
SELECT cor0.col2 * cor0.col2 + - 79 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3285
6162
7490

query I rowsort
SELECT DISTINCT cor0.col2 + - col0 * + CASE CASE + cor0.col2 WHEN cor0.col0 THEN 55 WHEN - cor0.col0 THEN NULL ELSE - cor0.col0 END WHEN cor0.col2 THEN cor0.col0 END AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
NULL

query I rowsort
SELECT cor1.col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3832
SELECT CAST( NULL AS DECIMAL ) + - 1 * - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3832
SELECT CAST ( NULL AS REAL ) + - 1 * - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 54 AS col1 FROM tab0 GROUP BY tab0.col2
----
54

query I rowsort
SELECT DISTINCT 8 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
352
456
48

query I rowsort
SELECT 0 FROM tab2 GROUP BY col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3836
SELECT col0 DIV cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3836
SELECT col0 / cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

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.col0
----
0
0
0

query I rowsort
SELECT 47 FROM tab1 GROUP BY tab1.col2
----
47
47
47

query I rowsort
SELECT ALL - - 84 FROM tab1 GROUP BY tab1.col1
----
84
84
84

query I rowsort
SELECT DISTINCT + cor0.col0 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 DISTINCT ( cor0.col1 ) + cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL + - col1 AS col0 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab1 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 ALL - 60 col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-60
-60
-60

query I rowsort
SELECT + ( 55 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT + 9 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
9
9
9

query I rowsort
SELECT DISTINCT ( + 28 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
28

query I rowsort
SELECT DISTINCT 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 - 74 col0 FROM tab1 GROUP BY tab1.col2
----
-74
-74
-74

query I rowsort
SELECT DISTINCT - - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT col1 AS col0 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-3853
SELECT ALL tab0.col0 DIV - tab0.col0 FROM tab1 AS cor0 CROSS JOIN tab0 GROUP BY tab0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3853
SELECT ALL tab0.col0 / - tab0.col0 FROM tab1 AS cor0 CROSS JOIN tab0 GROUP BY tab0.col0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 99 col1 FROM tab2 GROUP BY tab2.col0
----
-99
-99
-99

query I rowsort
SELECT NULLIF ( 20, - tab0.col1 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
20
20

onlyif mysql # DIV for integer division: 
query I rowsort label-3856
SELECT + 37 DIV 71 AS col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3856
SELECT + 37 / 71 AS col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT 69 FROM tab0 GROUP BY tab0.col1
----
69
69

query I rowsort
SELECT DISTINCT col2 * - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT - cor0.col1 * - 98 + cor0.col1 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
624
6248
8835

query I rowsort
SELECT - ( cor0.col0 ) * col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT + col0 * + 36 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
1548
2988
936

query I rowsort
SELECT cor0.col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3865
SELECT COALESCE ( 51, - col0 + - cor0.col1, - CASE - cor0.col1 WHEN + cor0.col1 + - 44 THEN NULL WHEN cor0.col2 THEN + cor0.col1 + - CASE + COALESCE ( + col0, - col1 ) WHEN COALESCE ( + cor0.col1, cor0.col0 / CAST( 7 AS SIGNED ) ) * + cor0.col1 THEN + cor0.col0 END * - cor0.col0 WHEN cor0.col1 THEN NULL WHEN cor0.col0 THEN NULL END ) * 78 FROM tab2 cor0 GROUP BY cor0.col2
----
3978
3978
3978

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3865
SELECT COALESCE ( 51, - col0 + - cor0.col1, - CASE - cor0.col1 WHEN + cor0.col1 + - 44 THEN NULL WHEN cor0.col2 THEN + cor0.col1 + - CASE + COALESCE ( + col0, - col1 ) WHEN COALESCE ( + cor0.col1, cor0.col0 / CAST ( 7 AS INTEGER ) ) * + cor0.col1 THEN + cor0.col0 END * - cor0.col0 WHEN cor0.col1 THEN NULL WHEN cor0.col0 THEN NULL END ) * 78 FROM tab2 cor0 GROUP BY cor0.col2
----
3978
3978
3978

query I rowsort
SELECT DISTINCT 11 + cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
33
39
93

query I rowsort
SELECT ALL + + 35 AS col2 FROM tab2 GROUP BY tab2.col2
----
35
35
35

onlyif mysql # DIV for integer division: 
query I rowsort label-3868
SELECT COALESCE ( cor0.col2, - cor0.col2 DIV + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif mysql # not compatible
query I rowsort label-3868
SELECT COALESCE ( cor0.col2, - cor0.col2 / + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + 79 FROM tab1 GROUP BY tab1.col2
----
79
79
79

query I rowsort
SELECT 91 AS col1 FROM tab0 GROUP BY tab0.col0
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 76 col0 FROM tab2 GROUP BY tab2.col1
----
-76
-76
-76

onlyif mysql # DIV for integer division: 
query I rowsort label-3872
SELECT cor0.col1 DIV - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1, cor0.col1
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-3872
SELECT cor0.col1 / - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1, cor0.col1
----
-3
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3873
SELECT DISTINCT - CAST( 11 AS SIGNED ) * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-495
-781
-88

skipif mysql # not compatible
query I rowsort label-3873
SELECT DISTINCT - CAST ( 11 AS INTEGER ) * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-495
-781
-88

query I rowsort
SELECT + 38 AS col1 FROM tab1 GROUP BY col2
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( cor0.col0 ) col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - 68 + 4 FROM tab0 GROUP BY tab0.col0
----
-64

query I rowsort
SELECT 4 - - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
10
48
61

query I rowsort
SELECT ( 3 ) AS col2 FROM tab2 GROUP BY tab2.col1
----
3
3
3

onlyif mysql # DIV for integer division: 
query I rowsort label-3880
SELECT 5 DIV - 17 + + 96 FROM tab0 AS cor0 GROUP BY cor0.col2
----
96
96
96

skipif mysql # not compatible
query I rowsort label-3880
SELECT 5 / - 17 + + 96 FROM tab0 AS cor0 GROUP BY cor0.col2
----
96
96
96

query I rowsort
SELECT + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT - tab1.col1 * - 43 FROM tab1 GROUP BY tab1.col1
----
1892
2451
258

query I rowsort
SELECT 74 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1628
2072
6068

query I rowsort
SELECT + + col0 AS col2 FROM tab1 GROUP BY col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * + cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT - col1 - col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-105
-38
-79

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( - 38, cor0.col2, col1 + 90 * + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-38
-38
-38

query I rowsort
SELECT 79 FROM tab0 GROUP BY tab0.col1
----
79
79

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - + 38 AS col0 FROM tab2 GROUP BY tab2.col0
----
-38
-38
-38

query I rowsort
SELECT DISTINCT cor0.col1 * - 17 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-656
-944
-976

query I rowsort
SELECT + + 37 FROM tab0 GROUP BY col0
----
37
37
37

query I rowsort
SELECT + ( 51 ) FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
51
51

query I rowsort
SELECT ALL ( col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - 29 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
-29
-29
-29

query I rowsort
SELECT DISTINCT 4 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
4

query I rowsort
SELECT 90 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
5220
7110
7830

query I rowsort
SELECT DISTINCT - 68 AS col1 FROM tab0 GROUP BY col2
----
-68

query I rowsort
SELECT ALL 14 AS col1 FROM tab1 GROUP BY col0
----
14
14
14

query I rowsort
SELECT DISTINCT 67 FROM tab2 GROUP BY col1
----
67

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3901
SELECT + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3901
SELECT + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * + 69 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1656
2622
5451

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 48 * 55 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
2640
2640
2640

query I rowsort
SELECT ALL + 16 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col1
----
16
16
16

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3905
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-3905
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col1
----
41
59
61

query I rowsort
SELECT + 0 AS col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL + 81 FROM tab1 GROUP BY col0
----
81
81
81

query I rowsort
SELECT DISTINCT + 61 AS col0 FROM tab0 GROUP BY col2
----
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 96 * - cor0.col1 + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-4180
-5415
-570

query I rowsort
SELECT ALL col0 * 43 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1118
1849
3569

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL col2 * - 46 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2668
-3634
-4002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - col2 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 1 FROM tab0 GROUP BY col1
----
-1

query I rowsort
SELECT ALL NULLIF ( NULLIF ( - cor0.col0, - cor0.col0 ), - col0 ) FROM tab1 cor0 GROUP BY cor0.col1, col0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 85 AS col1 FROM tab0 GROUP BY tab0.col1
----
-85
-85

query I rowsort
SELECT 38 + + 95 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
2508
4123
7923

query I rowsort
SELECT 65 - 95 FROM tab2 GROUP BY tab2.col1
----
-30
-30
-30

query I rowsort
SELECT - 25 - + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-104
-49
-63

query I rowsort
SELECT - cor0.col0 * 42 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3822
-3864
-630

query I rowsort
SELECT ALL + 6 FROM tab1 GROUP BY tab1.col1
----
6
6
6

query I rowsort
SELECT DISTINCT 81 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
81

query I rowsort
SELECT ALL + 80 AS col2 FROM tab0 GROUP BY col0
----
80
80
80

query I rowsort
SELECT + 55 AS col0 FROM tab2 GROUP BY tab2.col0
----
55
55
55

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( - 85, + cor0.col2 + + 3 * + cor0.col0, 58, + cor0.col1 + ( cor0.col2 - cor0.col0 ) ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-85

query I rowsort
SELECT DISTINCT - cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor1.col1
----
-41
-59
-61

query I rowsort
SELECT + 26 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2366
2392
390

query I rowsort
SELECT - + tab1.col1 - + tab1.col1 FROM tab1 GROUP BY col1
----
-114
-12
-88

query I rowsort
SELECT 1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT 73 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
73
73

query I rowsort
SELECT + 41 AS col1 FROM tab1 GROUP BY col0
----
41
41
41

query I rowsort
SELECT ALL + - 44 FROM tab1 GROUP BY tab1.col2
----
-44
-44
-44

query I rowsort
SELECT NULLIF ( + tab2.col0, tab2.col0 ) * + 93 + 6 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 19 * + col1 FROM tab1 GROUP BY tab1.col1
----
1083
114
836

query I rowsort
SELECT 99 AS col0 FROM tab1 GROUP BY tab1.col0
----
99
99
99

query I rowsort
SELECT DISTINCT + + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT 69 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
69
69
69

query I rowsort
SELECT ALL + 2 AS col2 FROM tab2 GROUP BY tab2.col0
----
2
2
2

query I rowsort
SELECT - CASE - cor0.col2 WHEN - cor0.col2 - + cor0.col1 THEN NULL ELSE + col2 + - col2 END AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3943
SELECT CAST( col1 AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-3943
SELECT CAST ( col1 AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY col1, col1
----
-1936
-3249
-36

query I rowsort
SELECT 76 AS col2 FROM tab2 GROUP BY tab2.col1
----
76
76
76

query I rowsort
SELECT DISTINCT 44 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
44

query I rowsort
SELECT ALL - + 62 AS col1 FROM tab2 GROUP BY col0
----
-62
-62
-62

query I rowsort
SELECT DISTINCT - 54 FROM tab1 GROUP BY tab1.col2
----
-54

query I rowsort
SELECT 80 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
80
80
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 41 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-41

query I rowsort
SELECT DISTINCT + + 4 AS col2 FROM tab1 GROUP BY tab1.col0
----
4

query I rowsort
SELECT tab2.col1 * ( 74 ) AS col1 FROM tab2 GROUP BY col1
----
3034
4366
4514

query I rowsort
SELECT DISTINCT + 96 * 81 AS col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
7776

query I rowsort
SELECT ALL cor1.col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT DISTINCT tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL CASE - cor0.col2 WHEN cor0.col2 THEN + cor0.col1 ELSE NULL END * cor0.col1 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT tab2.col0 - - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
182
184
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 36 col1 FROM tab1 GROUP BY col0
----
-36
-36
-36

query I rowsort
SELECT DISTINCT - 43 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1118
1849
3569

query I rowsort
SELECT DISTINCT + - col1 * 32 FROM tab2 GROUP BY tab2.col1
----
-1312
-1888
-1952

query I rowsort
SELECT cor0.col1 + 64 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
108
121
70

query I rowsort
SELECT DISTINCT cor0.col2 * - 31 AS col0 FROM tab0 cor0 GROUP BY col2
----
-1178
-2449
-744

query I rowsort
SELECT ALL - cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col2
----
9 values hashing to a28a9a955c366855d054ae16e20e38ff

query I rowsort
SELECT 41 AS col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
41
41
41

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT ALL - 79 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor1.col0, cor1.col2
----
9 values hashing to 1b7b0b34fe3431fb409719624d12791f

query I rowsort
SELECT ALL + 2 + col0 FROM tab2 GROUP BY tab2.col0
----
17
93
94

query I rowsort
SELECT + 73 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
3212
4161
438

query I rowsort
SELECT + + ( - tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - cor1.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-3977
SELECT + ( + cor0.col2 ) DIV - 4 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-19
-6
-9

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3977
SELECT + ( + cor0.col2 ) / - 4 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-19
-6
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 84 col1 FROM tab0 GROUP BY col2
----
84
84
84

query I rowsort
SELECT DISTINCT + 71 AS col1 FROM tab0 GROUP BY tab0.col2
----
71

query I rowsort
SELECT ALL col0 - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + 86 AS col0 FROM tab2 GROUP BY tab2.col2
----
86
86
86

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

query I rowsort
SELECT DISTINCT - 12 * - 15 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
180

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 61 * - tab2.col1 col2 FROM tab2 GROUP BY col1
----
-2501
-3599
-3721

query I rowsort
SELECT DISTINCT - col1 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3772
-5369
-915

query I rowsort
SELECT + ( cor1.col0 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT + NULLIF ( + 9, + col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
9
9
9

query I rowsort
SELECT DISTINCT + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL + + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL ( - cor0.col0 ) AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

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 DISTINCT - 19 * cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-1577
-494
-817

query I rowsort
SELECT + cor0.col2 * + 30 + + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
1395
2201
248

query I rowsort
SELECT + cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - + 52 AS col1 FROM tab1 GROUP BY tab1.col2
----
-52

query I rowsort
SELECT - 73 AS col1 FROM tab1 GROUP BY tab1.col2
----
-73
-73
-73

query I rowsort
SELECT ALL 43 AS col0 FROM tab0 GROUP BY tab0.col0
----
43
43
43

query I rowsort
SELECT - 33 + - 3 AS col0 FROM tab1 GROUP BY tab1.col0
----
-36
-36
-36

query I rowsort
SELECT + 48 FROM tab2 GROUP BY tab2.col0
----
48
48
48

query I rowsort
SELECT 51 FROM tab0 GROUP BY tab0.col1
----
51
51

query I rowsort
SELECT 51 * 80 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4088
4125
4151

query I rowsort
SELECT ALL 59 AS col1 FROM tab2 GROUP BY tab2.col0
----
59
59
59

query I rowsort
SELECT DISTINCT - 16 * + 8 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-128

query I rowsort
SELECT 19 FROM tab1 GROUP BY col1
----
19
19
19

onlyif mysql # DIV for integer division: 
query I rowsort label-4006
SELECT tab1.col0 DIV tab1.col0 FROM tab1 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4006
SELECT tab1.col0 / tab1.col0 FROM tab1 GROUP BY col0
----
1
1
1

query I rowsort
SELECT DISTINCT cor1.col0 - + cor0.col0 * cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col0
----
9 values hashing to 92c3679a639eb3b3c4c24ba1f1e592ef

query I rowsort
SELECT ( 76 ) FROM tab1 GROUP BY tab1.col2
----
76
76
76

query I rowsort
SELECT - NULLIF ( 95, + tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
-95
-95
-95

query I rowsort
SELECT DISTINCT + COALESCE ( COALESCE ( cor0.col0, 87 * cor0.col2 ), + cor0.col0 + cor0.col0 * + cor0.col0, + 70 * - cor0.col1 ) * - ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-225
-8281
-8464

query I rowsort
SELECT - ( - 97 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
97
97
97

onlyif mysql # DIV for integer division: 
query I rowsort label-4012
SELECT - cor0.col2 + cor0.col0 DIV 5 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-40
-61
-84

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4012
SELECT - cor0.col2 + cor0.col0 / 5 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-40
-61
-84

query I rowsort
SELECT DISTINCT col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
118
122
82

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col0
----
24
38
79

query I rowsort
SELECT DISTINCT + 59 * + 80 FROM tab2 GROUP BY tab2.col0
----
4720

query I rowsort
SELECT DISTINCT ( - 9 ) FROM tab1 GROUP BY tab1.col1
----
-9

query I rowsort
SELECT ALL + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-4018
SELECT COALESCE ( cor0.col2, + 58, cor0.col1 DIV cor0.col0 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4018
SELECT COALESCE ( cor0.col2, + 58, cor0.col1 / cor0.col0 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - ( 56 ) AS col2 FROM tab1 GROUP BY col2
----
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 * 51 col2 FROM tab0 GROUP BY col0
----
1326
2193
4233

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col1 * cor1.col1 col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col1
----
0
0
6561

query I rowsort
SELECT cor0.col0 * 21 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1743
546
903

query I rowsort
SELECT DISTINCT 91 FROM tab1 GROUP BY tab1.col1
----
91

query I rowsort
SELECT - ( - 31 ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
31
31
31

query I rowsort
SELECT ALL cor1.col0 AS col2 FROM tab1 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 DISTINCT + cor0.col0 + - COALESCE ( cor0.col0, cor0.col0 * + cor0.col0 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT - 69 * + tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-4002
-5451
-6003

query I rowsort
SELECT DISTINCT - 4 * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
324

query I rowsort
SELECT + 78 * + tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
3432
4446
468

query I rowsort
SELECT + col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT 31 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1271
-1829
-1891

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT ALL 87 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT DISTINCT - col1 * - ( cor0.col1 ) + - 68 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-68
6493

query I rowsort
SELECT - cor0.col0 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - + tab0.col0 * col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL 14 - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-31
-57
6

query I rowsort
SELECT ALL - 31 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-31
-31
-31

query I rowsort
SELECT ( - 62 ) + + col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-62
19

query I rowsort
SELECT DISTINCT - col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - 32 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-32

query I rowsort
SELECT + 41 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col0, col2, cor0.col0
----
2378
3239
3567

query I rowsort
SELECT col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT col2 * cor0.col2 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3422
6320
7656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 20 + cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
44
58
99

query I rowsort
SELECT DISTINCT 20 FROM tab1 GROUP BY tab1.col1
----
20

query I rowsort
SELECT DISTINCT ( - 60 ) FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-60

query I rowsort
SELECT ALL - cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4049
SELECT DISTINCT 56 DIV - cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1
-9
0

skipif mysql # not compatible
query I rowsort label-4049
SELECT DISTINCT 56 / - cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1
-9
0

query I rowsort
SELECT col1 AS col2 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - + tab0.col1 * col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT - 58 FROM tab2 GROUP BY tab2.col1
----
-58
-58
-58

query I rowsort
SELECT + tab0.col0 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( ( + 3 ) ) AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-3

query I rowsort
SELECT ALL + - cor0.col2 FROM tab1, tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + 51 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
51
51
51

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col2 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
1008
1975
3116

query I rowsort
SELECT 88 AS col2 FROM tab0 GROUP BY tab0.col1
----
88
88

query I rowsort
SELECT ALL + 95 AS col0 FROM tab0 GROUP BY tab0.col0
----
95
95
95

query I rowsort
SELECT + 34 AS col1 FROM tab2 GROUP BY tab2.col2
----
34
34
34

query I rowsort
SELECT + 17 FROM tab2 GROUP BY tab2.col2
----
17
17
17

query I rowsort
SELECT ALL + + 14 AS col0 FROM tab0 GROUP BY tab0.col1
----
14
14

query I rowsort
SELECT DISTINCT 56 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
56

query I rowsort
SELECT cor0.col0 + 57 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
139
79
85

query I rowsort
SELECT - - tab0.col1 * - 96 AS col0 FROM tab0 GROUP BY tab0.col1
----
-7776
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 43 + - 94 col0 FROM tab1 GROUP BY tab1.col0
----
-51
-51
-51

onlyif mysql # DIV for integer division: 
query I rowsort label-4068
SELECT COALESCE ( 76, - tab1.col1 DIV - col0 ) FROM tab1 GROUP BY tab1.col1
----
76
76
76

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4068
SELECT COALESCE ( 76, - tab1.col1 / - col0 ) FROM tab1 GROUP BY tab1.col1
----
76
76
76

onlyif mysql # DIV for integer division: 
query I rowsort label-4069
SELECT + cor0.col0 DIV + COALESCE ( - 39, cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4069
SELECT + cor0.col0 / + COALESCE ( - 39, cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2
0
0

query I rowsort
SELECT DISTINCT - tab1.col0 * 68 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1474
-1876
-5494

query I rowsort
SELECT + - col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT 55 - + tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
-28
12
29

query I rowsort
SELECT 80 AS col0 FROM tab1 GROUP BY tab1.col2
----
80
80
80

query I rowsort
SELECT DISTINCT ( 34 ) AS col0 FROM tab2 GROUP BY tab2.col0
----
34

query I rowsort
SELECT + ( + CASE col2 WHEN cor0.col2 + cor0.col1 * - cor0.col2 THEN NULL WHEN - cor0.col1 THEN NULL WHEN ( cor0.col2 ) * + cor0.col2 THEN cor0.col0 / cor0.col2 END ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col1 + + cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1980
3306
42

query I rowsort
SELECT - - 14 AS col0 FROM tab2 GROUP BY tab2.col1
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 63 * - tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
2583
3717
3843

query I rowsort
SELECT DISTINCT + 43 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
43

query I rowsort
SELECT DISTINCT - 92 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-92

query I rowsort
SELECT + 82 FROM tab1 GROUP BY col0
----
82
82
82

query I rowsort
SELECT - - 8 AS col2 FROM tab0 GROUP BY tab0.col1
----
8
8

query I rowsort
SELECT DISTINCT - + 16 FROM tab2 GROUP BY col1
----
-16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 83 col2 FROM tab1 GROUP BY tab1.col2
----
83
83
83

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
138
148
99

query I rowsort
SELECT DISTINCT 25 FROM tab0 GROUP BY tab0.col1
----
25

query I rowsort
SELECT ALL tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + cor1.col0 AS col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT - 81 FROM tab1 GROUP BY tab1.col0
----
-81
-81
-81

query I rowsort
SELECT ALL + col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 3 ) col1 FROM tab0 GROUP BY tab0.col0
----
3
3
3

query I rowsort
SELECT DISTINCT - + ( tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - + 29 FROM tab1 GROUP BY col1
----
-29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT NULLIF ( - col2, cor0.col1 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT CASE col2 WHEN + 52 THEN - 52 * cor0.col2 END col0 FROM tab1 cor0 GROUP BY col2, cor0.col2
----
NULL
NULL
NULL

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 + 94 * + 74 AS col0 FROM tab1 GROUP BY tab1.col0
----
6956
6956
6956

query I rowsort
SELECT ALL - cor0.col0 * 48 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
-4368
-4416
-720

query I rowsort
SELECT ALL cor0.col0 * 30 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2730
2760
450

query I rowsort
SELECT cor0.col2 - + 78 * - 32 FROM tab0 AS cor0 GROUP BY col2
----
2520
2534
2575

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 39 + - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-18
-5
33

query I rowsort
SELECT DISTINCT cor1.col2 AS col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4104
SELECT DISTINCT - - col2 * - CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-4104
SELECT DISTINCT - - col2 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT ( - COALESCE ( + 12, - tab2.col1 ) ) FROM tab2 GROUP BY col2
----
-12

query I rowsort
SELECT - 65 AS col0 FROM tab2 GROUP BY tab2.col0
----
-65
-65
-65

query I rowsort
SELECT + - col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT ALL + cor1.col1 AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT 42 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
42
42
42

query I rowsort
SELECT - col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT + 59 * cor1.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
1534
2537
4897

query I rowsort
SELECT 86 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
86
86
86

query I rowsort
SELECT 41 AS col0 FROM tab2 GROUP BY col2
----
41
41
41

query I rowsort
SELECT ALL + + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-2565
-3124
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 78 col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + + col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor0.col0
----
22
22
28
28
82
82

query I rowsort
SELECT - tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 14 col1 FROM tab0 GROUP BY tab0.col0
----
14

query I rowsort
SELECT ALL 29 FROM tab0 GROUP BY tab0.col2
----
29
29
29

query I rowsort
SELECT + 9 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
9
9
9

query I rowsort
SELECT - 5 FROM tab0 GROUP BY tab0.col0
----
-5
-5
-5

query I rowsort
SELECT - 62 * - 9 AS col2 FROM tab1 GROUP BY tab1.col0
----
558
558
558

query I rowsort
SELECT DISTINCT + - 30 AS col2 FROM tab2 GROUP BY tab2.col1
----
-30

query I rowsort
SELECT ALL col0 - - 58 AS col2 FROM tab1 GROUP BY tab1.col0
----
140
80
86

query I rowsort
SELECT ALL ( col0 ) AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0, cor0.col2
----
9 values hashing to 66267ca705f58a4488972e09499aeb2b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - CASE cor0.col2 WHEN cor0.col2 THEN col2 ELSE cor0.col2 END col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT ( 17 ) FROM tab0 cor0 GROUP BY col1
----
17

query I rowsort
SELECT 56 * - 18 FROM tab0 GROUP BY tab0.col2
----
-1008
-1008
-1008

query I rowsort
SELECT 9 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
9
90

query I rowsort
SELECT DISTINCT + ( + 55 ) FROM tab2 GROUP BY tab2.col2
----
55

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

query I rowsort
SELECT DISTINCT + 52 FROM tab2 GROUP BY col0
----
52

query I rowsort
SELECT DISTINCT - 37 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
-37

query I rowsort
SELECT + + 68 + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
112
125
74

query I rowsort
SELECT ALL - col2 * + 8 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-360
-568
-64

query I rowsort
SELECT DISTINCT + 10 FROM tab1 GROUP BY tab1.col1
----
10

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 32, - cor0.col2 * cor0.col1, + cor0.col0 ) FROM tab1 AS cor0 GROUP BY col0
----
32
32
32

query I rowsort
SELECT + 66 + 42 FROM tab1 AS cor0 GROUP BY cor0.col1
----
108
108
108

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4145
SELECT - CAST( cor0.col0 AS SIGNED ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
-26
-43
-83

skipif mysql # not compatible
query I rowsort label-4145
SELECT - CAST ( cor0.col0 AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor1.col0 col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - tab0.col0 + - 67 FROM tab0 GROUP BY tab0.col0
----
-110
-150
-93

query I rowsort
SELECT ALL + ( tab2.col0 ) FROM tab2 GROUP BY col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - ( + cor0.col2 ) * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT + 1 FROM tab1 GROUP BY col0
----
1
1
1

query I rowsort
SELECT + tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT - 39 AS col1 FROM tab0 GROUP BY col0
----
-39

query I rowsort
SELECT ALL - 14 FROM tab0 GROUP BY tab0.col1
----
-14
-14

query I rowsort
SELECT ALL - 72 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-72
-72
-72

query I rowsort
SELECT ALL 23 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT DISTINCT + 16 FROM tab1 GROUP BY tab1.col0
----
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - - tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + tab2.col2 * tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT + + col0 + 60 FROM tab0 GROUP BY col0
----
103
143
86

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4163
SELECT + + tab1.col0 + tab1.col0 DIV col0 FROM tab1 GROUP BY tab1.col0
----
23
29
83

skipif mysql # not compatible
query I rowsort label-4163
SELECT + + tab1.col0 + tab1.col0 / col0 FROM tab1 GROUP BY tab1.col0
----
23
29
83

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col2 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-2053
-5123
-86

query I rowsort
SELECT cor0.col1 * - 39 - cor0.col1 * - 37 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-162
0

query I rowsort
SELECT - 82 FROM tab0 GROUP BY tab0.col2
----
-82
-82
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 - cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL - - col1 AS col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT cor0.col2 + 8 FROM tab0 cor0 GROUP BY cor0.col2
----
32
46
87

query I rowsort
SELECT + 76 AS col2 FROM tab1 GROUP BY tab1.col1
----
76
76
76

query I rowsort
SELECT + 98 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT 16 AS col1 FROM tab2 GROUP BY tab2.col2
----
16
16
16

query I rowsort
SELECT ( + 95 ) AS col1 FROM tab1 GROUP BY col2
----
95
95
95

query I rowsort
SELECT + 79 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
2054
3397
6557

query I rowsort
SELECT ALL 30 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
2730
2760
450

query I rowsort
SELECT ALL - + 90 FROM tab2 GROUP BY tab2.col2
----
-90
-90
-90

query I rowsort
SELECT cor0.col1 - ( - 91 + col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 18 col2 FROM tab1 GROUP BY tab1.col2
----
-18
-18
-18

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4179
SELECT DISTINCT - + CAST( 71 AS SIGNED ) col0 FROM tab2 GROUP BY tab2.col1
----
-71

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4179
SELECT DISTINCT - + CAST ( 71 AS INTEGER ) col0 FROM tab2 GROUP BY tab2.col1
----
-71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 + + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1980
3306
42

query I rowsort
SELECT tab0.col1 + 87 * - 25 FROM tab0 GROUP BY tab0.col1
----
-2094
-2175

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT COALESCE ( + cor0.col0, cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT tab2.col1 + - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT 11 + cor0.col1 * cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor0.col1, cor0.col0
----
9 values hashing to d01903d2d3ffcb8c203511a2acc1294c

query I rowsort
SELECT + 47 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col0
----
47
47
47

query I rowsort
SELECT ALL tab1.col1 + 99 FROM tab1 GROUP BY col1
----
105
143
156

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1 AS cor0 WHERE NOT - cor0.col2 IS NOT NULL OR NOT NULL NOT IN ( cor0.col1 * col1 ) GROUP BY cor0.col2
----

query I rowsort
SELECT cor1.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col1
----
9 values hashing to a7fc3d55de9b3e11322658ec587831cf

query I rowsort
SELECT + col1 * - ( + 87 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3567
-5133
-5307

onlyif mysql # DIV for integer division: 
query I rowsort label-4192
SELECT DISTINCT - col2 - + cor0.col2 DIV col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-25
-39
-80

skipif mysql # not compatible
query I rowsort label-4192
SELECT DISTINCT - col2 - + cor0.col2 / col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-25
-39
-80

onlyif mysql # DIV for integer division: 
query I rowsort label-4193
SELECT DISTINCT cor0.col1 + cor0.col1 DIV - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
40
58
60

skipif mysql # not compatible
query I rowsort label-4193
SELECT DISTINCT cor0.col1 + cor0.col1 / - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
40
58
60

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL 50 + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-41
-42
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT + - 85 FROM tab2 GROUP BY tab2.col2
----
-85

query I rowsort
SELECT DISTINCT tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-4200
SELECT DISTINCT + tab0.col2 DIV - 48 FROM tab0 GROUP BY tab0.col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-4200
SELECT DISTINCT + tab0.col2 / - 48 FROM tab0 GROUP BY tab0.col2
----
-1
0

query I rowsort
SELECT - - 35 AS col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col1
----
35
35
35

query I rowsort
SELECT DISTINCT 16 FROM tab0 GROUP BY tab0.col0
----
16

query I rowsort
SELECT ( 7 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT - ( col0 ) AS col1 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT - - col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - 5 AS col0 FROM tab0 GROUP BY col2
----
-5
-5
-5

onlyif mysql # DIV for integer division: 
query I rowsort label-4207
SELECT + tab1.col2 DIV - 67 FROM tab1 GROUP BY tab1.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4207
SELECT + tab1.col2 / - 67 FROM tab1 GROUP BY tab1.col2
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 27 col1 FROM tab0 GROUP BY tab0.col2
----
27

query I rowsort
SELECT DISTINCT - - 59 AS col1 FROM tab0 GROUP BY tab0.col0
----
59

onlyif mysql # DIV for integer division: 
query I rowsort label-4210
SELECT 13 DIV 74 AS col2 FROM tab1 GROUP BY tab1.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4210
SELECT 13 / 74 AS col2 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 48 * 0 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT DISTINCT 13 AS col2 FROM tab0 GROUP BY tab0.col1
----
13

query I rowsort
SELECT DISTINCT 14 FROM tab1 GROUP BY tab1.col1
----
14

query I rowsort
SELECT ALL 24 FROM tab2 GROUP BY col0
----
24
24
24

query I rowsort
SELECT ALL - 68 FROM tab0 GROUP BY tab0.col0
----
-68
-68
-68

query I rowsort
SELECT - 40 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-40
-40

query I rowsort
SELECT DISTINCT - 18 AS col1 FROM tab1 GROUP BY tab1.col1
----
-18

query I rowsort
SELECT ALL + CASE - 81 WHEN + 0 THEN + cor0.col2 * ( + cor0.col2 ) END AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - - 32 AS col2 FROM tab0 GROUP BY tab0.col0
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 * + col2 col2 FROM tab0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT 2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
2
2
2

query I rowsort
SELECT - tab0.col1 * 75 FROM tab0 GROUP BY tab0.col1
----
-6075
0

query I rowsort
SELECT - 93 + 49 FROM tab2 GROUP BY tab2.col2
----
-44
-44
-44

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 62, cor0.col1 ) AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
62
62
62

query I rowsort
SELECT ALL - 24 * + 56 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-1344
-1344
-1344

query I rowsort
SELECT ( - tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT CASE cor0.col1 WHEN - cor0.col1 THEN cor0.col1 WHEN cor0.col1 + - 54 THEN NULL ELSE NULL END AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + 38 FROM tab2 GROUP BY tab2.col1
----
38
38
38

query I rowsort
SELECT 11 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
11
11
11

query I rowsort
SELECT ALL CASE cor0.col2 WHEN cor0.col2 THEN cor0.col2 ELSE NULL END AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 + 29 * 22 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
679
697
699

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * 67 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2747
3953
4087

query I rowsort
SELECT 44 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1144
1892
3652

query I rowsort
SELECT ALL - 78 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-78
-78
-78

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 29, - col1 + NULLIF ( + cor0.col0 + - 92, - cor0.col1 ) * 75, + 9, + cor0.col1 + + cor0.col0 ) + + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
110
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 56 + tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
-41
35
36

query I rowsort
SELECT + - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-4238
SELECT DISTINCT - - 75 DIV 13 AS col0 FROM tab2 GROUP BY tab2.col1
----
5

skipif mysql # not compatible
query I rowsort label-4238
SELECT DISTINCT - - 75 / 13 AS col0 FROM tab2 GROUP BY tab2.col1
----
5

query I rowsort
SELECT tab1.col2 - - 10 FROM tab1 GROUP BY col2
----
18
55
81

query I rowsort
SELECT + ( + col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT 60 - - col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
101
119
121

query I rowsort
SELECT ALL - + col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 57 * - 24 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1368
-1368
-1368

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 54, cor0.col0 + - cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-54
-54
-54

query I rowsort
SELECT - 81 FROM tab2 GROUP BY tab2.col0
----
-81
-81
-81

query I rowsort
SELECT cor1.col0 * 39 + - 78 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
1014
3120
780

query I rowsort
SELECT ALL cor0.col2 * col2 + + 50 * - col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-225
-336
1491

query I rowsort
SELECT ALL ( cor0.col1 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

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 cor0.col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT - - 65 FROM tab1 GROUP BY col0
----
65

query I rowsort
SELECT DISTINCT - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4254
SELECT DISTINCT - cor0.col2 * CASE 41 WHEN + 82 THEN col1 DIV 13 ELSE 38 END AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1710
-2698
-304

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4254
SELECT DISTINCT - cor0.col2 * CASE 41 WHEN + 82 THEN col1 / 13 ELSE 38 END AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1710
-2698
-304

query I rowsort
SELECT DISTINCT 79 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
79

onlyif mysql # DIV for integer division: 
query I rowsort label-4256
SELECT - 78 DIV 64 FROM tab2 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4256
SELECT - 78 / 64 FROM tab2 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT 89 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
89
89
89

query I rowsort
SELECT ALL - 58 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-58
-58
-58

query I rowsort
SELECT ALL cor0.col2 * 19 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1102
1501
1653

query I rowsort
SELECT ALL + 84 AS col1 FROM tab0 GROUP BY tab0.col2
----
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 50 col2 FROM tab0 GROUP BY col2
----
-50

query I rowsort
SELECT ALL cor0.col0 - - 45 FROM tab2 AS cor0 GROUP BY cor0.col0
----
136
137
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col2 ) col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 53 AS col1 FROM tab2 GROUP BY tab2.col1
----
53

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 DISTINCT 26 AS col2 FROM tab0 GROUP BY tab0.col2
----
26

query I rowsort
SELECT DISTINCT 68 FROM tab2 GROUP BY col0
----
68

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4268
SELECT DISTINCT COALESCE ( - 46, cor0.col1, + cor0.col2, cor0.col2 * cor0.col1 - + col0 ) * + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4268
SELECT DISTINCT COALESCE ( - 46, cor0.col1, + cor0.col2, cor0.col2 * cor0.col1 - + col0 ) * + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + - 93 FROM tab2 GROUP BY tab2.col1
----
-93

query I rowsort
SELECT + + 4 FROM tab2 GROUP BY tab2.col0
----
4
4
4

query I rowsort
SELECT ALL + cor0.col1 * 52 + + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2173
3127
3233

query I rowsort
SELECT NULLIF ( cor0.col2, + cor0.col2 * cor0.col2 ) * 82 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1968
3116
6478

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 6 col2 FROM tab2 GROUP BY tab2.col0
----
-6
-6
-6

query I rowsort
SELECT DISTINCT 39 * tab1.col2 FROM tab1 GROUP BY col2
----
1755
2769
312

query I rowsort
SELECT DISTINCT - 93 * - 44 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
4092

query I rowsort
SELECT + cor0.col0 * - 50 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-1300
-2150
-4150

query I rowsort
SELECT - 13 FROM tab0 GROUP BY tab0.col2
----
-13
-13
-13

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT CASE 75 WHEN - 96 THEN - cor0.col1 * - ( cor0.col0 ) WHEN cor0.col0 THEN NULL END FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col0 * ( cor0.col0 * + cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3375
-753571
-778688

query I rowsort
SELECT cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT DISTINCT - 39 AS col1 FROM tab2 GROUP BY col1
----
-39

query I rowsort
SELECT ALL + cor0.col0 + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
102
150
170

query I rowsort
SELECT ALL + CASE cor0.col1 WHEN - 29 / cor0.col1 THEN NULL ELSE + 5 END AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
5
5
5

query I rowsort
SELECT 63 * - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-5733
-5796
-945

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4287
SELECT + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4287
SELECT + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 76 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
76
76
76

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - 33 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-33
-33
-33

onlyif mysql # DIV for integer division: 
query I rowsort label-4292
SELECT DISTINCT - 90 DIV - 15 FROM tab1 GROUP BY col0
----
6

skipif mysql # not compatible
query I rowsort label-4292
SELECT DISTINCT - 90 / - 15 FROM tab1 GROUP BY col0
----
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 47 + tab2.col0 col1 FROM tab2 GROUP BY col0
----
138
139
62

query I rowsort
SELECT + tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL + col1 * + 50 FROM tab0 GROUP BY tab0.col1
----
0
4050

query I rowsort
SELECT ALL + + 93 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1395
8463
8556

query I rowsort
SELECT ALL 56 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
56
56
56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4298
SELECT + CAST( NULL AS SIGNED ) + - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4298
SELECT + CAST ( NULL AS INTEGER ) + - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + NULLIF ( cor0.col1, cor0.col1 / - 56 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor1.col1
----
-41
-59
-61

query I rowsort
SELECT 98 AS col2 FROM tab0 GROUP BY tab0.col2
----
98
98
98

query I rowsort
SELECT - - 6 AS col2 FROM tab2 GROUP BY tab2.col2
----
6
6
6

query I rowsort
SELECT cor0.col1 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2378
4661
5307

query I rowsort
SELECT ALL + + 7 AS col1 FROM tab2 GROUP BY tab2.col1
----
7
7
7

query I rowsort
SELECT ALL + 41 AS col2 FROM tab1 GROUP BY tab1.col0
----
41
41
41

query I rowsort
SELECT 63 * col0 FROM tab1 GROUP BY col0
----
1386
1764
5166

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 47, col2 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
47
47

query I rowsort
SELECT - tab0.col2 * 68 AS col0 FROM tab0 GROUP BY col2
----
-1632
-2584
-5372

onlyif mysql # DIV for integer division: 
query I rowsort label-4309
SELECT + cor0.col1 DIV cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4309
SELECT + cor0.col1 / cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
1

query I rowsort
SELECT - 70 * 20 + - col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1400
-1481

query I rowsort
SELECT DISTINCT 27 - tab0.col0 FROM tab0 GROUP BY col0
----
-16
-56
1

query I rowsort
SELECT DISTINCT + 59 AS col1 FROM tab2 GROUP BY col1
----
59

query I rowsort
SELECT DISTINCT + cor0.col0 * - 52 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-4732
-4784
-780

query I rowsort
SELECT - - col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT ALL 68 FROM tab1 GROUP BY tab1.col1
----
68
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 68 col2 FROM tab2 GROUP BY tab2.col1
----
68

query I rowsort
SELECT ALL + - tab0.col0 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT cor0.col1 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1, cor0.col0, cor0.col2
----
0
0
162

query I rowsort
SELECT - 93 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-93
-93
-93

query I rowsort
SELECT DISTINCT 61 * 51 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
3111

query I rowsort
SELECT ALL - + 47 FROM tab0 GROUP BY tab0.col2
----
-47
-47
-47

query I rowsort
SELECT DISTINCT + col0 + - col0 AS col2 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - COALESCE ( tab1.col1, tab1.col1 ) + 95 AS col0 FROM tab1 GROUP BY tab1.col1
----
38
51
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT - + 28 FROM tab2 GROUP BY tab2.col2
----
-28
-28
-28

query I rowsort
SELECT ALL 18 FROM tab2 GROUP BY tab2.col2
----
18
18
18

query I rowsort
SELECT 91 + - COALESCE ( + 99, col0 ) FROM tab0 cor0 GROUP BY cor0.col0
----
-8
-8
-8

query I rowsort
SELECT ALL - - 55 FROM tab1 GROUP BY tab1.col0
----
55
55
55

query I rowsort
SELECT DISTINCT - 19 FROM tab0 GROUP BY col2
----
-19

onlyif mysql # DIV for integer division: 
query I rowsort label-4330
SELECT - 61 DIV cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
44
71

skipif mysql # not compatible
query I rowsort label-4330
SELECT - 61 / cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
44
71

query I rowsort
SELECT - 6 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-6
-6
-6

query I rowsort
SELECT ALL ( + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT - 26 FROM tab2 GROUP BY tab2.col0
----
-26
-26
-26

query I rowsort
SELECT ( + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-4335
SELECT + cor0.col2 DIV - col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4335
SELECT + cor0.col2 / - col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + + cor0.col0 * cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1, cor0.col0
----
492
6795
829

query I rowsort
SELECT DISTINCT - col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + - col1 AS col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT - tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT + + col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + + 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 col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + 66 AS col0 FROM tab2 GROUP BY col0
----
66

query I rowsort
SELECT ALL - cor0.col2 + - cor0.col2 * - 52 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1224
1938
4029

query I rowsort
SELECT DISTINCT - - 36 AS col0 FROM tab1 GROUP BY tab1.col0
----
36

query I rowsort
SELECT + 93 * 10 + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
1009
954
968

query I rowsort
SELECT - 40 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-40
-40
-40

query I rowsort
SELECT 68 AS col2 FROM tab0 GROUP BY tab0.col0
----
68
68
68

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4351
SELECT + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4351
SELECT + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL cor1.col1 + - 5 AS col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor1.col1, cor1.col0
----
9 values hashing to 8d498ceb98f861412df61870ff59b4ec

onlyif mysql # DIV for integer division: 
query I rowsort label-4354
SELECT 55 DIV cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
0
1
9

skipif mysql # not compatible
query I rowsort label-4354
SELECT 55 / cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
0
1
9

query I rowsort
SELECT cor0.col2 * + cor0.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT ALL + NULLIF ( + cor0.col1, cor0.col1 * - 33 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - - 72 AS col0 FROM tab2 GROUP BY tab2.col0
----
72
72
72

query I rowsort
SELECT ALL - - 37 * 88 AS col1 FROM tab0, tab1 cor0 GROUP BY tab0.col0
----
3256
3256
3256

query I rowsort
SELECT - 65 AS col2 FROM tab2 GROUP BY tab2.col0
----
-65
-65
-65

query I rowsort
SELECT ALL - 47 + - 28 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-75
-75
-75

query I rowsort
SELECT - 92 AS col2 FROM tab1 GROUP BY tab1.col1
----
-92
-92
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-4362
SELECT - + 43 DIV 62 AS col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4362
SELECT - + 43 / 62 AS col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT DISTINCT NULLIF ( 98, cor0.col2 + - cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
98

query I rowsort
SELECT ALL ( + 86 ) FROM tab2 GROUP BY col0
----
86
86
86

query I rowsort
SELECT + cor0.col0 * - ( + cor0.col0 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT - cor0.col0 * + col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-1032
-2054
-3154

query I rowsort
SELECT ALL COALESCE ( + 8, cor0.col0 * col0, - cor0.col0 * cor0.col1 - - cor0.col1, cor0.col0 ) + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, col0
----
34
51
91

query I rowsort
SELECT - 43 FROM tab2 GROUP BY tab2.col0
----
-43
-43
-43

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0 HAVING NOT NULL = + cor1.col0
----

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4370
SELECT DISTINCT + - CAST( NULL AS DECIMAL ) AS col1 FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-4370
SELECT DISTINCT + - CAST ( NULL AS REAL ) AS col1 FROM tab2 GROUP BY tab2.col1
----
NULL

query I rowsort
SELECT DISTINCT - 33 * 3 FROM tab1 GROUP BY tab1.col0
----
-99

query I rowsort
SELECT DISTINCT - 59 FROM tab0 GROUP BY col0
----
-59

query I rowsort
SELECT 41 AS col1 FROM tab2 GROUP BY tab2.col2
----
41
41
41

query I rowsort
SELECT DISTINCT - cor0.col2 * ( cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - 29 + NULLIF ( - col1 + - 68, cor0.col0 ) * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-473
-4957
-7154

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 95 FROM tab0 GROUP BY tab0.col1
----
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL col0 AS col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + - col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL + 63 AS col0 FROM tab2 GROUP BY col2
----
63
63
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + cor0.col2 * + ( - 5 * - cor0.col2 ) col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2904
31284
7258

query I rowsort
SELECT - - 70 FROM tab2 GROUP BY tab2.col0
----
70
70
70

query I rowsort
SELECT DISTINCT + cor0.col0 + + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT cor1.col2 AS col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 32 - - cor0.col2 * + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1476
608
6273

query I rowsort
SELECT + col2 * cor0.col2 + 29 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
3393
6270
7598

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4390
SELECT cor0.col0 + + CAST( - 44 AS SIGNED ) FROM tab0 AS cor0 GROUP BY col0
----
-1
-18
39

skipif mysql # not compatible
query I rowsort label-4390
SELECT cor0.col0 + + CAST ( - 44 AS INTEGER ) FROM tab0 AS cor0 GROUP BY col0
----
-1
-18
39

query I rowsort
SELECT ALL - cor0.col1 - + ( - 55 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-4
-6
14

query I rowsort
SELECT 45 AS col1 FROM tab2 GROUP BY tab2.col0
----
45
45
45

query I rowsort
SELECT + 24 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
24
24
24

query I rowsort
SELECT + - 90 FROM tab1 GROUP BY tab1.col1
----
-90
-90
-90

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 ALL 94 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
94
94
94

query I rowsort
SELECT + 36 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
36
36
36

query I rowsort
SELECT DISTINCT 12 AS col1 FROM tab2 GROUP BY tab2.col2
----
12

query I rowsort
SELECT - - 80 FROM tab2 GROUP BY tab2.col1
----
80
80
80

query I rowsort
SELECT DISTINCT - 14 AS col2 FROM tab0 GROUP BY tab0.col1
----
-14

query I rowsort
SELECT cor0.col0 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3483

onlyif mysql # DIV for integer division: 
query I rowsort label-4402
SELECT 51 DIV + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
0
1
8

skipif mysql # not compatible
query I rowsort label-4402
SELECT 51 / + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
0
1
8

query I rowsort
SELECT DISTINCT cor0.col2 + 6 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
64
85
93

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 + COALESCE ( cor0.col2, cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-6537
38
79

query I rowsort
SELECT - 16 AS col1 FROM tab1 GROUP BY tab1.col0
----
-16
-16
-16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 15 col0 FROM tab0 GROUP BY tab0.col0
----
-15
-15
-15

query I rowsort
SELECT - ( + 70 ) FROM tab0 GROUP BY tab0.col0
----
-70
-70
-70

query I rowsort
SELECT 51 FROM tab0 GROUP BY tab0.col2
----
51
51
51

query I rowsort
SELECT 68 AS col0 FROM tab2 GROUP BY tab2.col2
----
68
68
68

onlyif mysql # DIV for integer division: 
query I rowsort label-4410
SELECT - 58 DIV + 88 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4410
SELECT - 58 / + 88 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 27 * + 89 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
2461
2482
2490

query I rowsort
SELECT 91 AS col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + + 3 * 67 AS col2 FROM tab1 GROUP BY tab1.col1
----
201
201
201

query I rowsort
SELECT - COALESCE ( + cor0.col0, - 77 + cor0.col1 ) * 31 + col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-2498
-676
-811

query I rowsort
SELECT 68 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT + cor0.col2 * col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT - 56 FROM tab2 GROUP BY tab2.col1
----
-56
-56
-56

query I rowsort
SELECT ALL + 98 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5684
7742
8526

query I rowsort
SELECT DISTINCT + - tab1.col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT - ( - tab0.col2 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 82 + 9 * 36 FROM tab2 GROUP BY col2
----
242

query I rowsort
SELECT - tab1.col2 + 74 FROM tab1 GROUP BY tab1.col2
----
29
3
66

query I rowsort
SELECT ALL col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 57 FROM tab0 GROUP BY tab0.col1
----
-57

query I rowsort
SELECT col2 + - cor0.col2 * 12 FROM tab2 AS cor0 GROUP BY col2, col2
----
-638
-869
-957

query I rowsort
SELECT DISTINCT 98 + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
16
70
76

query I rowsort
SELECT + + col2 + + 92 FROM tab2 GROUP BY tab2.col2
----
150
171
179

onlyif mysql # DIV for integer division: 
query I rowsort label-4429
SELECT ALL + 32 DIV + 47 FROM tab1 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4429
SELECT ALL + 32 / + 47 FROM tab1 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL + - tab0.col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT DISTINCT + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col2 - ( 51 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-43
-6
20

query I rowsort
SELECT cor0.col2 + cor0.col2 * col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1482
600
6320

query I rowsort
SELECT ALL tab1.col1 * tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT + 54 FROM tab0 GROUP BY tab0.col1
----
54
54

query I rowsort
SELECT - col1 AS col2 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT + tab0.col0 * + 60 FROM tab0 GROUP BY col0
----
1560
2580
4980

query I rowsort
SELECT ALL + 19 * 39 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1
----
741
741
741

query I rowsort
SELECT ALL 43 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
43
43

query I rowsort
SELECT - 14 AS col0 FROM tab0 GROUP BY tab0.col2
----
-14
-14
-14

query I rowsort
SELECT + col2 * 85 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4930
6715
7395

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 13 col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
13
13
13

query I rowsort
SELECT - 53 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-53
-53
-53

query I rowsort
SELECT ALL 17 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
41
55
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col2 col0 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT 11 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-34
-60
3

query I rowsort
SELECT - col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + - 98 AS col2 FROM tab0 GROUP BY tab0.col2
----
-98
-98
-98

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4450
SELECT DISTINCT CAST( NULL AS SIGNED ) * + 56 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-4450
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + 56 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT ALL + 51 AS col0 FROM tab0 GROUP BY tab0.col1
----
51
51

onlyif mysql # DIV for integer division: 
query I rowsort label-4452
SELECT ALL + + ( 42 ) DIV + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
7

skipif mysql # not compatible
query I rowsort label-4452
SELECT ALL + + ( 42 ) / + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
7

onlyif mysql # DIV for integer division: 
query I rowsort label-4453
SELECT ALL 18 DIV - 53 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4453
SELECT ALL 18 / - 53 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + ( + 63 ) FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
63
63
63

query I rowsort
SELECT + 97 - + 41 FROM tab2 GROUP BY tab2.col0
----
56
56
56

query I rowsort
SELECT DISTINCT 28 + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor0.col0, cor0.col0
----
110
50
56

query I rowsort
SELECT DISTINCT cor0.col2 + - 87 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-29
-8
0

query I rowsort
SELECT + - 67 * 13 AS col0 FROM tab0 GROUP BY tab0.col0
----
-871
-871
-871

query I rowsort
SELECT - 7 AS col2 FROM tab2 GROUP BY tab2.col2
----
-7
-7
-7

query I rowsort
SELECT DISTINCT + 22 + 44 FROM tab1 GROUP BY tab1.col0
----
66

query I rowsort
SELECT - col0 + tab2.col0 * + 66 FROM tab2 GROUP BY col0
----
5915
5980
975

query I rowsort
SELECT + col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT - col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + 5 FROM tab0 GROUP BY tab0.col1
----
5

query I rowsort
SELECT ALL - + 83 AS col2 FROM tab2 GROUP BY tab2.col1
----
-83
-83
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT 56 + 63 FROM tab0 GROUP BY tab0.col0
----
119
119
119

query I rowsort
SELECT - + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + + 42 FROM tab2 GROUP BY tab2.col2
----
42
42
42

query I rowsort
SELECT DISTINCT 90 FROM tab0 GROUP BY tab0.col2
----
90

query I rowsort
SELECT ALL + cor0.col0 * + 28 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
1204
2324
728

onlyif mysql # DIV for integer division: 
query I rowsort label-4472
SELECT + 72 DIV + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
1
1
9

skipif mysql # not compatible
query I rowsort label-4472
SELECT + 72 / + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
1
1
9

query I rowsort
SELECT ALL + 53 AS col0 FROM tab1 GROUP BY tab1.col0
----
53
53
53

query I rowsort
SELECT 75 AS col1 FROM tab1 GROUP BY tab1.col2
----
75
75
75

query I rowsort
SELECT ALL + - 52 AS col2 FROM tab2 GROUP BY tab2.col1
----
-52
-52
-52

query I rowsort
SELECT ALL cor0.col1 * + 68 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5508

onlyif mysql # DIV for integer division: 
query I rowsort label-4477
SELECT DISTINCT tab1.col0 DIV 36 FROM tab1 GROUP BY col0
----
0
2

skipif mysql # not compatible
query I rowsort label-4477
SELECT DISTINCT tab1.col0 / 36 FROM tab1 GROUP BY col0
----
0
2

query I rowsort
SELECT + 94 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
94
94
94

query I rowsort
SELECT 15 FROM tab1 GROUP BY tab1.col0
----
15
15
15

query I rowsort
SELECT - 11 * 23 FROM tab0 GROUP BY tab0.col0
----
-253
-253
-253

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 33 col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
33
33

onlyif mysql # DIV for integer division: 
query I rowsort label-4482
SELECT + 52 DIV - cor0.col0 + cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
482
6724
783

skipif mysql # not compatible
query I rowsort label-4482
SELECT + 52 / - cor0.col0 + cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
482
6724
783

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT + - tab1.col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT - cor0.col0 * 34 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-2788
-748
-952

query I rowsort
SELECT DISTINCT - - tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 33 * + 97 FROM tab1 GROUP BY col2
----
-3201

onlyif mysql # DIV for integer division: 
query I rowsort label-4488
SELECT DISTINCT cor0.col1 DIV col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
4

skipif mysql # not compatible
query I rowsort label-4488
SELECT DISTINCT cor0.col1 / col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
4

query I rowsort
SELECT ALL ( + 67 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
67
67
67

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 AS cor0 LEFT JOIN tab1 ON NOT NULL < - cor0.col2 + cor0.col2 GROUP BY cor0.col2
----
24
38
79

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

query I rowsort
SELECT - - 38 AS col0 FROM tab1 GROUP BY tab1.col2
----
38
38
38

query I rowsort
SELECT DISTINCT 78 AS col0 FROM tab2 GROUP BY tab2.col1
----
78

query I rowsort
SELECT DISTINCT + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT - tab1.col1 * + tab1.col1 + + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1892
-30
-3192

query I rowsort
SELECT DISTINCT + 91 FROM tab2 GROUP BY col2
----
91

query I rowsort
SELECT + 72 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-5832
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col1 - - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
162

query I rowsort
SELECT ALL - 34 AS col0 FROM tab2 GROUP BY tab2.col0
----
-34
-34
-34

query I rowsort
SELECT - 22 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-22
-22
-22

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 col0 FROM tab1 GROUP BY tab1.col1
----
8
8
8

query I rowsort
SELECT - ( 69 ) FROM tab0 GROUP BY tab0.col0
----
-69
-69
-69

query I rowsort
SELECT ALL - - 46 AS col0 FROM tab0 GROUP BY tab0.col0
----
46
46
46

query I rowsort
SELECT + + 47 AS col2 FROM tab2 GROUP BY tab2.col1
----
47
47
47

query I rowsort
SELECT DISTINCT - - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT + - tab2.col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + cor0.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 DISTINCT 77 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
77

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) IN ( cor0.col1 )
----

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 AS cor0 WHERE ( NULL ) <= NULL GROUP BY cor0.col0
----

query I rowsort
SELECT - - 95 AS col0 FROM tab1 GROUP BY tab1.col1
----
95
95
95

query I rowsort
SELECT ALL 62 * - 66 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-4092
-4092
-4092

query I rowsort
SELECT 64 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
64
64
64

query I rowsort
SELECT ALL + 48 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
48
48
48

query I rowsort
SELECT ALL 44 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
44
44
44

query I rowsort
SELECT cor1.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + 60 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT ALL - 62 FROM tab2 GROUP BY tab2.col0
----
-62
-62
-62

query I rowsort
SELECT + 86 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
86
86
86

query I rowsort
SELECT ALL 50 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * 90 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
4050
6390
720

query I rowsort
SELECT 75 FROM tab1 GROUP BY tab1.col2
----
75
75
75

query I rowsort
SELECT 92 FROM tab0 GROUP BY tab0.col2
----
92
92
92

query I rowsort
SELECT 79 FROM tab0 GROUP BY tab0.col0
----
79
79
79

query I rowsort
SELECT - 22 FROM tab2 GROUP BY tab2.col2
----
-22
-22
-22

query I rowsort
SELECT + 28 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT ALL + 41 - 33 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT DISTINCT - ( 18 ) AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-18

query I rowsort
SELECT ALL + + 19 FROM tab1 GROUP BY tab1.col0
----
19
19
19

query I rowsort
SELECT ALL - + col1 * 87 FROM tab2 GROUP BY tab2.col1
----
-3567
-5133
-5307

query I rowsort
SELECT + ( 80 ) - - 1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
81
81
81

query I rowsort
SELECT ALL - 19 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-13
25
38

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT 76 FROM tab2 cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT ALL + ( col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL + 60 FROM tab1 GROUP BY tab1.col2
----
60
60
60

query I rowsort
SELECT 77 FROM tab1 GROUP BY tab1.col0
----
77
77
77

query I rowsort
SELECT ALL - - 0 AS col1 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 - 69 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-54
22
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 67 + 8 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + 68 ) col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-68

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 DISTINCT cor0.col0 + col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
164
44
56

query I rowsort
SELECT + - 62 AS col0 FROM tab2 GROUP BY tab2.col1
----
-62
-62
-62

query I rowsort
SELECT ALL - 68 FROM tab0 GROUP BY tab0.col1
----
-68
-68

query I rowsort
SELECT - ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + - cor0.col2 * cor0.col2 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

onlyif mysql # DIV for integer division: 
query I rowsort label-4551
SELECT DISTINCT + 71 DIV + col0 + - 16 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-12
-16

skipif mysql # not compatible
query I rowsort label-4551
SELECT DISTINCT + 71 / + col0 + - 16 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-12
-16

query I rowsort
SELECT + - 1 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

query I rowsort
SELECT 91 * + 90 FROM tab1 GROUP BY tab1.col0
----
8190
8190
8190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 96 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
96
96
96

query I rowsort
SELECT ALL + col0 FROM tab2 cor0 GROUP BY cor0.col1, col0
----
15
91
92

query I rowsort
SELECT + 44 FROM tab2 GROUP BY tab2.col0
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 75 col2 FROM tab2 cor0 GROUP BY col1
----
75
75
75

query I rowsort
SELECT ALL col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL 71 * 98 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6958
6958

query I rowsort
SELECT ALL - 80 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-80
-80
-80

query I rowsort
SELECT DISTINCT - - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT + - col1 AS col0 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL cor0.col0 + 76 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
104
158
98

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( 11, + cor0.col0 * cor0.col2 ) FROM tab1 AS cor0 GROUP BY col2
----
-11

query I rowsort
SELECT cor0.col1 * - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-3483
0
0

query I rowsort
SELECT 76 + + cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
167
168
91

query I rowsort
SELECT DISTINCT 77 + + 10 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4568
SELECT CAST( 6 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
6
6

skipif mysql # not compatible
query I rowsort label-4568
SELECT CAST ( 6 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
6
6

query I rowsort
SELECT cor0.col1 + + cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - 35 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-35
-35
-35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 54 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT - 53 * + cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-2385
-3763
-424

query I rowsort
SELECT - 96 + - tab0.col0 FROM tab0 GROUP BY col0
----
-122
-139
-179

query I rowsort
SELECT 75 FROM tab2 cor0 GROUP BY cor0.col2
----
75
75
75

query I rowsort
SELECT 87 + - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
5
59
65

query I rowsort
SELECT DISTINCT + 7 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - 52 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-37
39
40

query I rowsort
SELECT + + tab0.col1 * - NULLIF ( tab0.col1, + 17 ) FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT ALL 32 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
32
32

query I rowsort
SELECT 80 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
80
80
80

query I rowsort
SELECT cor0.col1 * 16 FROM tab2 cor0 GROUP BY cor0.col1
----
656
944
976

query I rowsort
SELECT col1 * 97 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4268
5529
582

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - - ( tab0.col2 ) + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT + cor0.col0 + + cor0.col0 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
164
44
56

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4589
SELECT + CAST( NULL AS DECIMAL ) + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4589
SELECT + CAST ( NULL AS REAL ) + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 23 FROM tab0 GROUP BY col0
----
-23
-23
-23

onlyif mysql # DIV for integer division: 
query I rowsort label-4591
SELECT - 3 DIV 69 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4591
SELECT - 3 / 69 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL - cor0.col1 * 83 FROM tab0 AS cor0 GROUP BY col1
----
-6723
0

query I rowsort
SELECT ALL - tab1.col1 + ( 3 ) FROM tab1 GROUP BY tab1.col1
----
-3
-41
-54

query I rowsort
SELECT + 80 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
80
80
80

query I rowsort
SELECT DISTINCT - 24 AS col2 FROM tab0 GROUP BY tab0.col2
----
-24

query I rowsort
SELECT DISTINCT 69 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
69

query I rowsort
SELECT - 14 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-14
-14
-14

query I rowsort
SELECT ALL cor0.col2 + 5 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
13
50
76

onlyif mysql # DIV for integer division: 
query I rowsort label-4599
SELECT 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-4599
SELECT cor0.col1 / ( + cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
24
38
79

query I rowsort
SELECT DISTINCT + 3 FROM tab2 cor0 GROUP BY cor0.col0
----
3

query I rowsort
SELECT DISTINCT 9 FROM tab1 AS cor0 GROUP BY cor0.col0
----
9

query I rowsort
SELECT 45 AS col0 FROM tab0 GROUP BY col1
----
45
45

query I rowsort
SELECT + 50 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4050

query I rowsort
SELECT NULLIF ( cor0.col1, cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT 25 FROM tab0 cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL - cor0.col2 * 92 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2208
-3496
-7268

query I rowsort
SELECT DISTINCT cor0.col0 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-29
16
38

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + 42 * cor0.col1 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1763
2537
2623

query I rowsort
SELECT ALL col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * - col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL - cor0.col1 - + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-162
0

query I rowsort
SELECT + 15 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT ALL cor0.col2 * - cor0.col2 - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1482
-600
-6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col1 FROM tab0 WHERE NULL IS NULL GROUP BY tab0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-4619
SELECT DISTINCT - tab0.col2 DIV - tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
1

skipif mysql # not compatible
query I rowsort label-4619
SELECT DISTINCT - tab0.col2 / - tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
1

query I rowsort
SELECT DISTINCT - 82 AS col1 FROM tab0 GROUP BY tab0.col2
----
-82

query I rowsort
SELECT + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - + 95 + col1 FROM tab0 GROUP BY tab0.col1
----
-14
-95

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 * 85 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4872
-6636
-7308

query I rowsort
SELECT ALL - 56 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-56
-56
-56

query I rowsort
SELECT + 97 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
97
97
97

query I rowsort
SELECT ALL - - 32 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT ALL 36 FROM tab1 AS cor0 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT DISTINCT - tab0.col0 + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 - - cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
126
28
85

query I rowsort
SELECT DISTINCT - cor0.col0 * col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 11 col0 FROM tab1 GROUP BY col2
----
11
11
11

query I rowsort
SELECT 39 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
39
39
39

query I rowsort
SELECT DISTINCT 15 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
15

query I rowsort
SELECT DISTINCT 50 - cor0.col1 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1886
-3199
14

query I rowsort
SELECT ALL + 74 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
74
74
74

query I rowsort
SELECT - 7 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
168
266
553

onlyif mysql # DIV for integer division: 
query I rowsort label-4637
SELECT DISTINCT + 76 DIV col0 FROM tab0 GROUP BY tab0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4637
SELECT DISTINCT + 76 / col0 FROM tab0 GROUP BY tab0.col0
----
0
1
2

query I rowsort
SELECT DISTINCT + col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT cor0.col2 * 3 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
174
237
261

query I rowsort
SELECT ( + cor0.col2 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 49 * 47 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
2303

query I rowsort
SELECT 52 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
52
52
52

query I rowsort
SELECT + cor0.col2 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT ALL 63 FROM tab2 GROUP BY col0
----
63
63
63

query I rowsort
SELECT ALL - + 79 FROM tab0 GROUP BY tab0.col1
----
-79
-79

query I rowsort
SELECT - col0 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT + 3 * - 73 + - cor0.col0 * 52 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1571
-2455
-4535

query I rowsort
SELECT DISTINCT - 90 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-90

query I rowsort
SELECT cor0.col0 * - 49 FROM tab1 cor0 GROUP BY cor0.col0
----
-1078
-1372
-4018

query I rowsort
SELECT DISTINCT - 88 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-88

query I rowsort
SELECT - 99 FROM tab2 GROUP BY tab2.col0
----
-99
-99
-99

query I rowsort
SELECT ALL 42 FROM tab0 GROUP BY tab0.col1
----
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 94 col1 FROM tab0 GROUP BY tab0.col0
----
-94
-94
-94

query I rowsort
SELECT - col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - NULLIF ( + cor0.col2, - 83 ) * - 28 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
1064
2212
672

query I rowsort
SELECT 59 FROM tab2 GROUP BY tab2.col1
----
59
59
59

query I rowsort
SELECT DISTINCT + tab2.col1 * COALESCE ( tab2.col1, tab2.col1 ) + + 37 AS col2 FROM tab2 GROUP BY tab2.col1
----
1718
3518
3758

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 96 col2 FROM tab1 AS cor0 GROUP BY col1
----
-96
-96
-96

onlyif mysql # DIV for integer division: 
query I rowsort label-4661
SELECT - 2 DIV - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4661
SELECT - 2 / - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( 82 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
82

query I rowsort
SELECT DISTINCT 26 FROM tab2 cor0 GROUP BY cor0.col0
----
26

query I rowsort
SELECT 33 + 85 * 96 FROM tab1 AS cor0 GROUP BY cor0.col0
----
8193
8193
8193

query I rowsort
SELECT DISTINCT 26 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2366
2392
390

query I rowsort
SELECT - 61 * + 27 AS col2 FROM tab0 cor0 GROUP BY col0
----
-1647
-1647
-1647

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NULL
----
58
79
87

query I rowsort
SELECT ALL col2 + + cor0.col2 / - cor0.col2 AS col1 FROM tab0 AS cor0 WHERE NOT NULL <= NULL GROUP BY cor0.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT DISTINCT - tab0.col2 + - tab0.col2 * tab0.col2 FROM tab0 GROUP BY col2
----
-1482
-600
-6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 73 col0 FROM tab2 GROUP BY tab2.col0
----
73
73
73

query I rowsort
SELECT + 59 AS col0 FROM tab2 cor0 GROUP BY col2
----
59
59
59

query I rowsort
SELECT ALL - + tab2.col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT col0 + + col0 AS 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 - 4 col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-4
-4
-4

query I rowsort
SELECT cor0.col0 - + 66 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-51
25
26

query I rowsort
SELECT - 17 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1411
-442
-731

query I rowsort
SELECT 28 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
28
28
28

query I rowsort
SELECT ALL cor0.col2 * 14 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1106
1218
812

query I rowsort
SELECT - - 11 AS col0 FROM tab0 GROUP BY tab0.col0
----
11
11
11

query I rowsort
SELECT 30 FROM tab1 GROUP BY tab1.col0
----
30
30
30

query I rowsort
SELECT + col0 + 12 AS col2 FROM tab2 GROUP BY tab2.col0
----
103
104
27

query I rowsort
SELECT + 43 FROM tab0 AS cor0 GROUP BY cor0.col2
----
43
43
43

query I rowsort
SELECT - 73 + + col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1608
3408
3648

query I rowsort
SELECT + cor0.col2 * - 73 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4234
-5767
-6351

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4686
SELECT CAST( cor0.col0 AS SIGNED ) AS col1 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

skipif mysql # not compatible
query I rowsort label-4686
SELECT CAST ( cor0.col0 AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - 91 AS col0 FROM tab1 GROUP BY tab1.col0
----
-91
-91
-91

query I rowsort
SELECT 1 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT + 66 - - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
148
88
94

query I rowsort
SELECT DISTINCT 85 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
85

query I rowsort
SELECT DISTINCT 78 FROM tab1 AS cor0 GROUP BY cor0.col1
----
78

query I rowsort
SELECT ( + tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
45
71
8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4693
SELECT + - CAST( - 56 AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
56
56

skipif mysql # not compatible
query I rowsort label-4693
SELECT + - CAST ( - 56 AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
56
56

query I rowsort
SELECT ( 11 ) * - 28 AS col2 FROM tab2 GROUP BY tab2.col1
----
-308
-308
-308

query I rowsort
SELECT 2 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
2
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + NULLIF ( - col0, cor0.col0 ) col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + 87 FROM tab2 GROUP BY col2
----
87

query I rowsort
SELECT ALL tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL + tab0.col0 + - 25 FROM tab0 GROUP BY tab0.col0
----
1
18
58

query I rowsort
SELECT ( + 53 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
53
53

query I rowsort
SELECT 88 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
88
88
88

query I rowsort
SELECT tab2.col0 * + 98 AS col2 FROM tab2 GROUP BY tab2.col0
----
1470
8918
9016

query I rowsort
SELECT DISTINCT + 71 FROM tab2 GROUP BY col2
----
71

query I rowsort
SELECT DISTINCT 23 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
23

query I rowsort
SELECT + cor0.col2 * - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT - 61 FROM tab2 GROUP BY tab2.col2
----
-61
-61
-61

query I rowsort
SELECT 46 FROM tab2 GROUP BY tab2.col2
----
46
46
46

query I rowsort
SELECT 48 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT ALL - cor0.col2 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2565
-3124
-48

query I rowsort
SELECT + 87 FROM tab1 AS cor0 GROUP BY cor0.col1
----
87
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col0 col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
1305
5336
7189

onlyif mysql # DIV for integer division: 
query I rowsort label-4712
SELECT - cor0.col0 DIV cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4712
SELECT - cor0.col0 / cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL - 1 * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 26 FROM tab2 AS cor0 GROUP BY cor0.col0
----
26
26
26

query I rowsort
SELECT ALL + 69 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT - 93 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-93
-93
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 24 * cor0.col0 col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-2184
-2208
-360

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col0 + + 42 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
125
68
85

onlyif mysql # DIV for integer division: 
query I rowsort label-4720
SELECT DISTINCT cor0.col2 DIV - cor0.col0 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
-3
0

skipif mysql # not compatible
query I rowsort label-4720
SELECT DISTINCT cor0.col2 / - cor0.col0 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
-3
0

query I rowsort
SELECT ALL + cor0.col1 - - cor0.col1 * 74 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3075
4425
4575

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col0, col1
----
41
59
61

query I rowsort
SELECT ALL + 37 FROM tab2 GROUP BY tab2.col2
----
37
37
37

query I rowsort
SELECT 22 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
22
22
22

query I rowsort
SELECT ALL col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL 41 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1804
2337
246

query I rowsort
SELECT ALL - 97 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-97
-97
-97

query I rowsort
SELECT 69 AS col0 FROM tab2 GROUP BY tab2.col2
----
69
69
69

query I rowsort
SELECT + 30 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
30
30
30

query I rowsort
SELECT + col1 * 77 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
3157
4543
4697

query I rowsort
SELECT + col1 - - 46 FROM tab2 GROUP BY tab2.col1
----
105
107
87

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT + col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

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 - 69 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-69
-69
-69

query I rowsort
SELECT DISTINCT 74 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3034
4366
4514

query I rowsort
SELECT - 80 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-80
-80
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-4739
SELECT ALL + cor0.col1 + cor0.col1 DIV col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
42
60
62

skipif mysql # not compatible
query I rowsort label-4739
SELECT ALL + cor0.col1 + cor0.col1 / col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
42
60
62

query I rowsort
SELECT 84 * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-6804
0

query I rowsort
SELECT DISTINCT - - tab2.col2 * - ( - tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT - - 95 - + 99 AS col2 FROM tab2 GROUP BY col2
----
-4

query I rowsort
SELECT ALL - cor0.col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT - 86 * tab2.col1 FROM tab2 GROUP BY col1
----
-3526
-5074
-5246

query I rowsort
SELECT DISTINCT 85 + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
111
128
168

query I rowsort
SELECT DISTINCT - 38 * 51 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1938

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 - NULLIF ( - col0, col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 50 * 33 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1650
1650

query I rowsort
SELECT DISTINCT 47 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
47

query I rowsort
SELECT + 17 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
17
17
17

query I rowsort
SELECT DISTINCT + ( 50 ) * col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
2200
2850
300

query I rowsort
SELECT ALL - - tab0.col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT ALL tab2.col0 - + 17 * col0 FROM tab2 GROUP BY tab2.col0
----
-1456
-1472
-240

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4755
SELECT CAST( 28 AS SIGNED ) AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
28
28
28

skipif mysql # not compatible
query I rowsort label-4755
SELECT CAST ( 28 AS INTEGER ) AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT + 13 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
13
13

query I rowsort
SELECT ALL + 98 FROM tab1 AS cor0 GROUP BY cor0.col1
----
98
98
98

query I rowsort
SELECT - - tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - 17 FROM tab0 GROUP BY col0
----
-17
-17
-17

query I rowsort
SELECT + cor0.col2 + cor0.col0 * - 82 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1796
-2251
-6653

query I rowsort
SELECT DISTINCT col2 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT cor0.col2 + + col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT + cor0.col0 + - cor0.col0 AS col1 FROM tab2 cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT + - tab2.col2 + + 39 FROM tab2 GROUP BY tab2.col2
----
-19
-40
-48

query I rowsort
SELECT - 81 + 85 FROM tab2 GROUP BY tab2.col1
----
4
4
4

query I rowsort
SELECT - col1 + 97 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
7776

query I rowsort
SELECT - 17 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-17
-17
-17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 14 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
14
14
14

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT cor0.col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
15
91
92

query I rowsort
SELECT 58 FROM tab0 AS cor0 GROUP BY cor0.col2
----
58
58
58

query I rowsort
SELECT ALL ( + cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 5 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
5
5
5

query I rowsort
SELECT cor0.col2 * col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT - col0 + 70 AS col2 FROM tab1 GROUP BY tab1.col0
----
-12
42
48

query I rowsort
SELECT col1 AS col2 FROM tab0 cor0 GROUP BY col1
----
0
81

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 96, - cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
96
96

query I rowsort
SELECT DISTINCT + cor0.col0 * 70 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1050
6370
6440

query I rowsort
SELECT DISTINCT 84 FROM tab1 AS cor0 GROUP BY cor0.col0
----
84

query I rowsort
SELECT tab1.col2 * 28 AS col2 FROM tab1 GROUP BY col2
----
1260
1988
224

query I rowsort
SELECT + CASE cor0.col2 WHEN + cor0.col2 THEN + 92 ELSE NULL END AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT ALL cor0.col0 + 19 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
102
45
62

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab0 cor0 GROUP BY col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - col2 - 94 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-102
-139
-165

query I rowsort
SELECT DISTINCT - cor0.col1 * + 44 + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, col1
----
-3483
0

query I rowsort
SELECT + 61 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
61
61
61

query I rowsort
SELECT - + 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 + tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 70 FROM tab0 AS cor0 GROUP BY col0
----
-70

query I rowsort
SELECT DISTINCT 76 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
76

query I rowsort
SELECT + 61 FROM tab1 AS cor0 GROUP BY cor0.col2
----
61
61
61

query I rowsort
SELECT + cor0.col0 * - col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-484
-6724
-784

query I rowsort
SELECT + cor0.col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL 55 * 8 FROM tab0 AS cor0 GROUP BY cor0.col2
----
440
440
440

query I rowsort
SELECT - tab1.col2 + + col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2 HAVING NULL > NULL
----

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT - cor0.col0 * 90 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1350
-8190
-8280

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT - 12 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-12
-12
-12

onlyif mysql # DIV for integer division: 
query I rowsort label-4804
SELECT + cor1.col2 DIV + 18 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
3
4
4

skipif mysql # not compatible
query I rowsort label-4804
SELECT + cor1.col2 / + 18 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
3
4
4

onlyif mysql # DIV for integer division: 
query I rowsort label-4805
SELECT ALL + cor0.col2 DIV - cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4805
SELECT ALL + cor0.col2 / - cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL - 39 * + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1482
-3081
-936

query I rowsort
SELECT cor0.col0 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1032
2054
3154

query I rowsort
SELECT + ( 29 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
29
29
29

query I rowsort
SELECT DISTINCT - - 22 AS col2 FROM tab2 GROUP BY col0
----
22

query I rowsort
SELECT + 14 + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
101
72
93

query I rowsort
SELECT ALL NULLIF ( 27, + cor0.col1 * col1 - cor0.col1 ) FROM tab1 AS cor0 GROUP BY col1
----
27
27
27

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0, cor0.col1
----
58
79
87

query I rowsort
SELECT - + 57 AS col1 FROM tab0 GROUP BY tab0.col0
----
-57
-57
-57

query I rowsort
SELECT - cor0.col1 * + 54 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2376
-3078
-324

query I rowsort
SELECT + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT 97 AS col2 FROM tab2 GROUP BY tab2.col2
----
97
97
97

query I rowsort
SELECT DISTINCT + 14 AS col1 FROM tab1 GROUP BY col1
----
14

query I rowsort
SELECT col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT ALL + col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT tab2.col1 * + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT - cor0.col2 - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-142
-16
-90

query I rowsort
SELECT DISTINCT 59 * - col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-1534
-2537
-4897

query I rowsort
SELECT DISTINCT + 93 * 66 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
6138

onlyif mysql # DIV for integer division: 
query I rowsort label-4825
SELECT DISTINCT 43 DIV 55 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-4825
SELECT DISTINCT 43 / 55 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT 33 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
112
120
91

query I rowsort
SELECT - 22 FROM tab0 cor0 GROUP BY cor0.col0
----
-22
-22
-22

query I rowsort
SELECT - cor0.col2 + - 82 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-127
-153
-90

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 61 AS col0 FROM tab1 GROUP BY col2
----
61
61
61

query I rowsort
SELECT + tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL + 1 FROM tab1 GROUP BY col0
----
1
1
1

query I rowsort
SELECT DISTINCT 23 - cor0.col2 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-1282
-5313
-7166

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 98 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
98
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 79 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT DISTINCT - 70 * 9 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-630

query I rowsort
SELECT + 96 FROM tab0 AS cor0 GROUP BY cor0.col0
----
96
96
96

query I rowsort
SELECT cor0.col0 + 99 * - 91 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-8926
-8966
-8983

query I rowsort
SELECT + 41 AS col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor1.col2
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 86 FROM tab2 AS cor0 GROUP BY cor0.col1
----
86

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4844
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-4844
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY col1
----
NULL

query I rowsort
SELECT ALL 52 AS col2 FROM tab2 GROUP BY tab2.col2
----
52
52
52

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 63, col2, cor0.col2 * + cor0.col0 + cor0.col0 * cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
63
63
63

query I rowsort
SELECT ALL + tab1.col1 * 38 FROM tab1 GROUP BY col1
----
1672
2166
228

query I rowsort
SELECT ALL - + 56 FROM tab0 GROUP BY col0
----
-56
-56
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 60 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-60

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab1 cor0 GROUP BY col2, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - cor0.col2 + cor0.col2 * 92 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4095
6461
728

query I rowsort
SELECT ALL 24 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
24
24
24

query I rowsort
SELECT DISTINCT + tab2.col0 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 cor0.col0 col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col0, col1
----
0
0
81

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL ( + col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 85 FROM tab2 GROUP BY col2
----
-85

query I rowsort
SELECT ALL + - 84 FROM tab2 GROUP BY col1
----
-84
-84
-84

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4860
SELECT DISTINCT + - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-4860
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT ALL + 1 AS col1 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT ( - 9 ) + - 40 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-49
-49

query I rowsort
SELECT ALL 31 FROM tab2 cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
31
31
31

query I rowsort
SELECT ALL 80 FROM tab0 AS cor0 GROUP BY col0
----
80
80
80

query I rowsort
SELECT ALL 92 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
133
151
153

query I rowsort
SELECT 87 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
87
87
87

query I rowsort
SELECT + 9 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
9
9
9

query I rowsort
SELECT - 37 * + col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1591
-3071
-962

query I rowsort
SELECT ALL + cor0.col0 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT - col0 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-1032
-2054
-3154

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab2.col1 col0 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT - cor0.col0 + cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - 34 ) * - tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
-2788
-748
-952

query I rowsort
SELECT 3 + 96 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
99
99
99

onlyif mysql # DIV for integer division: 
query I rowsort label-4876
SELECT ALL cor0.col2 DIV + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4876
SELECT ALL cor0.col2 / + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT tab1.col0 * + 62 AS col2 FROM tab1 GROUP BY tab1.col0
----
1364
1736
5084

query I rowsort
SELECT 23 * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1886
-506
-644

onlyif mysql # DIV for integer division: 
query I rowsort label-4879
SELECT ALL cor0.col1 DIV 63 + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
15
91
92

skipif mysql # not compatible
query I rowsort label-4879
SELECT ALL cor0.col1 / 63 + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4880
SELECT - col1 + + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4880
SELECT - col1 + + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 79 AS col2 FROM tab2 GROUP BY tab2.col1
----
-79
-79
-79

query I rowsort
SELECT DISTINCT cor0.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 + 81 col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
81
81

query I rowsort
SELECT DISTINCT - tab1.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 DISTINCT + 82 col1 FROM tab0 cor0 GROUP BY cor0.col2
----
82

query I rowsort
SELECT 99 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
99
99
99

query I rowsort
SELECT ALL - 53 AS col2 FROM tab1 GROUP BY tab1.col1
----
-53
-53
-53

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4888
SELECT ALL - cor0.col0 * CAST( 78 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1170
-7098
-7176

skipif mysql # not compatible
query I rowsort label-4888
SELECT ALL - cor0.col0 * CAST ( 78 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1170
-7098
-7176

query I rowsort
SELECT DISTINCT + 89 + col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
170
89

query I rowsort
SELECT + 69 FROM tab2 GROUP BY tab2.col1
----
69
69
69

query I rowsort
SELECT DISTINCT + 65 FROM tab0 AS cor0 GROUP BY col1, cor0.col0, cor0.col1
----
65

query I rowsort
SELECT 4 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4
4
4

query I rowsort
SELECT ALL 73 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
73
73
73

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4894
SELECT DISTINCT cor0.col1 + 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-4894
SELECT DISTINCT cor0.col1 + cor0.col1 * + CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL - cor0.col1 * + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT - cor0.col2 * ( 8 * cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-15552
0
0

query I rowsort
SELECT ALL + + 34 AS col2 FROM tab1 GROUP BY tab1.col1
----
34
34
34

query I rowsort
SELECT - + 72 FROM tab0 GROUP BY tab0.col2
----
-72
-72
-72

query I rowsort
SELECT DISTINCT 1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT DISTINCT - 13 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-13

query I rowsort
SELECT 45 + - 34 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
11
11
11

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT 93 * 52 FROM tab0 AS cor0 GROUP BY cor0.col1
----
4836
4836

query I rowsort
SELECT DISTINCT - 25 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-25

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4909
SELECT CAST( NULL AS SIGNED ) * 40 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4909
SELECT CAST ( NULL AS INTEGER ) * 40 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 69 + + cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
133
2094
5110

query I rowsort
SELECT 20 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1660
520
860

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
116
158
174

query I rowsort
SELECT DISTINCT - + tab1.col0 * - 26 AS col1 FROM tab1 GROUP BY tab1.col0
----
2132
572
728

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4914
SELECT cor0.col2 * CAST( cor0.col2 AS SIGNED ) col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2025
5041
64

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4914
SELECT cor0.col2 * CAST ( cor0.col2 AS INTEGER ) col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col2 - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
-12
-34
72

query I rowsort
SELECT ALL 84 AS col0 FROM tab2 GROUP BY tab2.col2
----
84
84
84

query I rowsort
SELECT - cor0.col0 * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT - 81 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
-81
-81
-81

query I rowsort
SELECT DISTINCT + cor0.col0 + ( 50 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
133
76
93

query I rowsort
SELECT - 83 * + 54 FROM tab2 GROUP BY col2
----
-4482
-4482
-4482

query I rowsort
SELECT COALESCE ( 87, - 61 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
87
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 25 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT - cor0.col1 - cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
-162
0

query I rowsort
SELECT - 35 FROM tab1 AS cor0 GROUP BY col1
----
-35
-35
-35

onlyif mysql # DIV for integer division: 
query I rowsort label-4928
SELECT DISTINCT + 95 DIV - col0 col1 FROM tab1 GROUP BY col0
----
-1
-3
-4

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4928
SELECT DISTINCT + 95 / - col0 col1 FROM tab1 GROUP BY col0
----
-1
-3
-4

query I rowsort
SELECT ALL cor0.col2 + col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

query I rowsort
SELECT + 62 - - 95 FROM tab2 GROUP BY tab2.col0
----
157
157
157

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 69 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-69
-69
-69

query I rowsort
SELECT DISTINCT 65 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
65

query I rowsort
SELECT DISTINCT - 22 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-22

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4934
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-4934
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT 56 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT + 54 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
54
54
54

query I rowsort
SELECT ALL - col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - 67 AS col1 FROM tab2 GROUP BY col1
----
-67

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT + 50 FROM tab0 GROUP BY col1
----
50

query I rowsort
SELECT DISTINCT + 62 * - tab1.col2 + col2 FROM tab1 GROUP BY tab1.col2
----
-2745
-4331
-488

query I rowsort
SELECT ALL + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
41
59
61

query I rowsort
SELECT + col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT - 70 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-70
-70
-70

query I rowsort
SELECT 90 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
90
90
90

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL tab0.col1 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 62 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
62

query I rowsort
SELECT + cor0.col2 - - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
158
48
76

query I rowsort
SELECT + 8 FROM tab1 AS cor0 GROUP BY col1
----
8
8
8

query I rowsort
SELECT ALL + col1 - 42 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1
17
19

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT + 4 AS col1 FROM tab0 GROUP BY tab0.col2
----
4
4
4

query I rowsort
SELECT DISTINCT + 5 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
455
460
75

query I rowsort
SELECT DISTINCT + cor0.col1 + - 83 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-4957
SELECT col0 DIV - 60 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-4957
SELECT col0 / - 60 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

query I rowsort
SELECT + 2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2
2
2

query I rowsort
SELECT - 58 * + cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-5278
-5336
-870

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 col0 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 77 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4466
6083
6699

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col1 FROM tab0 AS cor0 WHERE - cor0.col2 * - cor0.col2 + cor0.col0 * - col0 NOT IN ( - cor0.col1 * col0 + + cor0.col1 ) GROUP BY col1
----
-81
0

query I rowsort
SELECT - cor0.col2 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1 HAVING NULL NOT IN ( col2 )
----

query I rowsort
SELECT DISTINCT col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT DISTINCT + col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( cor0.col1 ) col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT COALESCE ( + cor0.col1, cor0.col1, 2, cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL + 75 FROM tab0 AS cor0 GROUP BY cor0.col1
----
75
75

query I rowsort
SELECT DISTINCT + cor0.col1 * 6 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
486

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 - 23 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-23
-23
-23

query I rowsort
SELECT 41 FROM tab1 AS cor0 GROUP BY cor0.col2
----
41
41
41

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4976
SELECT DISTINCT CAST( NULL AS SIGNED ) * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-4976
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT ( + cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + cor0.col2 * + cor0.col2 - 83 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3281
6158
7486

query I rowsort
SELECT + ( + 46 ) + - cor0.col2 * col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1398
-530
-6195

query I rowsort
SELECT ALL col0 + + 3 FROM tab1 GROUP BY tab1.col0
----
25
31
85

query I rowsort
SELECT ALL - 35 FROM tab2 GROUP BY tab2.col2
----
-35
-35
-35

onlyif mysql # DIV for integer division: 
query I rowsort label-4982
SELECT ALL tab2.col2 DIV + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4982
SELECT ALL tab2.col2 / + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT DISTINCT - 14 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-14

query I rowsort
SELECT DISTINCT + 59 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
59

query I rowsort
SELECT - col1 + col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - 68 AS col0 FROM tab2 GROUP BY tab2.col2
----
-68

query I rowsort
SELECT DISTINCT - 75 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-75

query I rowsort
SELECT 67 AS col0 FROM tab1 GROUP BY tab1.col1
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 37 col1 FROM tab1 GROUP BY col0
----
-37
-37
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * cor0.col1 - + col1 col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
2508
3080
42

query I rowsort
SELECT ALL - 6 FROM tab0 GROUP BY tab0.col2
----
-6
-6
-6

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

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.col0 AS col2 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.col0, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col1 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL tab0.col1 - + 0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL + 4 * 72 AS col0 FROM tab2 GROUP BY tab2.col0
----
288
288
288

onlyif mysql # DIV for integer division: 
query I rowsort label-4999
SELECT ALL cor0.col0 DIV 23 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
3

skipif mysql # not compatible
query I rowsort label-4999
SELECT ALL cor0.col0 / 23 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
3

query I rowsort
SELECT - tab0.col0 * + col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL - 68 FROM tab1 GROUP BY tab1.col1
----
-68
-68
-68

query I rowsort
SELECT ALL - cor0.col2 + 40 FROM tab1 cor0 GROUP BY cor0.col2
----
-31
-5
32

query I rowsort
SELECT ALL - ( 91 ) - - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-48
-65
-8

query I rowsort
SELECT ALL 80 * - 98 + - cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
-7840
-7921

query I rowsort
SELECT + + 94 + 16 FROM tab0 GROUP BY tab0.col1
----
110
110

query I rowsort
SELECT - 54 AS col1 FROM tab1 GROUP BY tab1.col1
----
-54
-54
-54

query I rowsort
SELECT - 58 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-58
-58

query I rowsort
SELECT ALL 29 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
29
29
29

query I rowsort
SELECT ALL col2 AS col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 65 AS col2 FROM tab2 GROUP BY tab2.col0
----
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + CASE col2 WHEN + cor0.col1 + - 18 THEN NULL ELSE col1 END col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT + 74 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
115
133
135

query I rowsort
SELECT ALL 15 FROM tab0 AS cor0 GROUP BY col2
----
15
15
15

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, col0
----
41
59
61

query I rowsort
SELECT DISTINCT 77 * - cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
-1155
-7007
-7084

query I rowsort
SELECT DISTINCT + 78 FROM tab0 AS cor0 GROUP BY col1, cor0.col2, col0
----
78

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) * 46 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-1196
-1978
-3818

query I rowsort
SELECT - ( + 71 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-71
-71
-71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col0 FROM tab1 cor0 GROUP BY cor0.col1, col2
----
-45
-71
-8

query I rowsort
SELECT ALL + 36 FROM tab0 GROUP BY tab0.col1
----
36
36

query I rowsort
SELECT 33 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-11
-24
27

query I rowsort
SELECT cor0.col0 + + 99 FROM tab0 AS cor0 GROUP BY cor0.col0
----
125
142
182

query I rowsort
SELECT ALL - cor0.col2 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT 73 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
73
73
73

query I rowsort
SELECT ( 89 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
89
89
89

query I rowsort
SELECT - 13 FROM tab2 GROUP BY tab2.col1
----
-13
-13
-13

query I rowsort
SELECT 63 FROM tab1 GROUP BY tab1.col0
----
63
63
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT ( NULL ) IS NOT NULL
----
45
71
8

query I rowsort
SELECT + 51 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
51
51
51

query I rowsort
SELECT - 54 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-54
-54

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL - 93 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-93
-93
-93

query I rowsort
SELECT - 24 FROM tab0 GROUP BY col1
----
-24
-24

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT + 60 FROM tab1 GROUP BY tab1.col0
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL - 76 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-61
15
16

query I rowsort
SELECT + 44 AS col0 FROM tab1 GROUP BY tab1.col0
----
44
44
44

query I rowsort
SELECT 39 FROM tab0 GROUP BY tab0.col0
----
39
39
39

query I rowsort
SELECT 36 - 36 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 9 * 55 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-495
-495
-495

query I rowsort
SELECT - cor0.col0 * - 6 FROM tab1 AS cor0 GROUP BY cor0.col0
----
132
168
492

query I rowsort
SELECT ALL + col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + ( 44 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT ALL 90 FROM tab2 AS cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT ALL + 77 FROM tab2 AS cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5050
SELECT + CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5050
SELECT + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT 67 + 11 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT DISTINCT + + 30 FROM tab1 GROUP BY col2
----
30

query I rowsort
SELECT 44 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
44
44
44

query I rowsort
SELECT DISTINCT - + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + ( 96 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
96
96
96

query I rowsort
SELECT DISTINCT + cor0.col2 * 42 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
2436
3318
3654

query I rowsort
SELECT ALL cor0.col1 - + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT 52 FROM tab2 AS cor0 GROUP BY cor0.col1
----
52
52
52

query I rowsort
SELECT + tab2.col2 * 84 FROM tab2 GROUP BY tab2.col2
----
4872
6636
7308

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL cor0.col2 * 73 FROM tab2 cor0 GROUP BY col2
----
4234
5767
6351

query I rowsort
SELECT DISTINCT 29 FROM tab1 AS cor0 GROUP BY cor0.col0
----
29

onlyif mysql # DIV for integer division: 
query I rowsort label-5063
SELECT DISTINCT cor0.col0 DIV cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
1

skipif mysql # not compatible
query I rowsort label-5063
SELECT DISTINCT cor0.col0 / cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
1

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-17
11
14

query I rowsort
SELECT 50 FROM tab2 AS cor0 GROUP BY col1
----
50
50
50

query I rowsort
SELECT 97 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1455
8827
8924

query I rowsort
SELECT DISTINCT 89 FROM tab1 AS cor0 GROUP BY cor0.col2
----
89

query I rowsort
SELECT ALL - - 81 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
81
81

query I rowsort
SELECT + 48 * - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1248
-2064
-3984

query I rowsort
SELECT - 79 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-79
-79
-79

query I rowsort
SELECT DISTINCT + 72 AS col2 FROM tab2 GROUP BY tab2.col0
----
72

query I rowsort
SELECT cor0.col2 + - cor0.col2 * 77 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-3420
-5396
-608

query I rowsort
SELECT DISTINCT + + 95 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
121
138
178

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 65 col1 FROM tab2 GROUP BY col0
----
65
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT + 31 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 11 col0 FROM tab1 AS cor0 GROUP BY col0
----
-11

query I rowsort
SELECT - 5 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5
-5

query I rowsort
SELECT cor0.col2 * 39 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1482
3081
936

query I rowsort
SELECT DISTINCT 29 AS col1 FROM tab0 cor0 GROUP BY col1
----
29

query I rowsort
SELECT DISTINCT 79 FROM tab2 AS cor0 GROUP BY cor0.col2
----
79

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 + - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1892
30
3192

query I rowsort
SELECT - 2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-2
-2
-2

query I rowsort
SELECT - 75 FROM tab2 GROUP BY tab2.col2
----
-75
-75
-75

query I rowsort
SELECT DISTINCT 71 FROM tab1 AS cor0 GROUP BY cor0.col1
----
71

query I rowsort
SELECT ALL - ( + cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - 59 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-59
-59
-59

query I rowsort
SELECT DISTINCT 82 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
82

query I rowsort
SELECT ALL + 98 FROM tab0 GROUP BY col0
----
98
98
98

query I rowsort
SELECT ALL + 70 FROM tab2 GROUP BY tab2.col1
----
70
70
70

query I rowsort
SELECT ALL + - 63 FROM tab1 GROUP BY tab1.col1
----
-63
-63
-63

query I rowsort
SELECT 10 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
10
10
10

query I rowsort
SELECT - ( 42 ) FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-42
-42
-42

query I rowsort
SELECT cor0.col2 * cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
1260
176
5822

query I rowsort
SELECT ALL - 55 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-55
-55
-55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 83 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
83
83
83

query I rowsort
SELECT 67 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
67
67
67

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
0
0
0

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 DISTINCT - 10 AS col0 FROM tab0 GROUP BY tab0.col1
----
-10

query I rowsort
SELECT ALL tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-5102
SELECT - 14 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5102
SELECT - 14 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT ALL + col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - 80 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-80
-80
-80

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT - 68 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
-68
-68
-68

query I rowsort
SELECT DISTINCT - 56 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-56

query I rowsort
SELECT - 83 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-83
-83
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor1.col0 col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-15
-91
-92

query I rowsort
SELECT 2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
2
2
2

onlyif mysql # DIV for integer division: 
query I rowsort label-5111
SELECT ALL 68 DIV - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-11

skipif mysql # not compatible
query I rowsort label-5111
SELECT ALL 68 / - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-11

query I rowsort
SELECT + 83 FROM tab2 AS cor0 GROUP BY cor0.col1
----
83
83
83

query I rowsort
SELECT + 1 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT ALL + 34 FROM tab0 AS cor0 GROUP BY cor0.col0
----
34
34
34

query I rowsort
SELECT 98 FROM tab2 AS cor0 GROUP BY cor0.col1
----
98
98
98

query I rowsort
SELECT ALL - col0 AS col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - tab0.col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5121
SELECT - CAST( ( + 17 ) AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-17
-17
-17

skipif mysql # not compatible
query I rowsort label-5121
SELECT - CAST ( ( + 17 ) AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-17
-17
-17

onlyif mysql # DIV for integer division: 
query I rowsort label-5122
SELECT DISTINCT 33 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-5122
SELECT DISTINCT 33 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT ALL 56 AS col1 FROM tab2 GROUP BY tab2.col1
----
56
56
56

query I rowsort
SELECT ALL 83 FROM tab1 GROUP BY tab1.col1
----
83
83
83

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT NULLIF ( 43, + cor0.col1 ) * 17 FROM tab2 AS cor0 GROUP BY cor0.col1
----
731
731
731

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
484
6724
784

query I rowsort
SELECT DISTINCT 38 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
38

query I rowsort
SELECT 86 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
86
86
86

query I rowsort
SELECT + 59 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
59
59
59

query I rowsort
SELECT ALL + - tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-5132
SELECT cor0.col2 DIV col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5132
SELECT cor0.col2 / col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5133
SELECT CAST( NULL AS SIGNED ) + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5133
SELECT CAST ( NULL AS INTEGER ) + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - col0 * tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT 29 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
29

onlyif mysql # DIV for integer division: 
query I rowsort label-5136
SELECT DISTINCT col2 DIV col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-5136
SELECT DISTINCT col2 / col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
1

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-5138
SELECT - cor0.col2 DIV + 11 AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor0.col2
----
-2
-3
-7

skipif mysql # not compatible
query I rowsort label-5138
SELECT - cor0.col2 / + 11 AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor0.col2
----
-2
-3
-7

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5139
SELECT - CAST( NULL AS DECIMAL ) * - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5139
SELECT - CAST ( NULL AS REAL ) * - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 92 AS col1 FROM tab1 GROUP BY tab1.col2
----
-92
-92
-92

query I rowsort
SELECT ALL 9 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
9
9
9

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) IS NULL
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + tab1.col1 FROM tab1 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - 96 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-96
-96
-96

query I rowsort
SELECT ALL 61 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
61
61

query I rowsort
SELECT + 49 AS col1 FROM tab0 GROUP BY tab0.col0
----
49
49
49

query I rowsort
SELECT - 22 FROM tab1 GROUP BY tab1.col0
----
-22
-22
-22

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab2 cor0 GROUP BY col1
----
-1681
-3481
-3721

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.col0, cor0.col2
----
-3364
-6241
-7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 18 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
18
18
18

query I rowsort
SELECT cor0.col0 + + 94 * - 89 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-8284
-8338
-8344

query I rowsort
SELECT col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col2 * 88 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
-5104
-6952
-7656

query I rowsort
SELECT ALL + ( - cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-5158
SELECT cor0.col1 + cor0.col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45
58
7

skipif mysql # not compatible
query I rowsort label-5158
SELECT cor0.col1 + cor0.col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45
58
7

query I rowsort
SELECT 39 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
39
39

query I rowsort
SELECT - 92 FROM tab0 GROUP BY tab0.col2
----
-92
-92
-92

query I rowsort
SELECT ALL 93 + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
137
150
99

query I rowsort
SELECT + 4 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4
4
4

onlyif mysql # DIV for integer division: 
query I rowsort label-5163
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-5163
SELECT cor0.col2 / ( cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + ( cor0.col0 ) col2 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 99 col1 FROM tab0 GROUP BY tab0.col0
----
-99
-99
-99

query I rowsort
SELECT ALL + 8 FROM tab2 GROUP BY tab2.col0
----
8
8
8

query I rowsort
SELECT ALL 80 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
80
80
80

query I rowsort
SELECT - 19 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-19
-19
-19

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
41
59
61

query I rowsort
SELECT DISTINCT 70 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
70

query I rowsort
SELECT DISTINCT - - 23 AS col2 FROM tab0 GROUP BY tab0.col2
----
23

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT + ( - cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - 56 FROM tab0 GROUP BY tab0.col0
----
-56
-56
-56

query I rowsort
SELECT DISTINCT - + 17 AS col0 FROM tab2 GROUP BY tab2.col2
----
-17

query I rowsort
SELECT - 7 * 50 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-350
-350
-350

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 60, - cor0.col2 ) + - 72 * 82 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-5964
-5964
-5964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 73 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
73

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT ALL + 95 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
95
95
95

onlyif mysql # DIV for integer division: 
query I rowsort label-5181
SELECT ALL col2 DIV 12 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
0
3
5

skipif mysql # not compatible
query I rowsort label-5181
SELECT ALL col2 / 12 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
0
3
5

query I rowsort
SELECT + - 72 FROM tab1 GROUP BY tab1.col1
----
-72
-72
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 11 * tab2.col1 - 12 col2 FROM tab2 GROUP BY col1
----
439
637
659

query I rowsort
SELECT DISTINCT ( - 66 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
-66

query I rowsort
SELECT DISTINCT + 1 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
25
39
80

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT 48 AS col0 FROM tab2 GROUP BY tab2.col2
----
48
48
48

query I rowsort
SELECT 82 FROM tab0 AS cor0 GROUP BY cor0.col1
----
82
82

query I rowsort
SELECT ALL col1 AS col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT 10 FROM tab0 AS cor0 GROUP BY cor0.col1
----
10

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 + 67 FROM tab1 GROUP BY tab1.col0
----
67
67
67

query I rowsort
SELECT - cor1.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-22
-28
-82

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 DISTINCT 3 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + cor0.col2 col1 FROM tab2, tab0 cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT ALL - 90 FROM tab2 GROUP BY tab2.col2
----
-90
-90
-90

query I rowsort
SELECT + 74 AS col2 FROM tab0 GROUP BY tab0.col2
----
74
74
74

query I rowsort
SELECT + 3 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3
3
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 64 * tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
2880
4544
512

query I rowsort
SELECT DISTINCT - - 16 FROM tab1 GROUP BY tab1.col2
----
16

query I rowsort
SELECT ALL - 73 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-73
-73

query I rowsort
SELECT - 32 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-32
-32
-32

query I rowsort
SELECT + 49 FROM tab1 AS cor0 GROUP BY col0
----
49
49
49

query I rowsort
SELECT col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col1 + - 89 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-28
-30
-48

query I rowsort
SELECT - col0 + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + 51 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
51
51
51

query I rowsort
SELECT + 25 AS col0 FROM tab0 GROUP BY tab0.col1
----
25
25

query I rowsort
SELECT - cor0.col2 * + 24 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1080
-1704
-192

query I rowsort
SELECT - 62 FROM tab2 GROUP BY tab2.col2
----
-62
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 53 * + cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1378
2279
4399

query I rowsort
SELECT - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2 HAVING NOT - tab1.col2 IS NOT NULL
----

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + + 18 FROM tab1 GROUP BY tab1.col0
----
18

onlyif mysql # DIV for integer division: 
query I rowsort label-5218
SELECT DISTINCT + 7 DIV 11 col2 FROM tab1 GROUP BY tab1.col0
----
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5218
SELECT DISTINCT + 7 / 11 col2 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT 64 AS col1 FROM tab2 GROUP BY col2
----
64
64
64

query I rowsort
SELECT ALL - 81 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-81
-81
-81

query I rowsort
SELECT DISTINCT 5 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
5

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + 68 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT ALL cor0.col1 * - ( 68 ) FROM tab1 AS cor0 GROUP BY col1
----
-2992
-3876
-408

query I rowsort
SELECT - ( 67 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-67
-67
-67

query I rowsort
SELECT - + 54 FROM tab0 GROUP BY col1
----
-54
-54

query I rowsort
SELECT 56 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT DISTINCT 4 FROM tab0 AS cor0 GROUP BY cor0.col1
----
4

query I rowsort
SELECT DISTINCT - 34 FROM tab2 cor0 GROUP BY cor0.col2
----
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL cor0.col1 - 38 FROM tab2 cor0 GROUP BY cor0.col1
----
21
23
3

query I rowsort
SELECT DISTINCT 31 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col0
----
31

query I rowsort
SELECT + cor0.col1 * + 76 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6156

onlyif mysql # DIV for integer division: 
query I rowsort label-5235
SELECT ALL 21 + NULLIF ( cor0.col1, col2 ) DIV + col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
21
21
21

skipif mysql # not compatible
query I rowsort label-5235
SELECT ALL 21 + NULLIF ( cor0.col1, col2 ) / + col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
21
21
21

query I rowsort
SELECT DISTINCT + cor0.col0 + + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT - + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT + + 37 AS col0 FROM tab1 GROUP BY tab1.col1
----
37

query I rowsort
SELECT - + tab0.col2 * 92 AS col1 FROM tab0 GROUP BY tab0.col2
----
-2208
-3496
-7268

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5241
SELECT - cor0.col1 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5241
SELECT - cor0.col1 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 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 - cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL 1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-5245
SELECT DISTINCT tab1.col2 + 44 DIV - col2 FROM tab1 GROUP BY tab1.col2
----
3
45
71

skipif mysql # not compatible
query I rowsort label-5245
SELECT DISTINCT tab1.col2 + 44 / - col2 FROM tab1 GROUP BY tab1.col2
----
3
45
71

query I rowsort
SELECT + 91 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
91
91
91

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5247
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-5247
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

query I rowsort
SELECT DISTINCT - + 32 AS col1 FROM tab2 GROUP BY tab2.col0
----
-32

onlyif mysql # DIV for integer division: 
query I rowsort label-5249
SELECT ( - 67 ) DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-5249
SELECT ( - 67 ) / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
0
0
4

query I rowsort
SELECT DISTINCT + tab0.col2 * + 49 FROM tab0 GROUP BY col2
----
1176
1862
3871

query I rowsort
SELECT 16 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
16
16
16

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 19, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-19
-19
-19

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 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 80 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT ALL + 84 FROM tab2 AS cor0 GROUP BY cor0.col2
----
84
84
84

query I rowsort
SELECT tab2.col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT ( NULL ) NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT + 8 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
8
8

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-5261
SELECT cor0.col2 DIV col2 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5261
SELECT cor0.col2 / col2 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT 52 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
52
52
52

query I rowsort
SELECT 80 * col1 FROM tab2 AS cor0 GROUP BY col1
----
3280
4720
4880

query I rowsort
SELECT 8 * + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
120
728
736

query I rowsort
SELECT ALL + 30 FROM tab0 GROUP BY tab0.col2
----
30
30
30

query I rowsort
SELECT DISTINCT tab2.col2 + - 7 FROM tab2 GROUP BY tab2.col2
----
51
72
80

query I rowsort
SELECT col0 * cor0.col0 + + 32 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1881
6921
708

query I rowsort
SELECT - 62 FROM tab2 cor0 GROUP BY cor0.col2
----
-62
-62
-62

query I rowsort
SELECT + 59 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
59
59
59

query I rowsort
SELECT cor0.col0 + cor0.col0 * col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
506
6806
812

query I rowsort
SELECT DISTINCT + 65 FROM tab2 AS cor0 GROUP BY col2
----
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + cor0.col1 * col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
1936
3249
36

query I rowsort
SELECT DISTINCT + - 72 FROM tab0 GROUP BY tab0.col0
----
-72

query I rowsort
SELECT + 39 - - tab0.col0 FROM tab0 GROUP BY col0
----
122
65
82

query I rowsort
SELECT DISTINCT 88 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
88

query I rowsort
SELECT DISTINCT cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT ALL - - 83 FROM tab0 GROUP BY tab0.col0
----
83
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor1.col1 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 77 + + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-49
-55
5

query I rowsort
SELECT NULLIF ( - cor0.col2, cor0.col2 - + cor0.col2 * 41 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 61 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
61
61
61

query I rowsort
SELECT DISTINCT col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + 81 FROM tab2 GROUP BY tab2.col0
----
81
81
81

query I rowsort
SELECT + 13 AS col1 FROM tab2 GROUP BY tab2.col0
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + COALESCE ( + 83, + col0 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
83

query I rowsort
SELECT DISTINCT - 34 AS col1 FROM tab0 GROUP BY tab0.col0
----
-34

query I rowsort
SELECT ALL col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 36 AS col0 FROM tab0 GROUP BY tab0.col2
----
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 39 col0 FROM tab2 GROUP BY tab2.col2
----
39
39
39

query I rowsort
SELECT 77 FROM tab1 GROUP BY tab1.col2
----
77
77
77

query I rowsort
SELECT DISTINCT + tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL col0 - 98 * + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1455
-8827
-8924

query I rowsort
SELECT + 43 AS col1 FROM tab0 GROUP BY col2
----
43
43
43

query I rowsort
SELECT - 63 * cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
-2583
-3717
-3843

query I rowsort
SELECT tab2.col2 * 63 AS col1 FROM tab2 GROUP BY tab2.col2
----
3654
4977
5481

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col0 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
1305
184
5893

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT + col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 85 FROM tab0 AS cor0 GROUP BY cor0.col0
----
85
85
85

query I rowsort
SELECT ALL - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL 25 FROM tab0 cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT DISTINCT 91 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
91

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - 49 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-49
-49

query I rowsort
SELECT DISTINCT tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT 63 + col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
101
142
87

query I rowsort
SELECT + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - + 31 FROM tab2 GROUP BY tab2.col2
----
-31
-31
-31

query I rowsort
SELECT 17 AS col1 FROM tab1 GROUP BY tab1.col2
----
17
17
17

query I rowsort
SELECT cor0.col1 * col1 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6642

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * ( - 87 ) + + 89 col2 FROM tab2 cor0 GROUP BY cor0.col0
----
1394
8006
8093

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 90, cor1.col1 + 31 ) FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0, cor0.col1
----
9 values hashing to f6f26b9a04da14807208b93d507095c5

query I rowsort
SELECT DISTINCT - 52 - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1, col0
----
-131
-76
-90

query I rowsort
SELECT ALL - + ( + 85 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
-85
-85
-85

query I rowsort
SELECT ALL - + 24 + 57 AS col1 FROM tab2 GROUP BY tab2.col1
----
33
33
33

query I rowsort
SELECT - 40 AS col1 FROM tab1 GROUP BY tab1.col2
----
-40
-40
-40

query I rowsort
SELECT + col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 67 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
67

query I rowsort
SELECT - cor0.col2 * + 86 + - cor0.col2 * 61 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-10437
-1176
-6615

query I rowsort
SELECT ALL + cor0.col1 + + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT ALL tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL + 93 FROM tab2 AS cor0 GROUP BY col1
----
93
93
93

query I rowsort
SELECT DISTINCT - col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT 15 FROM tab1 GROUP BY tab1.col2
----
15
15
15

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0, cor0.col2
----
9 values hashing to 0b6eac60b12718df0c5ffc2484241344

query I rowsort
SELECT ALL 65 + - 87 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-22
-22
-22

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

query I rowsort
SELECT ALL - cor0.col1 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-57
38
79

query I rowsort
SELECT DISTINCT + cor0.col0 - 60 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-32
-38
22

query I rowsort
SELECT + 98 AS col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT - cor0.col1 - + ( 19 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-60
-78
-80

query I rowsort
SELECT cor0.col0 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 1 col0 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5337
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-5337
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col1
----
NULL

query I rowsort
SELECT 94 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
94
94
94

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 48 + 52 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1, cor0.col2
----
4
4
4

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5341
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-5341
SELECT ALL - + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 55 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
55
55
55

query I rowsort
SELECT DISTINCT - 79 FROM tab1 GROUP BY col0
----
-79

query I rowsort
SELECT - 28 FROM tab0 GROUP BY col0
----
-28
-28
-28

query I rowsort
SELECT + cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + ( 86 ) FROM tab2 GROUP BY tab2.col1
----
86
86
86

query I rowsort
SELECT - - 27 + 2 AS col0 FROM tab0 GROUP BY tab0.col1
----
29
29

query I rowsort
SELECT - 88 FROM tab1 GROUP BY tab1.col0
----
-88
-88
-88

query I rowsort
SELECT ALL + + 51 AS col1 FROM tab1 GROUP BY tab1.col0
----
51
51
51

query I rowsort
SELECT DISTINCT 69 + 36 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
105

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( + 39, col1 + - 65 ) FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
-39
-39
-39

query I rowsort
SELECT tab1.col0 * tab1.col0 + 1 AS col1 FROM tab1 GROUP BY col0
----
485
6725
785

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY col1 HAVING NOT NULL > NULL
----

query I rowsort
SELECT + 30 FROM tab0 AS cor0 GROUP BY cor0.col0
----
30
30
30

onlyif mysql # DIV for integer division: 
query I rowsort label-5356
SELECT DISTINCT - cor0.col1 DIV 92 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-5356
SELECT DISTINCT - cor0.col1 / 92 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT DISTINCT col1 * - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3772
-5369
-915

query I rowsort
SELECT + ( + 81 ) * col2 FROM tab2 GROUP BY tab2.col2
----
4698
6399
7047

query I rowsort
SELECT ALL - + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL 34 + - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-24
-45
-53

query I rowsort
SELECT + col1 + - 42 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-1
17
19

query I rowsort
SELECT DISTINCT + 44 AS col0 FROM tab0 cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
44

query I rowsort
SELECT DISTINCT 45 FROM tab2 GROUP BY tab2.col0
----
45

query I rowsort
SELECT + NULLIF ( cor0.col1, col0 + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
44
57
6

query I rowsort
SELECT 67 + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
108
126
128

query I rowsort
SELECT DISTINCT + tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT 20 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
20

query I rowsort
SELECT 35 FROM tab0 AS cor0 GROUP BY col2
----
35
35
35

query I rowsort
SELECT - 38 * cor0.col2 - 54 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1764
-2752
-358

onlyif mysql # DIV for integer division: 
query I rowsort label-5371
SELECT + tab1.col1 DIV - 74 + + 6 * - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-264
-342
-36

skipif mysql # not compatible
query I rowsort label-5371
SELECT + tab1.col1 / - 74 + + 6 * - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-264
-342
-36

query I rowsort
SELECT 6 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
6
6
6

query I rowsort
SELECT + 92 FROM tab1 AS cor0 GROUP BY cor0.col1
----
92
92
92

query I rowsort
SELECT col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT 53 FROM tab2 cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT - 98 AS col0 FROM tab1 GROUP BY tab1.col0
----
-98
-98
-98

query I rowsort
SELECT ALL - 27 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-27
-27
-27

query I rowsort
SELECT cor0.col1 - + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT 13 FROM tab1 AS cor0 GROUP BY cor0.col0
----
13
13
13

query I rowsort
SELECT cor0.col2 + + 0 AS col0 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT - + 16 + col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
42
63
71

query I rowsort
SELECT ALL 23 FROM tab1 cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT - + 57 FROM tab0 GROUP BY col1
----
-57
-57

query I rowsort
SELECT ALL + 29 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
29
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 27 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-27
-27
-27

onlyif mysql # DIV for integer division: 
query I rowsort label-5386
SELECT ALL 36 DIV + 18 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
2
2

skipif mysql # not compatible
query I rowsort label-5386
SELECT ALL 36 / + 18 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
2
2

query I rowsort
SELECT ALL - 45 FROM tab0 GROUP BY tab0.col0
----
-45
-45
-45

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.col2
----
44
57
6

query I rowsort
SELECT + cor0.col1 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
0
0
81

query I rowsort
SELECT 10 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
10
10
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 18 col1 FROM tab1 cor0 GROUP BY col0
----
18
18
18

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL IS NOT NULL
----

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5394
SELECT DISTINCT + CAST( NULL AS SIGNED ) * + 92 col1 FROM 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-5394
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * + 92 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT + 58 + 80 FROM tab0 AS cor0 GROUP BY cor0.col2
----
138
138
138

query I rowsort
SELECT ALL - - tab1.col1 AS col2 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 30 FROM tab1 cor0 GROUP BY col1
----
30

query I rowsort
SELECT col0 * cor0.col2 FROM tab2 cor0 GROUP BY col0, cor0.col2
----
1305
5336
7189

query I rowsort
SELECT ALL - 4 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-4
-4
-4

query I rowsort
SELECT + 42 AS col1 FROM tab2 GROUP BY tab2.col2
----
42
42
42

query I rowsort
SELECT + 7 AS col2 FROM tab1 GROUP BY tab1.col0
----
7
7
7

query I rowsort
SELECT col1 * - col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT 8 FROM tab0 cor0 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT DISTINCT - 53 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-53

query I rowsort
SELECT ALL col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col0 - + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-53
19
45

query I rowsort
SELECT + - 8 + + 5 AS col2 FROM tab0 GROUP BY col0
----
-3
-3
-3

query I rowsort
SELECT 94 FROM tab2 AS cor0 GROUP BY cor0.col2
----
94
94
94

query I rowsort
SELECT + 0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5411
SELECT DISTINCT cor0.col2 + - CAST( NULL AS SIGNED ) * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-5411
SELECT DISTINCT cor0.col2 + - CAST ( NULL AS INTEGER ) * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

query I rowsort
SELECT + 86 FROM tab0 AS cor0 GROUP BY cor0.col1
----
86
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 96 col2 FROM tab1 GROUP BY tab1.col1
----
96
96
96

query I rowsort
SELECT + col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 * - 28 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1232
1596
168

query I rowsort
SELECT cor0.col2 + 33 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
112
57
71

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5417
SELECT + CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5417
SELECT + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-5418
SELECT + tab1.col0 * - tab1.col0 + + col0 DIV - col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-485
-6725
-785

skipif mysql # not compatible
query I rowsort label-5418
SELECT + tab1.col0 * - tab1.col0 + + col0 / - col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-485
-6725
-785

query I rowsort
SELECT + 78 FROM tab0 cor0 GROUP BY cor0.col1
----
78
78

query I rowsort
SELECT ALL - + 52 AS col1 FROM tab1 GROUP BY tab1.col2
----
-52
-52
-52

query I rowsort
SELECT - 1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1
-1

query I rowsort
SELECT DISTINCT 6 FROM tab1 AS cor0 GROUP BY cor0.col1
----
6

query I rowsort
SELECT DISTINCT 30 FROM tab0 GROUP BY tab0.col2
----
30

query I rowsort
SELECT + 55 FROM tab2 GROUP BY tab2.col2
----
55
55
55

query I rowsort
SELECT - 82 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-82
-82
-82

query I rowsort
SELECT cor0.col1 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
138
148
99

query I rowsort
SELECT - 42 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-42
-42
-42

query I rowsort
SELECT 83 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
83
83
83

query I rowsort
SELECT DISTINCT - 54 AS col0 FROM tab0 cor0 GROUP BY col0, cor0.col0, cor0.col0
----
-54

query I rowsort
SELECT 50 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
50
50
50

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + 42 FROM tab0 GROUP BY tab0.col0
----
42
42
42

query I rowsort
SELECT - 66 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-66
-66
-66

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT ALL - 43 * 45 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1935
-1935
-1935

query I rowsort
SELECT 25 + cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
106
25

query I rowsort
SELECT DISTINCT - tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT - 93 FROM tab1 GROUP BY col1
----
-93
-93
-93

onlyif mysql # DIV for integer division: 
query I rowsort label-5439
SELECT ALL + cor0.col0 * 92 + + cor0.col0 DIV 15 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2393
3958
7641

skipif mysql # not compatible
query I rowsort label-5439
SELECT ALL + cor0.col0 * 92 + + cor0.col0 / 15 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2393
3958
7641

query I rowsort
SELECT 88 FROM tab2 AS cor0 GROUP BY cor0.col0
----
88
88
88

query I rowsort
SELECT ALL + 40 FROM tab2 GROUP BY tab2.col1
----
40
40
40

query I rowsort
SELECT 97 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT col1 + - 85 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-28
-41
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( + 81 ) col2 FROM tab0 GROUP BY tab0.col0
----
81
81
81

query I rowsort
SELECT + 52 AS col2 FROM tab2 GROUP BY tab2.col0
----
52
52
52

query I rowsort
SELECT + 47 FROM tab1 GROUP BY tab1.col0
----
47
47
47

query I rowsort
SELECT - 51 FROM tab1 GROUP BY tab1.col2
----
-51
-51
-51

query I rowsort
SELECT ALL + 38 + 62 FROM tab0 GROUP BY tab0.col0
----
100
100
100

query I rowsort
SELECT + NULLIF ( cor0.col0, + cor0.col0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 82 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-82
-82

query I rowsort
SELECT 21 + - tab0.col0 FROM tab0 GROUP BY col0
----
-22
-5
-62

query I rowsort
SELECT ALL + 27 + - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-54
27

query I rowsort
SELECT ALL + 92 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
92
92
92

query I rowsort
SELECT ALL + cor0.col2 * + cor0.col2 + - 58 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1386
518
6183

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT 38 FROM tab1 AS cor0 GROUP BY cor0.col2
----
38
38
38

query I rowsort
SELECT DISTINCT - - 84 FROM tab2 GROUP BY tab2.col0
----
84

query I rowsort
SELECT ALL - tab2.col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT - tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT 36 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
36

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + NULLIF ( COALESCE ( cor0.col0, 94, cor0.col1 * cor0.col0 + + cor0.col0 * 33 ), + 90 ) FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
15
91
92

query I rowsort
SELECT 49 FROM tab0 GROUP BY tab0.col1
----
49
49

query I rowsort
SELECT - 26 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-26
-26
-26

query I rowsort
SELECT 34 FROM tab0 AS cor0 GROUP BY cor0.col0
----
34
34
34

query I rowsort
SELECT - 98 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-98
-98
-98

query I rowsort
SELECT + 8 * + 99 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
792
792
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 30 col1 FROM tab2 AS cor0 GROUP BY col0
----
30
30
30

query I rowsort
SELECT DISTINCT cor0.col2 + + ( + 37 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
116
61
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 34 + - 3 * + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY col1, col2
----
-101
-179
10

query I rowsort
SELECT + ( 65 ) FROM tab1 GROUP BY tab1.col0
----
65
65
65

query I rowsort
SELECT - cor0.col2 - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-158
-48
-76

query I rowsort
SELECT - 62 FROM tab2 GROUP BY tab2.col1
----
-62
-62
-62

query I rowsort
SELECT - 89 AS col2 FROM tab2 GROUP BY tab2.col1
----
-89
-89
-89

query I rowsort
SELECT - 93 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-93
-93
-93

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5477
SELECT ALL + 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-5477
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 19 FROM tab2 GROUP BY tab2.col2
----
19

query I rowsort
SELECT DISTINCT + 53 FROM tab2 GROUP BY tab2.col0
----
53

query I rowsort
SELECT 88 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
88
88

query I rowsort
SELECT 20 FROM tab0 cor0 GROUP BY cor0.col1
----
20
20

query I rowsort
SELECT ALL + cor0.col1 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + 85 FROM tab0 GROUP BY col1
----
85

query I rowsort
SELECT DISTINCT - 43 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-43

query I rowsort
SELECT ALL + - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT ( + tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - col2 * 53 FROM tab2 cor0 GROUP BY cor0.col2
----
-3074
-4187
-4611

onlyif mysql # DIV for integer division: 
query I rowsort label-5491
SELECT DISTINCT - 26 DIV + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0

skipif mysql # not compatible
query I rowsort label-5491
SELECT DISTINCT - 26 / + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5492
SELECT cor1.col2 DIV cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5492
SELECT cor1.col2 / cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
1
1
1

query I rowsort
SELECT 12 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
12
12
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + 40 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
121
40

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT cor0.col1 + + 27 * 17 AS col0 FROM tab0 cor0 GROUP BY col1
----
459
540

query I rowsort
SELECT DISTINCT - 78 FROM tab1 GROUP BY tab1.col0
----
-78

query I rowsort
SELECT ALL - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-81
0

query I rowsort
SELECT 23 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
23
23
23

onlyif mysql # DIV for integer division: 
query I rowsort label-5500
SELECT cor0.col1 DIV + cor0.col1 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-43
-5
-56

skipif mysql # not compatible
query I rowsort label-5500
SELECT cor0.col1 / + cor0.col1 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-43
-5
-56

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
15
91
92

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 + col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ( col0 ) * col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT - ( + tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT 69 FROM tab0 GROUP BY col0
----
69
69
69

query I rowsort
SELECT ( - 3 ) * - col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
243

query I rowsort
SELECT cor0.col2 FROM tab2 cor0 GROUP BY col2, cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT + 86 * 67 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
5762
5762
5762

query I rowsort
SELECT DISTINCT + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT DISTINCT - 31 + - col2 FROM tab1 GROUP BY tab1.col2
----
-102
-39
-76

query I rowsort
SELECT ALL + ( 96 ) FROM tab2 GROUP BY tab2.col2
----
96
96
96

query I rowsort
SELECT DISTINCT - 22 FROM tab2 GROUP BY tab2.col1
----
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5515
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5515
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 31 FROM tab1 GROUP BY col2
----
31
31
31

query I rowsort
SELECT ALL cor0.col2 * col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT tab2.col1 * tab2.col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT - tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NOT NULL
----
-45
-71
-8

query I rowsort
SELECT 5 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
5
5
5

query I rowsort
SELECT tab2.col1 * + col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-1305
-5336
-7189

query I rowsort
SELECT 3 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3
3
3

onlyif mysql # DIV for integer division: 
query I rowsort label-5525
SELECT ALL ( 57 ) DIV col0 + - 41 * 33 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1351
-1351
-1353

skipif mysql # not compatible
query I rowsort label-5525
SELECT ALL ( 57 ) / col0 + - 41 * 33 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1351
-1351
-1353

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5526
SELECT + CAST( - cor0.col0 AS SIGNED ) FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-15
-91
-92

skipif mysql # not compatible
query I rowsort label-5526
SELECT + CAST ( - cor0.col0 AS INTEGER ) FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT ALL + tab0.col1 AS col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL 47 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
47
47
47

query I rowsort
SELECT DISTINCT + col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - cor0.col1 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-5532
SELECT 5 DIV + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5532
SELECT 5 / + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL 57 + cor0.col1 * - 43 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3426
57

query I rowsort
SELECT ALL 66 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
66
66
66

query I rowsort
SELECT - col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + 73 FROM tab1 GROUP BY tab1.col1
----
73
73
73

query I rowsort
SELECT - 42 FROM tab1 cor0 GROUP BY col0
----
-42
-42
-42

onlyif mysql # DIV for integer division: 
query I rowsort label-5538
SELECT ALL tab0.col2 DIV + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5538
SELECT ALL tab0.col2 / + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT 93 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
93
93
93

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5540
SELECT CAST( NULL AS SIGNED ) * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5540
SELECT CAST ( NULL AS INTEGER ) * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - 11 * 8 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-88

query I rowsort
SELECT DISTINCT - cor0.col1 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL + 82 FROM tab0 GROUP BY col1
----
82
82

query I rowsort
SELECT ALL + cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col0 + + tab1.col0 col1 FROM tab1 GROUP BY col0 HAVING NULL IS NULL
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-5549
SELECT DISTINCT + 19 + tab0.col1 DIV - 27 AS col1 FROM tab0 GROUP BY tab0.col1
----
16
19

skipif mysql # not compatible
query I rowsort label-5549
SELECT DISTINCT + 19 + tab0.col1 / - 27 AS col1 FROM tab0 GROUP BY tab0.col1
----
16
19

query I rowsort
SELECT ALL - 86 FROM tab2 GROUP BY tab2.col1
----
-86
-86
-86

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL 97 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col2 col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - col1 * + cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1640
-3422
-3660

query I rowsort
SELECT 37 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-5557
SELECT DISTINCT - 44 DIV 46 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-5557
SELECT DISTINCT - 44 / 46 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT 50 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
50

query I rowsort
SELECT ALL 73 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
118
144
81

query I rowsort
SELECT ALL + 47 AS col1 FROM tab0 GROUP BY tab0.col1
----
47
47

query I rowsort
SELECT col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT ( + 54 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
54

query I rowsort
SELECT DISTINCT - 23 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-23

query I rowsort
SELECT DISTINCT + 24 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
24

query I rowsort
SELECT DISTINCT + 57 * tab2.col0 + - 27 FROM tab2 GROUP BY tab2.col0
----
5160
5217
828

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 46 FROM tab1 AS cor0 GROUP BY cor0.col2
----
46

query I rowsort
SELECT + 13 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
13
13
13

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( + 26, + cor0.col1, + 66, + col2 ) FROM tab2 AS cor0 GROUP BY col1
----
26
26
26

query I rowsort
SELECT ALL + - col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
26
43
83

query I rowsort
SELECT DISTINCT 40 * - cor0.col0 - NULLIF ( 80, - 21 ) * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2640
-3360
-9840

query I rowsort
SELECT ALL 73 FROM tab0 cor0 GROUP BY cor0.col1, col1
----
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 76 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT - col2 * - 8 FROM tab1 AS cor0 GROUP BY cor0.col2
----
360
568
64

query I rowsort
SELECT cor0.col0 * + col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT + - cor0.col2 * cor0.col2 FROM tab2, tab0 cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 1 col0 FROM tab0 GROUP BY col1
----
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 30 col1 FROM tab1 GROUP BY tab1.col0
----
30
30
30

query I rowsort
SELECT 12 FROM tab2 GROUP BY tab2.col0
----
12
12
12

query I rowsort
SELECT - cor0.col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL + 96 FROM tab2 AS cor0 GROUP BY cor0.col1
----
96
96
96

query I rowsort
SELECT 46 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
46
46
46

query I rowsort
SELECT + 47 AS col2 FROM tab1 cor0 GROUP BY col1
----
47
47
47

query I rowsort
SELECT ALL 28 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
28
28
28

query I rowsort
SELECT cor0.col2 * 45 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2610
3555
3915

query I rowsort
SELECT DISTINCT cor0.col0 - NULLIF ( cor0.col1, + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-46
32
51

query I rowsort
SELECT ALL 84 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
84
84
84

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( + 11, cor0.col1 + + cor0.col2, 62 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-11
-11
-11

query I rowsort
SELECT DISTINCT col1 + 17 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
58
76
78

query I rowsort
SELECT DISTINCT 76 FROM tab2 cor0 GROUP BY cor0.col2
----
76

query I rowsort
SELECT 6 * cor0.col0 + 29 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
161
197
521

query I rowsort
SELECT - cor0.col2 * cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + + 79 + 50 AS col1 FROM tab0 GROUP BY tab0.col0
----
129
129
129

query I rowsort
SELECT - 16 AS col0 FROM tab0 GROUP BY tab0.col0
----
-16
-16
-16

query I rowsort
SELECT 16 FROM tab2 GROUP BY tab2.col1
----
16
16
16

query I rowsort
SELECT 92 FROM tab2 cor0 GROUP BY col2, cor0.col0
----
92
92
92

query I rowsort
SELECT + 13 AS col0 FROM tab2 GROUP BY tab2.col1
----
13
13
13

onlyif mysql # DIV for integer division: 
query I rowsort label-5601
SELECT - 24 DIV cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-5601
SELECT - 24 / cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
-3
0
0

query I rowsort
SELECT DISTINCT + - 23 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
-23

query I rowsort
SELECT DISTINCT + - 15 FROM tab0 GROUP BY tab0.col0
----
-15

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT + 64 AS col2 FROM tab2 GROUP BY tab2.col0
----
64
64
64

query I rowsort
SELECT DISTINCT + 83 FROM tab1 AS cor0 GROUP BY cor0.col1
----
83

query I rowsort
SELECT - tab2.col2 * 11 AS col0 FROM tab2 GROUP BY tab2.col2
----
-638
-869
-957

query I rowsort
SELECT col2 * - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT - cor0.col1 * + 14 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-616
-798
-84

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
1305
5336
7189

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-5613
SELECT DISTINCT 54 DIV - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-6
0

skipif mysql # not compatible
query I rowsort label-5613
SELECT DISTINCT 54 / - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-6
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5614
SELECT ALL + CAST( ( 28 ) AS SIGNED ) col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
28
28
28

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5614
SELECT ALL + CAST ( ( 28 ) AS INTEGER ) col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT DISTINCT - 58 FROM tab2 AS cor0 GROUP BY col2
----
-58

query I rowsort
SELECT DISTINCT - ( - tab1.col1 ) + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT + - tab0.col0 + 19 FROM tab0 GROUP BY tab0.col0
----
-24
-64
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT COALESCE ( - cor0.col1, + col0 ) + - 11 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-52
-70
-72

query I rowsort
SELECT DISTINCT - 44 - + 71 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-115

query I rowsort
SELECT + 89 * - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-2314
-3827
-7387

query I rowsort
SELECT - 26 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2054
-624
-988

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 92 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
92
92
92

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL + 66 * - 40 AS col0 FROM tab0 GROUP BY tab0.col0
----
-2640
-2640
-2640

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 19 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-19
-19
-19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 17 col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
17
17
17

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

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 ALL - 24 AS col2 FROM tab2 GROUP BY tab2.col2
----
-24
-24
-24

query I rowsort
SELECT cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0, cor1.col0
----
9 values hashing to 559da8f454c4e5599b87319641a4f49a

query I rowsort
SELECT - - 90 AS col1 FROM tab1 GROUP BY tab1.col1
----
90
90
90

query I rowsort
SELECT ALL - 61 AS col0 FROM tab1 GROUP BY tab1.col0
----
-61
-61
-61

query I rowsort
SELECT ALL 75 FROM tab0 GROUP BY tab0.col0
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 18 * cor0.col2 col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1422
432
684

query I rowsort
SELECT ALL 57 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
57
57
57

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT + cor0.col2 + - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT - 8 AS col0 FROM tab0 GROUP BY tab0.col1
----
-8
-8

query I rowsort
SELECT 93 * - col1 - - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-3755
-5408
-5586

query I rowsort
SELECT ALL - 21 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-21
-21
-21

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5642
SELECT DISTINCT + CAST( 51 AS SIGNED ) FROM tab0 cor0 GROUP BY col0
----
51

skipif mysql # not compatible
query I rowsort label-5642
SELECT DISTINCT + CAST ( 51 AS INTEGER ) FROM tab0 cor0 GROUP BY col0
----
51

query I rowsort
SELECT ALL - cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - - 88 FROM tab0 GROUP BY tab0.col2
----
88

query I rowsort
SELECT ALL 41 FROM tab2 GROUP BY tab2.col2
----
41
41
41

query I rowsort
SELECT DISTINCT ( tab0.col2 ) FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL + 69 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
160
161
84

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5648
SELECT - NULLIF ( 47, cor0.col1 - + CAST( NULL AS SIGNED ) ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-47
-47
-47

skipif mysql # not compatible
query I rowsort label-5648
SELECT - NULLIF ( 47, cor0.col1 - + CAST ( NULL AS INTEGER ) ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-47
-47
-47

query I rowsort
SELECT - tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT col0 - tab2.col0 FROM tab2 GROUP BY col0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 GROUP BY col2, col1
----
24
38
79

query I rowsort
SELECT + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
484
6724
784

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + 64 FROM tab1 GROUP BY tab1.col1
----
64

query I rowsort
SELECT ALL 68 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
68
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL col2 * 52 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1248
1976
4108

query I rowsort
SELECT + ( + cor0.col1 ) * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL 36 * + cor0.col1 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1435
2065
2135

query I rowsort
SELECT 25 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1450
1975
2175

query I rowsort
SELECT ALL - - col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT cor0.col2 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT DISTINCT col0 + - cor0.col1 * - 66 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
2798
3985
4041

onlyif mysql # DIV for integer division: 
query I rowsort label-5668
SELECT cor0.col1 DIV - cor0.col1 - 81 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-82
-82
-82

skipif mysql # not compatible
query I rowsort label-5668
SELECT cor0.col1 / - cor0.col1 - 81 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-82
-82
-82

query I rowsort
SELECT + col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

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 col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT - 93 + + 98 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col0
----
5
5
5

query I rowsort
SELECT ALL 47 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
47
47
47

query I rowsort
SELECT col0 FROM tab0 cor0 GROUP BY col2, cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT + tab2.col0 * - 14 FROM tab2 GROUP BY tab2.col0
----
-1274
-1288
-210

query I rowsort
SELECT ALL tab2.col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT 17 FROM tab0 GROUP BY col0
----
17
17
17

query I rowsort
SELECT ALL + 36 * 60 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
2160
2160
2160

query I rowsort
SELECT DISTINCT 25 FROM tab1 AS cor0 GROUP BY cor0.col2
----
25

query I rowsort
SELECT DISTINCT + col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col1 * 10 FROM tab0 AS cor0 GROUP BY col1
----
0
810

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, col1
----
-26
-43
-83

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT ( - cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT 2 + + tab0.col0 FROM tab0 GROUP BY col0
----
28
45
85

query I rowsort
SELECT DISTINCT + 23 FROM tab1 AS cor0 GROUP BY cor0.col1
----
23

query I rowsort
SELECT DISTINCT 38 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
38

query I rowsort
SELECT ALL - col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + 76 + cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
560
6800
860

query I rowsort
SELECT ALL 34 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
34
34
34

query I rowsort
SELECT ALL + cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT cor0.col0 + col0 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT ALL tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL + cor0.col1 + 66 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
107
125
127

query I rowsort
SELECT 79 * tab0.col2 FROM tab0 GROUP BY col2
----
1896
3002
6241

query I rowsort
SELECT DISTINCT tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL + tab2.col1 * + col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT - 45 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-45
-45
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 74 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-74
-74
-74

query I rowsort
SELECT + 84 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT cor0.col2 + - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, col1
----
-81
0
0

query I rowsort
SELECT ALL + COALESCE ( - col2, + col2 * cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT 35 FROM tab0 GROUP BY col1
----
35

query I rowsort
SELECT DISTINCT 83 AS col1 FROM tab0 GROUP BY col2
----
83

query I rowsort
SELECT + 64 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
64
64
64

query I rowsort
SELECT - col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
-81
0
0

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col1, - NULLIF ( - cor0.col0, - cor0.col0 - cor0.col0 ) ) * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
6561

query I rowsort
SELECT DISTINCT - 31 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-31

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 45 * + 81 col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
3645
3645
3645

query I rowsort
SELECT - 84 + 14 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-70
-70
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT 13 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
13
13
13

query I rowsort
SELECT - 67 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-67
-67
-67

query I rowsort
SELECT + + 91 AS col1 FROM tab2 GROUP BY tab2.col1
----
91
91
91

query I rowsort
SELECT ALL + - tab0.col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL - 73 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-73
-73
-73

query I rowsort
SELECT ALL + 25 FROM tab0 GROUP BY col1
----
25
25

query I rowsort
SELECT DISTINCT + 0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT + cor0.col1 * - 21 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1197
-126
-924

onlyif mysql # DIV for integer division: 
query I rowsort label-5727
SELECT 22 DIV - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5727
SELECT 22 / - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 11 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
11

query I rowsort
SELECT ALL 15 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
102
73
94

query I rowsort
SELECT ALL col0 * 1 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 + - 74 col0 FROM tab0 GROUP BY col0
----
-74

query I rowsort
SELECT 49 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT ALL 62 FROM tab0 AS cor0 GROUP BY col1
----
62
62

query I rowsort
SELECT ALL + 66 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
66
66
66

query I rowsort
SELECT ALL 43 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
43
43

query I rowsort
SELECT 71 + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
114
154
97

query I rowsort
SELECT + 15 FROM tab2 GROUP BY tab2.col2
----
15
15
15

query I rowsort
SELECT ALL 41 * + col0 FROM tab2 cor0 GROUP BY cor0.col0
----
3731
3772
615

query I rowsort
SELECT ALL cor0.col0 * - 50 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1100
-1400
-4100

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + 81 FROM tab2 GROUP BY tab2.col1
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 77 col0 FROM tab2 GROUP BY tab2.col0
----
-77
-77
-77

query I rowsort
SELECT + 45 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT ALL col2 * + cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1482
600
6320

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
2025
5041
64

query I rowsort
SELECT - 74 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-74
-74
-74

query I rowsort
SELECT ALL - 71 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-71
-71
-71

query I rowsort
SELECT + cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + 63 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
63

query I rowsort
SELECT ALL 74 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
74
74
74

query I rowsort
SELECT 27 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
27
27
27

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-5753
SELECT ALL cor0.col0 + 98 DIV - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
9
90
91

skipif mysql # not compatible
query I rowsort label-5753
SELECT ALL cor0.col0 + 98 / - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
9
90
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 40 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
40
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 65 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
65
65
65

query I rowsort
SELECT 91 + + 73 FROM tab0 GROUP BY tab0.col2
----
164
164
164

query I rowsort
SELECT DISTINCT + 28 AS col0 FROM tab0 GROUP BY tab0.col2
----
28

query I rowsort
SELECT DISTINCT - - tab1.col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 52 AS col2 FROM tab1 GROUP BY col1
----
-52

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0
0

query I rowsort
SELECT DISTINCT - - 22 AS col0 FROM tab2 GROUP BY tab2.col0
----
22

query I rowsort
SELECT 83 FROM tab2 AS cor0 GROUP BY cor0.col1
----
83
83
83

query I rowsort
SELECT + 66 + 95 * col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
2536
4151
7951

query I rowsort
SELECT - 35 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-35
-35
-35

query I rowsort
SELECT DISTINCT - cor0.col1 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-162
0

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL cor0.col2 + - ( + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col1 * 26 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1144
1482
156

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT - tab0.col2 * 85 AS col1 FROM tab0 GROUP BY tab0.col2
----
-2040
-3230
-6715

query I rowsort
SELECT DISTINCT 26 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
26

query I rowsort
SELECT ALL 85 FROM tab1 AS cor0 GROUP BY cor0.col2
----
85
85
85

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT 66 + COALESCE ( + 68, + cor0.col2 * + 81 ) FROM tab1 AS cor0 GROUP BY col1
----
134
134
134

query I rowsort
SELECT ALL + cor0.col2 + 83 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3690
-5822
-656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 46 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
46

onlyif mysql # DIV for integer division: 
query I rowsort label-5776
SELECT ( cor0.col1 ) DIV + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5776
SELECT ( cor0.col1 ) / + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
1
1
1

query I rowsort
SELECT ( - tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 42 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1848
2394
252

query I rowsort
SELECT ALL 53 FROM tab1 cor0 GROUP BY cor0.col1
----
53
53
53

query I rowsort
SELECT DISTINCT 75 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
75

query I rowsort
SELECT DISTINCT - 32 AS col1 FROM tab1 GROUP BY tab1.col2
----
-32

query I rowsort
SELECT DISTINCT 16 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
57
75
77

onlyif mysql # DIV for integer division: 
query I rowsort label-5783
SELECT ALL tab0.col2 DIV + 78 AS col1 FROM tab0 GROUP BY col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5783
SELECT ALL tab0.col2 / + 78 AS col1 FROM tab0 GROUP BY col2
----
0
0
1

query I rowsort
SELECT ( cor0.col0 ) * - cor0.col0 + 29 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-455
-6695
-755

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 - cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL 18 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT ALL + 58 AS col2 FROM tab0 cor0 GROUP BY col0, cor0.col0
----
58
58
58

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT - cor0.col2 * - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + ( + 3 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
3
3
3

query I rowsort
SELECT DISTINCT 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
40

query I rowsort
SELECT 73 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
111
152
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 - cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-162
0

query I rowsort
SELECT + col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL cor1.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT ALL ( - 32 ) FROM tab0 GROUP BY tab0.col2
----
-32
-32
-32

onlyif mysql # DIV for integer division: 
query I rowsort label-5799
SELECT ALL cor0.col0 DIV 59 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-5799
SELECT ALL cor0.col0 / 59 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1
1

query I rowsort
SELECT 25 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor0.col2
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT ALL - 64 - 95 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-159
-159
-159

query I rowsort
SELECT DISTINCT - - tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT 2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2
2
2

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 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 62 FROM tab1 GROUP BY col2
----
62

query I rowsort
SELECT 43 FROM tab0 AS cor0 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT 69 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
69
69
69

query I rowsort
SELECT DISTINCT - 98 FROM tab1 cor0 GROUP BY cor0.col0
----
-98

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL < NULL
----

query I rowsort
SELECT + cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT tab1.col1 + col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 GROUP BY cor0.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 cor0 CROSS JOIN tab0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - 56 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-56
-56

query I rowsort
SELECT ALL + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT + col1 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL + 67 FROM tab0 cor0 GROUP BY cor0.col1
----
67
67

query I rowsort
SELECT DISTINCT + 5 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT tab2.col2 * col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT + col2 + + 86 FROM tab1 GROUP BY tab1.col2
----
131
157
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT + cor0.col0 * + 16 FROM tab0 AS cor0 GROUP BY col0
----
1328
416
688

query I rowsort
SELECT DISTINCT - 48 FROM tab2 GROUP BY tab2.col1
----
-48

query I rowsort
SELECT + 45 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
45
45
45

query I rowsort
SELECT 54 FROM tab1 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT 64 AS col0 FROM tab1 GROUP BY tab1.col0
----
64
64
64

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-58
-79
-87

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col0
----
9 values hashing to a28a9a955c366855d054ae16e20e38ff

query I rowsort
SELECT - col1 - 24 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
-105
-24
-24

query I rowsort
SELECT ALL 81 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT ALL 31 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
31
31
31

query I rowsort
SELECT + + tab0.col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT cor0.col1 + - 9 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
32
50
52

query I rowsort
SELECT ALL 67 * 87 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
5829
5829
5829

query I rowsort
SELECT 95 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
95
95

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT col2 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 DISTINCT + 71 col0 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col2 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - 34 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-34
-34
-34

query I rowsort
SELECT DISTINCT 51 AS col1 FROM tab2 GROUP BY tab2.col1
----
51

query I rowsort
SELECT - 13 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-13
-13
-13

query I rowsort
SELECT ALL col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + 19 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT DISTINCT + + col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + tab0.col1 + - 45 AS col0 FROM tab0 GROUP BY col1
----
-45
36

query I rowsort
SELECT cor0.col0 + - COALESCE ( cor0.col1 + cor0.col0, - col1 ) * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-4621
-5361
-8759

query I rowsort
SELECT DISTINCT + cor0.col1 + 95 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
176
95

query I rowsort
SELECT ALL + 66 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
66
66
66

query I rowsort
SELECT ALL + col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col1 + 45 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
126
45

query I rowsort
SELECT + 92 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4140
6532
736

query I rowsort
SELECT ALL ( + 85 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
85
85
85

query I rowsort
SELECT ALL + 75 FROM tab2 AS cor0 GROUP BY cor0.col0
----
75
75
75

query I rowsort
SELECT DISTINCT - 45 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-45

query I rowsort
SELECT + 95 AS col2 FROM tab1 GROUP BY col0
----
95
95
95

query I rowsort
SELECT - cor0.col1 + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT cor1.col2 AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + - cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-164
-44
-56

query I rowsort
SELECT - tab2.col0 FROM tab2 WHERE NOT + col0 + - col2 IS NOT NULL GROUP BY tab2.col0
----

query I rowsort
SELECT 7 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT ALL - + 37 AS col0 FROM tab0 GROUP BY tab0.col2
----
-37
-37
-37

query I rowsort
SELECT DISTINCT cor0.col0 * - 14 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
-1162
-364
-602

query I rowsort
SELECT cor0.col1 - + cor0.col1 * + 73 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col1
----
-5832
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 19 col2 FROM tab1 AS cor0 GROUP BY col0
----
19

query I rowsort
SELECT + - col1 AS col2 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL 27 FROM tab1 AS cor0 GROUP BY cor0.col2
----
27
27
27

query I rowsort
SELECT DISTINCT - 30 FROM tab0 GROUP BY tab0.col0
----
-30

query I rowsort
SELECT DISTINCT 22 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
22

query I rowsort
SELECT DISTINCT - 79 * + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-3239
-4661
-4819

query I rowsort
SELECT DISTINCT - 33 FROM tab0 GROUP BY tab0.col0
----
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col1 FROM tab0 AS cor0 GROUP BY col0, col1
----
0
0
81

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT 87 FROM tab2 AS cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT ALL 65 FROM tab0 AS cor0 GROUP BY cor0.col1
----
65
65

query I rowsort
SELECT ALL 63 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
63
63
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + 2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
26
40
81

query I rowsort
SELECT ALL + ( cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + 71 FROM tab1 GROUP BY tab1.col1
----
71
71
71

query I rowsort
SELECT DISTINCT 70 + + cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
113
153
96

query I rowsort
SELECT + cor0.col0 * + col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
484
6724
784

query I rowsort
SELECT cor0.col2 + - 48 FROM tab2 AS cor0 GROUP BY cor0.col2
----
10
31
39

query I rowsort
SELECT + col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 54 + COALESCE ( col2, cor0.col2, cor0.col2 ) * col2 col1 FROM tab0 cor0 GROUP BY cor0.col2
----
1498
6295
630

query I rowsort
SELECT 59 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
59
59

query I rowsort
SELECT + + 6 FROM tab1 GROUP BY tab1.col0
----
6
6
6

query I rowsort
SELECT 59 FROM tab1 AS cor0 GROUP BY cor0.col0
----
59
59
59

query I rowsort
SELECT 3 * cor0.col0 + + 27 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
111
273
93

query I rowsort
SELECT 6 * col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
264
342
36

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 + - 82 * 97 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-14515
-7954

query I rowsort
SELECT ALL 40 FROM tab2 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT ALL 13 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
13
13
13

query I rowsort
SELECT + ( - cor0.col0 ) + - col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-182
-184
-30

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + 21 FROM tab1 AS cor0 GROUP BY col1
----
21
21
21

query I rowsort
SELECT DISTINCT 59 FROM tab2 AS cor0 GROUP BY cor0.col0
----
59

query I rowsort
SELECT + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 95 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
95

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5910
SELECT DISTINCT + tab1.col1 * + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-5910
SELECT DISTINCT + tab1.col1 * + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
NULL

query I rowsort
SELECT DISTINCT tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 - 3 col0 FROM tab1 AS cor0 GROUP BY col0
----
19
25
79

query I rowsort
SELECT - 79 AS col1 FROM tab0 GROUP BY tab0.col2
----
-79
-79
-79

query I rowsort
SELECT ALL col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT 10 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
10
10
10

query I rowsort
SELECT - 81 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-81
-81
-81

query I rowsort
SELECT ALL + 41 FROM tab1 AS cor0 GROUP BY cor0.col1
----
41
41
41

query I rowsort
SELECT ALL 17 FROM tab0 GROUP BY tab0.col1
----
17
17

query I rowsort
SELECT ALL + 73 FROM tab2 cor0 GROUP BY cor0.col2
----
73
73
73

query I rowsort
SELECT 73 FROM tab2 cor0 GROUP BY cor0.col1
----
73
73
73

query I rowsort
SELECT - col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 45 FROM tab1 GROUP BY col2
----
45

query I rowsort
SELECT ALL + 24 FROM tab0 GROUP BY tab0.col2
----
24
24
24

query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT DISTINCT + + 69 AS col2 FROM tab1 GROUP BY tab1.col1
----
69

query I rowsort
SELECT DISTINCT - 87 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-5927
SELECT DISTINCT + tab2.col0 DIV 17 FROM tab2 GROUP BY col0
----
0
5

skipif mysql # not compatible
query I rowsort label-5927
SELECT DISTINCT + tab2.col0 / 17 FROM tab2 GROUP BY col0
----
0
5

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col0 * 36 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
1548
2988
936

query I rowsort
SELECT DISTINCT cor0.col2 * 18 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1278
144
810

query I rowsort
SELECT - cor0.col2 * - 26 + 54 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1042
2108
678

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 82 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-82

query I rowsort
SELECT 2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
15
91
92

query I rowsort
SELECT 22 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
22
22
22

query I rowsort
SELECT ALL ( 60 ) * - 59 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-3540
-3540

query I rowsort
SELECT DISTINCT - 83 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-83

query I rowsort
SELECT DISTINCT col1 + + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT 83 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
83
83
83

onlyif mysql # DIV for integer division: 
query I rowsort label-5941
SELECT - cor0.col0 DIV + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5941
SELECT - cor0.col0 / + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL 2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2
2
2

query I rowsort
SELECT ALL + - 29 FROM tab1 GROUP BY tab1.col2
----
-29
-29
-29

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5945
SELECT - CAST( NULL AS SIGNED ) * - 5 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5945
SELECT - CAST ( NULL AS INTEGER ) * - 5 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + 62 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
5022

query I rowsort
SELECT DISTINCT + 42 FROM tab0 AS cor0 GROUP BY col1
----
42

onlyif mysql # DIV for integer division: 
query I rowsort label-5948
SELECT DISTINCT cor0.col2 DIV + 44 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-5948
SELECT DISTINCT cor0.col2 / + 44 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1

query I rowsort
SELECT ALL - cor0.col2 * + 31 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1798
-2449
-2697

query I rowsort
SELECT ALL 64 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
64
64
64

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - 85 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4930
6715
7395

query I rowsort
SELECT - col0 * + col0 - - col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-210
-8190
-8372

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 76 * 53 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
4028

query I rowsort
SELECT DISTINCT 23 + 15 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
38

query I rowsort
SELECT + cor0.col2 + + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT ALL 73 - + 4 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
69
69
69

query I rowsort
SELECT ALL + 0 AS col1 FROM tab2 GROUP BY col2
----
0
0
0

query I rowsort
SELECT DISTINCT - - 55 FROM tab2 GROUP BY col0
----
55

query I rowsort
SELECT ALL 39 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
39
39
39

query I rowsort
SELECT ALL - 3 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
246
66
84

query I rowsort
SELECT ALL 19 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT + 68 FROM tab2 cor0 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT - ( - 21 ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col0
----
21
21
21

query I rowsort
SELECT - 43 - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-126
-69
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 68 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-68
-68
-68

query I rowsort
SELECT 36 FROM tab0 GROUP BY col0
----
36
36
36

query I rowsort
SELECT - 5 FROM tab0 GROUP BY col2
----
-5
-5
-5

query I rowsort
SELECT ALL - 67 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-67
-67
-67

query I rowsort
SELECT DISTINCT + tab1.col2 FROM tab1 GROUP BY col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 19 FROM tab2 GROUP BY tab2.col0
----
-19

query I rowsort
SELECT DISTINCT + ( ( cor0.col0 ) ) FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT + - 3 AS col1 FROM tab0 GROUP BY tab0.col0
----
-3

query I rowsort
SELECT 1 + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
45
58
7

query I rowsort
SELECT + 36 FROM tab1 AS cor0 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT ALL - col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT - cor0.col1 * 62 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-2728
-3534
-372

query I rowsort
SELECT DISTINCT 30 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
30

onlyif mysql # DIV for integer division: 
query I rowsort label-5982
SELECT - tab0.col2 DIV + col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5982
SELECT - tab0.col2 / + col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + 30 FROM tab1 AS cor0 GROUP BY cor0.col0
----
30
30
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 97 col2 FROM tab2 GROUP BY tab2.col2
----
97
97
97

query I rowsort
SELECT ALL - + 89 AS col2 FROM tab1 GROUP BY tab1.col2
----
-89
-89
-89

query I rowsort
SELECT DISTINCT + 88 FROM tab0 cor0 GROUP BY cor0.col2
----
88

query I rowsort
SELECT 92 * + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4140
6532
736

query I rowsort
SELECT + 61 * col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3538
4819
5307

query I rowsort
SELECT + cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT 84 FROM tab1 cor0 GROUP BY col1
----
84

query I rowsort
SELECT tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT - 22 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-22
-22
-22

query I rowsort
SELECT DISTINCT - 86 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-86

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 ALL - ( cor0.col1 ) * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT ALL - ( + cor0.col1 ) + + 94 FROM tab1 AS cor0 GROUP BY cor0.col1
----
37
50
88

query I rowsort
SELECT cor0.col0 + + 35 FROM tab0 AS cor0 GROUP BY cor0.col0
----
118
61
78

query I rowsort
SELECT + 71 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
71
71
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 76 * - cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1672
2128
6232

query I rowsort
SELECT cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT DISTINCT + - tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT 95 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT ALL - 35 * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1505
-2905
-910

query I rowsort
SELECT ( + ( - 48 ) ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-48
-48
-48

query I rowsort
SELECT - 59 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-59
-59
-59

query I rowsort
SELECT ALL 32 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
32
32
32

query I rowsort
SELECT ALL - 44 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
-44
-44
-44

query I rowsort
SELECT - 10 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-10
-10
-10

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1849
676
6889

query I rowsort
SELECT 10 - + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-12
-18
-72

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL 6 FROM tab0 AS cor0 GROUP BY cor0.col0
----
6
6
6

onlyif mysql # DIV for integer division: 
query I rowsort label-6014
SELECT DISTINCT + COALESCE ( 96, col0, cor0.col1 + cor0.col2 DIV - cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
96

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-6014
SELECT DISTINCT + COALESCE ( 96, col0, cor0.col1 + cor0.col2 / - cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
96

query I rowsort
SELECT + 79 FROM tab2 cor0 GROUP BY cor0.col1
----
79
79
79

query I rowsort
SELECT 87 FROM tab2 GROUP BY col1
----
87
87
87

query I rowsort
SELECT - + tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT + 82 * - col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-1804
-2296
-6724

query I rowsort
SELECT + 52 AS col1 FROM tab1 GROUP BY tab1.col1
----
52
52
52

query I rowsort
SELECT - 74 AS col1 FROM tab2 GROUP BY tab2.col1
----
-74
-74
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 col2 FROM tab2 GROUP BY tab2.col1
----
13
13
13

query I rowsort
SELECT 7 FROM tab2 GROUP BY tab2.col2
----
7
7
7

query I rowsort
SELECT DISTINCT 41 FROM tab1 AS cor0 GROUP BY cor0.col2
----
41

query I rowsort
SELECT + - 95 FROM tab1 GROUP BY tab1.col2
----
-95
-95
-95

query I rowsort
SELECT 29 FROM tab1 cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT ALL - 26 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-26
-26
-26

query I rowsort
SELECT 70 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
1820
3010
5810

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-1032
-2054
-3154

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT - col2 * cor0.col2 + - 98 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-1542
-6339
-674

query I rowsort
SELECT ALL + 80 * + 9 FROM tab0 AS cor0 GROUP BY cor0.col2
----
720
720
720

query I rowsort
SELECT + 10 FROM tab0 GROUP BY tab0.col0
----
10
10
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 99 + cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
140
158
160

query I rowsort
SELECT - 53 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-53
-53
-53

onlyif mysql # DIV for integer division: 
query I rowsort label-6035
SELECT ALL cor0.col0 DIV + 21 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
4
4

skipif mysql # not compatible
query I rowsort label-6035
SELECT ALL cor0.col0 / + 21 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
4
4

query I rowsort
SELECT ALL + ( + 61 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
61
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 72 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
72
72
72

onlyif mysql # DIV for integer division: 
query I rowsort label-6038
SELECT 58 DIV col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6038
SELECT 58 / col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
0
1
2

query I rowsort
SELECT 38 * col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3458
3496
570

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 * tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab1 WHERE NULL NOT IN ( + tab1.col1 ) GROUP BY col1 HAVING NULL <> NULL
----

query I rowsort
SELECT DISTINCT - 96 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-96

query I rowsort
SELECT + cor0.col1 + - 8 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2
36
49

query I rowsort
SELECT - + tab0.col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT 83 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
83
83
83

query I rowsort
SELECT cor0.col0 + - col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2 cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL 20 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
20
20
20

query I rowsort
SELECT ALL - 15 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-15
-15
-15

query I rowsort
SELECT + 51 FROM tab1 GROUP BY tab1.col2
----
51
51
51

query I rowsort
SELECT + 80 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT ALL 14 AS col2 FROM tab2 cor0 GROUP BY col1
----
14
14
14

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-81
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6057
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-6057
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * 55 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1210
1540
4510

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6059
SELECT CAST( - 40 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-40
-40
-40

skipif mysql # not compatible
query I rowsort label-6059
SELECT CAST ( - 40 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-40
-40
-40

query I rowsort
SELECT - 0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT 29 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
29
29
29

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col0, - cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - 28 AS col0 FROM tab2 GROUP BY tab2.col0
----
-28
-28
-28

query I rowsort
SELECT + 50 FROM tab0 GROUP BY col1
----
50
50

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6065
SELECT CAST( 62 AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
62
62
62

skipif mysql # not compatible
query I rowsort label-6065
SELECT CAST ( 62 AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
62
62
62

query I rowsort
SELECT - cor0.col1 * - 40 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1640
2360
2440

query I rowsort
SELECT 2 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT 34 * - ( - cor0.col1 * - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-118422
0
0

query I rowsort
SELECT 4 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4
4
4

query I rowsort
SELECT - 43 FROM tab1 AS cor0 GROUP BY col1
----
-43
-43
-43

query I rowsort
SELECT + 24 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
24
24
24

query I rowsort
SELECT ALL col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - 46 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-46
-46
-46

query I rowsort
SELECT DISTINCT - 88 * tab0.col0 + - 52 AS col0 FROM tab0 GROUP BY tab0.col0
----
-2340
-3836
-7356

query I rowsort
SELECT + 92 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
92
92
92

query I rowsort
SELECT - col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL 70 AS col1 FROM tab1 GROUP BY tab1.col0
----
70
70
70

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 * - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT - 90 + + col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-62
-68
-8

query I rowsort
SELECT - - 67 FROM tab2 GROUP BY tab2.col2
----
67
67
67

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
0
162

onlyif mysql # DIV for integer division: 
query I rowsort label-6085
SELECT - cor0.col2 * + cor0.col1 - ( + cor0.col2 ) DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2379
-4662
-5308

skipif mysql # not compatible
query I rowsort label-6085
SELECT - cor0.col2 * + cor0.col1 - ( + cor0.col2 ) / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2379
-4662
-5308

query I rowsort
SELECT + 50 + + col2 AS col2 FROM tab1 GROUP BY col2
----
121
58
95

query I rowsort
SELECT + tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - 74 + tab2.col2 FROM tab2 GROUP BY col2
----
-16
13
5

query I rowsort
SELECT - 54 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-54
-54
-54

query I rowsort
SELECT DISTINCT + 65 FROM tab2 GROUP BY tab2.col0
----
65

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6091
SELECT DISTINCT - CAST( - col1 AS SIGNED ) * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

skipif mysql # not compatible
query I rowsort label-6091
SELECT DISTINCT - CAST ( - col1 AS INTEGER ) * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6092
SELECT + CAST( cor0.col2 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

skipif mysql # not compatible
query I rowsort label-6092
SELECT + CAST ( cor0.col2 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-6093
SELECT ALL 51 DIV - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-8
0

skipif mysql # not compatible
query I rowsort label-6093
SELECT ALL 51 / - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-8
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col2 col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 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.col0 col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT - col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-22
-28
-82

query I rowsort
SELECT ALL tab2.col1 + 11 FROM tab2 GROUP BY tab2.col1
----
52
70
72

query I rowsort
SELECT DISTINCT cor0.col1 - col1 FROM tab2 AS cor0 GROUP BY col1
----
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 - + 38 AS col2 FROM tab2 GROUP BY tab2.col2
----
-38
-38
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 98 * tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
2352
3724
7742

query I rowsort
SELECT ALL - 82 * - 47 FROM tab0 AS cor0 GROUP BY cor0.col0
----
3854
3854
3854

query I rowsort
SELECT + 34 FROM tab1 AS cor0 GROUP BY cor0.col1
----
34
34
34

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 91 + + 40 col0 FROM tab1 GROUP BY tab1.col2
----
-51
-51
-51

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6109
SELECT + CAST( NULL AS DECIMAL ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6109
SELECT + CAST ( NULL AS REAL ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 40 FROM tab2 AS cor0 GROUP BY cor0.col0
----
40
40
40

query I rowsort
SELECT DISTINCT + 36 AS col1 FROM tab0 GROUP BY tab0.col0
----
36

query I rowsort
SELECT ALL + 98 * + 15 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1470
1470
1470

query I rowsort
SELECT + 7 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
7
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * 29 col0 FROM tab0 GROUP BY tab0.col1
----
-2349
0

query I rowsort
SELECT cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT - + 71 AS col2 FROM tab2 GROUP BY tab2.col0
----
-71
-71
-71

query I rowsort
SELECT ALL 14 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
14
14
14

query I rowsort
SELECT DISTINCT + 90 * 84 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
7560

query I rowsort
SELECT DISTINCT col1 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
-3772
-5369
-915

query I rowsort
SELECT - cor0.col0 * - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
1849
676
6889

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT col0 * + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT 28 - + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-63
-64
13

query I rowsort
SELECT - 63 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-63
-63
-63

query I rowsort
SELECT ALL 81 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
3364
6241
7569

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT 1 FROM tab0 GROUP BY tab0.col1
----
1
1

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING ( NULL IS NOT NULL ) AND NOT NULL IS NULL
----

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT col2 * - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
24
38
79

query I rowsort
SELECT ALL + - tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col1 - cor0.col1 * col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1892
-30
-3192

onlyif mysql # DIV for integer division: 
query I rowsort label-6137
SELECT + tab0.col1 + - 13 DIV - 24 AS col0 FROM tab0 GROUP BY col1
----
0
81

skipif mysql # not compatible
query I rowsort label-6137
SELECT + tab0.col1 + - 13 / - 24 AS col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
2025
5041
64

query I rowsort
SELECT + cor0.col1 + + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT 86 FROM tab1 AS cor0 GROUP BY cor0.col1
----
86
86
86

query I rowsort
SELECT ALL - - 63 + - 24 AS col0 FROM tab0 GROUP BY tab0.col1
----
39
39

query I rowsort
SELECT ALL - 58 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-58
-58
-58

query I rowsort
SELECT ALL 91 AS col2 FROM tab2 GROUP BY tab2.col1
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 7 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
7
7
7

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6145
SELECT DISTINCT + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-6145
SELECT DISTINCT + CAST ( NULL AS REAL ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT 44 FROM tab2 cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT ALL + col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, col1
----
3772
5369
915

query I rowsort
SELECT DISTINCT + 96 AS col1 FROM tab1 cor0 GROUP BY col2, cor0.col2
----
96

query I rowsort
SELECT ALL + 67 FROM tab1 GROUP BY tab1.col2
----
67
67
67

query I rowsort
SELECT ALL col0 + + 35 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
117
57
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
45
71
8

query I rowsort
SELECT - 48 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-48
-48
-48

query I rowsort
SELECT 99 AS col1 FROM tab1 GROUP BY tab1.col1
----
99
99
99

query I rowsort
SELECT tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT 52 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
52
52
52

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.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 1 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 35 col0 FROM tab1 GROUP BY col2
----
35
35
35

query I rowsort
SELECT + 2 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
2
2
2

query I rowsort
SELECT DISTINCT - 41 FROM tab1 AS cor0 GROUP BY col2
----
-41

query I rowsort
SELECT ALL + 52 FROM tab2 cor0 GROUP BY cor0.col1
----
52
52
52

query I rowsort
SELECT col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
41
59
61

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
1936
3249
36

query I rowsort
SELECT - tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT 54 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
54
54
54

query I rowsort
SELECT - 79 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-79
-79
-79

query I rowsort
SELECT ALL + 23 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
23
23
23

query I rowsort
SELECT DISTINCT - 62 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-62

query I rowsort
SELECT ALL col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + 49 FROM tab1 AS cor0 GROUP BY col2
----
49
49
49

query I rowsort
SELECT ALL 56 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
56
56

query I rowsort
SELECT ALL 58 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
58
58
58

onlyif mysql # DIV for integer division: 
query I rowsort label-6175
SELECT 7 DIV - cor0.col2 + + 79 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
79
79
79

skipif mysql # not compatible
query I rowsort label-6175
SELECT 7 / - cor0.col2 + + 79 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT ALL + ( 24 ) AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
24
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * 5 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
290
395
435

query I rowsort
SELECT ALL 64 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
64
64
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * + cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL cor0.col1 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
133
150
76

query I rowsort
SELECT + - col2 AS col1 FROM tab1 GROUP BY col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-6182
SELECT ALL + 10 DIV + 36 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6182
SELECT ALL + 10 / + 36 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT cor0.col1 * + cor0.col1 FROM tab2 cor0 GROUP BY col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 36 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
36
36

query I rowsort
SELECT - 49 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-49
-49
-49

query I rowsort
SELECT DISTINCT cor0.col2 - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0

query I rowsort
SELECT ALL + 3 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
3
3
3

query I rowsort
SELECT ALL - 11 FROM tab2 GROUP BY tab2.col2
----
-11
-11
-11

query I rowsort
SELECT ALL + + 58 FROM tab1 GROUP BY tab1.col2
----
58
58
58

onlyif mysql # DIV for integer division: 
query I rowsort label-6190
SELECT 19 DIV + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6190
SELECT 19 / + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6192
SELECT DISTINCT CAST( + 40 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
40

skipif mysql # not compatible
query I rowsort label-6192
SELECT DISTINCT CAST ( + 40 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
40

query I rowsort
SELECT ALL + - 85 + + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-24
-26
-44

query I rowsort
SELECT col0 * - 42 + 53 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1123
-3391
-871

onlyif mysql # DIV for integer division: 
query I rowsort label-6195
SELECT - 4 DIV 91 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6195
SELECT - 4 / 91 FROM tab1 GROUP BY tab1.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6196
SELECT cor0.col1 DIV col1 - 17 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-16
-16
-16

skipif mysql # not compatible
query I rowsort label-6196
SELECT cor0.col1 / col1 - 17 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-16
-16
-16

query I rowsort
SELECT 23 AS col0 FROM tab2 GROUP BY tab2.col1
----
23
23
23

query I rowsort
SELECT DISTINCT cor0.col1 - - 91 FROM tab1 AS cor0 GROUP BY cor0.col1
----
135
148
97

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6199
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-6199
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT + tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT 4 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 + + 29 col1 FROM tab0 GROUP BY tab0.col0
----
112
55
72

query I rowsort
SELECT + 64 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-7
19
56

query I rowsort
SELECT 76 * col1 FROM tab1 cor0 GROUP BY col1
----
3344
4332
456

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
0
81

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 WHERE NOT cor0.col1 IS NULL GROUP BY cor0.col2 HAVING NOT NULL <> ( NULL )
----

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 AS cor0 WHERE ( NULL ) IS NOT NULL GROUP BY cor0.col0
----

onlyif mysql # DIV for integer division: 
query I rowsort label-6208
SELECT ALL + cor0.col2 DIV col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6208
SELECT ALL + cor0.col2 / col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL cor0.col1 + - 69 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-10
-28
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 + 85 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
109
123
164

query I rowsort
SELECT + + 63 FROM tab2 GROUP BY tab2.col2
----
63
63
63

query I rowsort
SELECT + - 49 * 22 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1078
-1078
-1078

query I rowsort
SELECT DISTINCT ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT + cor0.col1 + 98 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
104
142
155

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 17 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
17

query I rowsort
SELECT DISTINCT + 73 FROM tab2 cor0 GROUP BY cor0.col1
----
73

query I rowsort
SELECT DISTINCT 58 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
58

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT + + 72 FROM tab2 GROUP BY tab2.col1
----
72
72
72

query I rowsort
SELECT DISTINCT - tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT 14 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
14
14
14

query I rowsort
SELECT - col1 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-138
-148
-99

query I rowsort
SELECT ALL + 55 FROM tab0 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT ALL 77 * + 84 FROM tab1 AS cor0 GROUP BY col2
----
6468
6468
6468

query I rowsort
SELECT DISTINCT cor0.col2 + - ( - cor0.col2 + + cor0.col2 ) * + 90 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL ( + 44 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT DISTINCT - 33 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-33

query I rowsort
SELECT + 32 FROM tab2 AS cor0 GROUP BY cor0.col2
----
32
32
32

query I rowsort
SELECT - + col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL + 26 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
26
26
26

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT + - 76 FROM tab0 GROUP BY tab0.col0
----
-76
-76
-76

query I rowsort
SELECT ALL 94 FROM tab2 AS cor0 GROUP BY cor0.col1
----
94
94
94

query I rowsort
SELECT 76 FROM tab0 AS cor0 GROUP BY cor0.col1
----
76
76

query I rowsort
SELECT col2 + 88 AS col0 FROM tab0 GROUP BY tab0.col2
----
112
126
167

query I rowsort
SELECT ALL 12 FROM tab1 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT DISTINCT 23 FROM tab0 GROUP BY tab0.col2
----
23

query I rowsort
SELECT DISTINCT 70 + - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY col1
----
-11
70

query I rowsort
SELECT 49 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT ALL tab2.col0 - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT + 61 AS col2 FROM tab0 GROUP BY tab0.col1
----
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + - 86 AS col1 FROM tab1 GROUP BY tab1.col0
----
-86

query I rowsort
SELECT col1 * - 28 FROM tab1 cor0 GROUP BY cor0.col1
----
-1232
-1596
-168

query I rowsort
SELECT + col2 + - ( + 87 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-49
-63
-8

query I rowsort
SELECT ALL + + 47 AS col2 FROM tab2 GROUP BY col1
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 16 FROM tab1 GROUP BY col0
----
16
16
16

query I rowsort
SELECT + + ( + cor0.col1 ) FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT ( 59 ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
59

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 ALL - + 49 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1176
1862
3871

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - 40 ) col1 FROM tab0 GROUP BY tab0.col2
----
-40
-40
-40

query I rowsort
SELECT 60 FROM tab0 AS cor0 GROUP BY col2
----
60
60
60

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2 HAVING NOT ( NULL ) < NULL AND NOT NULL IN ( col0 )
----

query I rowsort
SELECT - col0 * cor0.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 DISTINCT + tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT cor0.col0 * + col0 FROM tab0 cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 + 90 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
134
147
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 41 * cor0.col2 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
1558
3239
984

query I rowsort
SELECT DISTINCT 51 AS col0 FROM tab0 GROUP BY tab0.col2
----
51

query I rowsort
SELECT ALL + cor0.col1 - 4 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
37
55
57

query I rowsort
SELECT - cor0.col1 + - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-114
-12
-88

query I rowsort
SELECT + 52 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
52
52
52

onlyif mysql # DIV for integer division: 
query I rowsort label-6268
SELECT DISTINCT col2 DIV + 28 FROM tab0 GROUP BY col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6268
SELECT DISTINCT col2 / + 28 FROM tab0 GROUP BY col2
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT + cor0.col0 FROM tab2 cor0 GROUP BY col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - cor0.col2 - - cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT 66 FROM tab1 AS cor0 GROUP BY cor0.col0
----
66
66
66

query I rowsort
SELECT + col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + + col2 AS col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col0 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1032
-2054
-3154

query I rowsort
SELECT ALL col0 * - 82 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1230
-7462
-7544

query I rowsort
SELECT DISTINCT + col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-6280
SELECT - - col0 DIV 8 FROM tab1 GROUP BY tab1.col0
----
10
2
3

skipif mysql # not compatible
query I rowsort label-6280
SELECT - - col0 / 8 FROM tab1 GROUP BY tab1.col0
----
10
2
3

query I rowsort
SELECT - ( 52 ) FROM tab2 GROUP BY tab2.col1
----
-52
-52
-52

query I rowsort
SELECT DISTINCT cor0.col0 + 90 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
116
133
173

onlyif mysql # DIV for integer division: 
query I rowsort label-6283
SELECT COALESCE ( + cor0.col2, + cor0.col2 ) DIV 13 + 29 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
30
31
35

skipif mysql # not compatible
query I rowsort label-6283
SELECT COALESCE ( + cor0.col2, + cor0.col2 ) / 13 + 29 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
30
31
35

query I rowsort
SELECT + 29 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
29
29
29

onlyif mysql # DIV for integer division: 
query I rowsort label-6285
SELECT ALL + cor0.col1 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6285
SELECT ALL + cor0.col1 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT 52 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
52
52
52

query I rowsort
SELECT ALL - cor0.col1 - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-118
-122
-82

query I rowsort
SELECT col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT - tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6291
SELECT ALL - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6291
SELECT ALL - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - ( - tab1.col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - 79 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-79
-79
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-6294
SELECT 45 DIV - cor0.col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-1
-7
0

skipif mysql # not compatible
query I rowsort label-6294
SELECT 45 / - cor0.col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-1
-7
0

query I rowsort
SELECT + 94 FROM tab2 GROUP BY col0
----
94
94
94

query I rowsort
SELECT - + 10 FROM tab2 GROUP BY col2
----
-10
-10
-10

query I rowsort
SELECT 58 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
58
58
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 91 col1 FROM tab0 cor0 GROUP BY cor0.col2
----
91

query I rowsort
SELECT + ( cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL cor1.col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-6302
SELECT DISTINCT col0 DIV + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
1

skipif mysql # not compatible
query I rowsort label-6302
SELECT DISTINCT col0 / + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
1

query I rowsort
SELECT ALL cor0.col1 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor0.col1
----
41
41
59
59
61
61

query I rowsort
SELECT + - tab1.col0 * 51 + 65 FROM tab1 GROUP BY tab1.col0
----
-1057
-1363
-4117

query I rowsort
SELECT cor0.col2 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
153
30
73

query I rowsort
SELECT 27 FROM tab2 AS cor0 GROUP BY cor0.col1
----
27
27
27

query I rowsort
SELECT col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

onlyif mysql # DIV for integer division: 
query I rowsort label-6308
SELECT DISTINCT tab0.col1 DIV + 81 FROM tab0 GROUP BY col1
----
0
1

skipif mysql # not compatible
query I rowsort label-6308
SELECT DISTINCT tab0.col1 / + 81 FROM tab0 GROUP BY col1
----
0
1

query I rowsort
SELECT + 32 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT ALL 78 AS col2 FROM tab2 GROUP BY col1
----
78
78
78

query I rowsort
SELECT CASE cor0.col0 WHEN - cor0.col0 + - cor0.col0 THEN cor0.col0 ELSE NULL END FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-6312
SELECT tab0.col2 DIV - 92 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6312
SELECT tab0.col2 / - 92 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT - 54 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-54
-54
-54

query I rowsort
SELECT 91 - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
48
65
8

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( - 71, cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-71
-71
-71

query I rowsort
SELECT + cor0.col2 + cor0.col2 * + ( 8 * + col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
26970
50007
60639

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
58
79
87

query I rowsort
SELECT + 47 * - 47 AS col2 FROM tab0 GROUP BY tab0.col0
----
-2209
-2209
-2209

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-6321
SELECT cor0.col0 DIV cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
29
83

skipif mysql # not compatible
query I rowsort label-6321
SELECT cor0.col0 / cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
29
83

query I rowsort
SELECT cor0.col1 - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT ALL 91 FROM tab2 cor0 GROUP BY cor0.col1
----
91
91
91

query I rowsort
SELECT 76 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
76
76
76

query I rowsort
SELECT - - 76 FROM tab2 GROUP BY col2
----
76
76
76

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
133
150
76

query I rowsort
SELECT + - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT - 22 + + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
6
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-81
0
0

query I rowsort
SELECT col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6331
SELECT DISTINCT CAST( - 22 AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-22

skipif mysql # not compatible
query I rowsort label-6331
SELECT DISTINCT CAST ( - 22 AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-22

query I rowsort
SELECT 44 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
44
44

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT - 89 * + cor0.col1 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-7290
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6335
SELECT cor0.col1 DIV cor0.col0 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
26
44
83

skipif mysql # not compatible
query I rowsort label-6335
SELECT cor0.col1 / cor0.col0 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
26
44
83

query I rowsort
SELECT ALL cor0.col1 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
3772
5369
915

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3772
-5369
-915

query I rowsort
SELECT ALL - cor0.col0 + ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL 66 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
66
66
66

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-6340
SELECT DISTINCT CAST( cor0.col0 AS SIGNED ) + cor0.col0 DIV + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
23
29
83

skipif mysql # not compatible
query I rowsort label-6340
SELECT DISTINCT CAST ( cor0.col0 AS INTEGER ) + cor0.col0 / + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
23
29
83

query I rowsort
SELECT DISTINCT + cor0.col2 * 19 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1501
456
722

query I rowsort
SELECT - 55 AS col1 FROM tab2 GROUP BY tab2.col1
----
-55
-55
-55

query I rowsort
SELECT 7 FROM tab2 GROUP BY tab2.col0
----
7
7
7

query I rowsort
SELECT 71 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT + 37 FROM tab1 GROUP BY tab1.col1
----
37
37
37

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT cor0.col2 * cor0.col2 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1, col0
----
1980
4970
56

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 - cor0.col0 * + COALESCE ( 19, - col0 * + cor0.col0 + cor0.col1, cor0.col1 ) FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-1577
-494
-817

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 cor0.col1
----
-92
-92

query I rowsort
SELECT DISTINCT cor0.col1 * - 10 FROM tab1 cor0 GROUP BY cor0.col1
----
-440
-570
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT + 74 FROM tab2 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT 0 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT + - 66 FROM tab0 GROUP BY col2
----
-66

query I rowsort
SELECT 51 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
51
51
51

query I rowsort
SELECT + 87 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
5046
6873
7569

query I rowsort
SELECT ALL 24 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
24
24
24

query I rowsort
SELECT DISTINCT + col2 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
142
16
90

query I rowsort
SELECT - - ( 23 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
23
23
23

query I rowsort
SELECT 4 FROM tab0 GROUP BY tab0.col2
----
4
4
4

query I rowsort
SELECT DISTINCT - cor0.col2 * + 88 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3960
-6248
-704

query I rowsort
SELECT ALL 12 FROM tab1 AS cor0 GROUP BY col1
----
12
12
12

query I rowsort
SELECT 71 AS col2 FROM tab0 cor0 GROUP BY col0
----
71
71
71

query I rowsort
SELECT DISTINCT tab1.col1 + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT DISTINCT + 80 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
80

query I rowsort
SELECT DISTINCT + 12 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-10
-16
-70

query I rowsort
SELECT - cor0.col0 + ( - 88 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-103
-179
-180

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT - 17 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor0.col1
----
-17

query I rowsort
SELECT 80 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-1
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 46 * + cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1886
2714
2806

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
26
43
83

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-6375
SELECT ALL + cor0.col1 - + cor0.col1 DIV col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
44
55
6

skipif mysql # not compatible
query I rowsort label-6375
SELECT ALL + cor0.col1 - + cor0.col1 / col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
44
55
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab0.col2 * - 57 col0 FROM tab0 GROUP BY col2
----
1368
2166
4503

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - 59 * cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-1298
-1652
-4838

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, col0
----
44
57
6

query I rowsort
SELECT cor0.col2 + col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
116
158
174

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - ( 65 ) AS col0 FROM tab1 GROUP BY col0
----
-65

query I rowsort
SELECT - + ( col2 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + ( 66 ) FROM tab0 GROUP BY col1
----
66
66

query I rowsort
SELECT - + 53 FROM tab0 GROUP BY tab0.col0
----
-53
-53
-53

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT 3 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3

query I rowsort
SELECT cor0.col0 + + cor0.col0 * 65 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1452
1848
5412

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT ALL 47 + + 24 AS col0 FROM tab2 GROUP BY tab2.col1
----
71
71
71

query I rowsort
SELECT + ( + col1 ) + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT - 14 AS col2 FROM tab1 GROUP BY tab1.col1
----
-14
-14
-14

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col0, col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col0 - + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT - cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, col1
----
0
0
0

query I rowsort
SELECT ( COALESCE ( - cor0.col0, 56 + + cor0.col0 ) ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( + 98, cor0.col1, cor0.col2 * - 54, 94 - - cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, col0
----
98

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6400
SELECT + NULLIF ( cor0.col1, - cor0.col0 + cor0.col1 * - cor0.col1 ) DIV - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6400
SELECT + NULLIF ( cor0.col1, - cor0.col0 + cor0.col1 * - cor0.col1 ) / - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-1
-1

query I rowsort
SELECT - 40 AS col0 FROM tab1 GROUP BY tab1.col1
----
-40
-40
-40

query I rowsort
SELECT ALL + 67 AS col0 FROM tab1 GROUP BY tab1.col0
----
67
67
67

query I rowsort
SELECT 53 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
53
53
53

query I rowsort
SELECT + 74 FROM tab1 AS cor0 GROUP BY col1
----
74
74
74

query I rowsort
SELECT DISTINCT 7 AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
7

query I rowsort
SELECT - cor0.col1 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT + cor0.col1 AS col2 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 ALL - 9 * - tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
216
342
711

query I rowsort
SELECT DISTINCT col0 - - 49 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
140
141
64

query I rowsort
SELECT DISTINCT - 19 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1
----
-19

query I rowsort
SELECT + 48 FROM tab0 GROUP BY tab0.col2
----
48
48
48

query I rowsort
SELECT ALL - 78 AS col1 FROM tab2 GROUP BY tab2.col1
----
-78
-78
-78

query I rowsort
SELECT + 56 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
137
56

query I rowsort
SELECT ALL + 25 FROM tab2 GROUP BY col0
----
25
25
25

query I rowsort
SELECT cor0.col0 + 66 FROM tab2 AS cor0 GROUP BY cor0.col0
----
157
158
81

query I rowsort
SELECT col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - cor0.col2 + + 5 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-53
-74
-82

query I rowsort
SELECT DISTINCT - 41 AS col1 FROM tab1 GROUP BY tab1.col1
----
-41

query I rowsort
SELECT DISTINCT + - col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - 48 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-48

query I rowsort
SELECT cor0.col1 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) = NULL
----

query I rowsort
SELECT ALL col2 * col2 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL = NULL
----

query I rowsort
SELECT ALL + 21 FROM tab1 cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT + col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, col1
----
24
38
79

query I rowsort
SELECT 38 FROM tab0 cor0 GROUP BY cor0.col0
----
38
38
38

query I rowsort
SELECT DISTINCT 36 + + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
115
123
94

query I rowsort
SELECT DISTINCT - col1 + 25 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-16
-34
-36

query I rowsort
SELECT ALL - col2 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + cor0.col2 FROM tab0 cor0 GROUP BY col2, col0
----
24
38
79

query I rowsort
SELECT ALL 51 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT ALL - 2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2
-2
-2

onlyif mysql # DIV for integer division: 
query I rowsort label-6434
SELECT DISTINCT + cor0.col1 DIV - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2 HAVING NOT ( col1 ) IS NULL AND NOT ( NULL ) IS NOT NULL
----
-3
0

skipif mysql # not compatible
query I rowsort label-6434
SELECT DISTINCT + cor0.col1 / - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2 HAVING NOT ( col1 ) IS NULL AND NOT ( NULL ) IS NOT NULL
----
-3
0

query I rowsort
SELECT + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - + 20 AS col0 FROM tab0 GROUP BY tab0.col1
----
-20

query I rowsort
SELECT - cor0.col1 + + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6480

query I rowsort
SELECT ALL cor0.col1 + 31 FROM tab2 AS cor0 GROUP BY cor0.col1
----
72
90
92

query I rowsort
SELECT - 87 * tab1.col0 FROM tab1 GROUP BY col0
----
-1914
-2436
-7134

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT col0 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT + 52 FROM tab1 AS cor0 GROUP BY cor0.col0
----
52

query I rowsort
SELECT 4 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
232
316
348

query I rowsort
SELECT ALL - + col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT - + 82 AS col0 FROM tab2 GROUP BY tab2.col0
----
-82
-82
-82

query I rowsort
SELECT 3 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT + cor0.col2 FROM tab1, tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT 56 FROM tab0 cor0 GROUP BY cor0.col1
----
56
56

query I rowsort
SELECT DISTINCT col1 * + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT DISTINCT - 66 + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-38
-44
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * cor0.col2 - - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3422
6320
7656

query I rowsort
SELECT 49 * - col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
-1176
-1862
-3871

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - 5 col2 FROM tab0 GROUP BY tab0.col1
----
-5
-86

onlyif mysql # DIV for integer division: 
query I rowsort label-6456
SELECT cor0.col1 DIV - 7 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-5
-8
-8

skipif mysql # not compatible
query I rowsort label-6456
SELECT cor0.col1 / - 7 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-5
-8
-8

query I rowsort
SELECT DISTINCT + 51 FROM tab1 AS cor0 GROUP BY cor0.col1
----
51

query I rowsort
SELECT DISTINCT 93 * + 71 FROM tab1 AS cor0 GROUP BY cor0.col1
----
6603

query I rowsort
SELECT + col1 * 69 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5589

query I rowsort
SELECT ( col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + 26 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
26
26
26

query I rowsort
SELECT ( 64 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT DISTINCT 58 FROM tab2 AS cor0 GROUP BY cor0.col1
----
58

query I rowsort
SELECT + + tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
45
71
8

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 DISTINCT 87 FROM tab1 AS cor0 GROUP BY cor0.col0
----
87

query I rowsort
SELECT ALL tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL - cor0.col1 * 46 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
-2024
-2622
-276

query I rowsort
SELECT - 28 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-28
-28
-28

query I rowsort
SELECT ALL 59 FROM tab0 AS cor0 GROUP BY cor0.col0
----
59
59
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - COALESCE ( + 6, col1 * + cor0.col2, col2 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-6
-6
-6

query I rowsort
SELECT 50 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
50
50
50

query I rowsort
SELECT - 30 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-30
-30

query I rowsort
SELECT ALL + 27 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
27
27
27

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 - 94 FROM tab1 AS cor0 GROUP BY col2
----
-94
-94
-94

query I rowsort
SELECT - cor0.col0 + + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, col0
----
0
0
0

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
44
57
6

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( - 20, cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-20
-20

query I rowsort
SELECT 94 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
94
94
94

query I rowsort
SELECT 48 FROM tab1 GROUP BY col1
----
48
48
48

query I rowsort
SELECT ALL - 81 FROM tab0 cor0 GROUP BY cor0.col1
----
-81
-81

query I rowsort
SELECT - - 80 FROM tab2 GROUP BY col0
----
80
80
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 28 col1 FROM tab1 cor0 GROUP BY cor0.col2, col2
----
28

query I rowsort
SELECT 45 * - 28 FROM tab1 cor0 GROUP BY cor0.col2
----
-1260
-1260
-1260

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 43 col2 FROM tab0 AS cor0 GROUP BY col0
----
43
43
43

query I rowsort
SELECT DISTINCT + - 94 FROM tab1 GROUP BY tab1.col1
----
-94

query I rowsort
SELECT - cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + + 41 FROM tab2 GROUP BY col1
----
41

query I rowsort
SELECT - 4 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
232
316
348

query I rowsort
SELECT DISTINCT 46 AS col2 FROM tab0 GROUP BY tab0.col2
----
46

query I rowsort
SELECT ALL 92 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
92
92
92

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL 59 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
59
59
59

onlyif mysql # DIV for integer division: 
query I rowsort label-6496
SELECT DISTINCT 45 DIV - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3
0

skipif mysql # not compatible
query I rowsort label-6496
SELECT DISTINCT 45 / - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3
0

query I rowsort
SELECT DISTINCT 89 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
89

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - + COALESCE ( 91, tab0.col2 ) * 85 FROM tab0 GROUP BY tab0.col0
----
-7735

query I rowsort
SELECT ALL + 7 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
7
7
88

query I rowsort
SELECT 82 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT DISTINCT + 8 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
8

query I rowsort
SELECT + cor0.col2 - 41 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2320
-3160
-3480

query I rowsort
SELECT - 10 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-10
-10
-10

query I rowsort
SELECT ALL - - 74 AS col0 FROM tab1 GROUP BY col1
----
74
74
74

query I rowsort
SELECT + 63 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
63
63
63

query I rowsort
SELECT ALL 90 FROM tab1 AS cor0 GROUP BY cor0.col1
----
90
90
90

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, col2
----
41
59
61

query I rowsort
SELECT DISTINCT 79 + - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
41
55

query I rowsort
SELECT - cor0.col1 + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + 36 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
36

query I rowsort
SELECT - 3 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-3
-3
-3

query I rowsort
SELECT + tab1.col2 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT - 29 FROM tab0 GROUP BY tab0.col2
----
-29
-29
-29

query I rowsort
SELECT ALL - tab1.col2 * col2 AS col2 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL 17 AS col2 FROM tab0 GROUP BY tab0.col2
----
17
17
17

query I rowsort
SELECT DISTINCT 18 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
18

query I rowsort
SELECT ALL 8 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT + cor0.col2 + - 71 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-13
16
8

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col2
----
9 values hashing to 4fe903723f7427a19598c1293ff90703

query I rowsort
SELECT DISTINCT - + 19 AS col1 FROM tab0 GROUP BY tab0.col0
----
-19

query I rowsort
SELECT + tab1.col0 + 56 AS col2 FROM tab1 GROUP BY tab1.col0
----
138
78
84

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT 31 AS col0 FROM tab0 GROUP BY tab0.col1
----
31

query I rowsort
SELECT ALL + - 26 FROM tab1 GROUP BY tab1.col1
----
-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
----
91
91
91

query I rowsort
SELECT DISTINCT col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL + ( - cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + - col0 AS col2 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL 44 FROM tab0 AS cor0 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT ALL + cor0.col0 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 AS cor0 GROUP BY col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT col2 AS col1 FROM tab0 WHERE NOT NULL IS NOT NULL GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - + col0 * 29 FROM tab0 GROUP BY tab0.col0
----
-1247
-2407
-754

query I rowsort
SELECT 41 FROM tab0 cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT ALL + 35 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
35
35
35

query I rowsort
SELECT ALL + 33 FROM tab0 AS cor0 GROUP BY cor0.col1
----
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 87 - + 67 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-154
-154

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - 64 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-64
-64
-64

query I rowsort
SELECT DISTINCT - 21 FROM tab1 cor0 GROUP BY cor0.col1
----
-21

query I rowsort
SELECT - 91 FROM tab1 GROUP BY tab1.col2
----
-91
-91
-91

query I rowsort
SELECT + + 76 FROM tab0 GROUP BY tab0.col1
----
76
76

query I rowsort
SELECT - col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT 77 AS col1 FROM tab2 GROUP BY tab2.col2
----
77
77
77

query I rowsort
SELECT ALL 83 FROM tab1 AS cor0 GROUP BY cor0.col0
----
83
83
83

query I rowsort
SELECT ALL NULLIF ( cor0.col0, + cor0.col0 ) FROM tab1 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NULL NOT BETWEEN col1 AND NULL
----

query I rowsort
SELECT DISTINCT - 3 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3

query I rowsort
SELECT 44 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col1
----
44
44
44

query I rowsort
SELECT - cor0.col2 + - 45 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-103
-124
-132

query I rowsort
SELECT DISTINCT + 88 AS col1 FROM tab1 GROUP BY tab1.col0
----
88

query I rowsort
SELECT - 93 AS col1 FROM tab1 GROUP BY tab1.col0
----
-93
-93
-93

onlyif mysql # DIV for integer division: 
query I rowsort label-6556
SELECT DISTINCT - cor0.col0 DIV cor0.col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-27
-44
-84

skipif mysql # not compatible
query I rowsort label-6556
SELECT DISTINCT - cor0.col0 / cor0.col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-27
-44
-84

query I rowsort
SELECT + 55 FROM tab0 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT - cor0.col2 * - 21 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1659
504
798

query I rowsort
SELECT DISTINCT 90 FROM tab2 AS cor0 GROUP BY col1
----
90

query I rowsort
SELECT DISTINCT + ( + 78 ) FROM tab1 cor0 GROUP BY col1
----
78

query I rowsort
SELECT DISTINCT 25 FROM tab0 AS cor0 GROUP BY col1
----
25

query I rowsort
SELECT + 94 + 4 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
98
98
98

query I rowsort
SELECT - 94 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-94
-94
-94

query I rowsort
SELECT ALL - 14 FROM tab2 cor0 GROUP BY cor0.col1
----
-14
-14
-14

query I rowsort
SELECT - 31 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-31
-31
-31

query I rowsort
SELECT 87 * + tab0.col0 FROM tab0 GROUP BY col0
----
2262
3741
7221

query I rowsort
SELECT ALL col2 + col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT - col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL col0 + tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
164
44
56

query I rowsort
SELECT - - 80 FROM tab1 GROUP BY tab1.col2
----
80
80
80

query I rowsort
SELECT + cor0.col0 * + 94 + + col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1471
8613
8689

query I rowsort
SELECT DISTINCT + 81 FROM tab1 AS cor0 GROUP BY cor0.col2
----
81

query I rowsort
SELECT cor0.col1 - cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
0

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT 71 AS col0 FROM tab1 GROUP BY tab1.col1
----
71
71
71

query I rowsort
SELECT - - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - - 73 AS col1 FROM tab1 GROUP BY tab1.col1
----
73
73
73

query I rowsort
SELECT 98 FROM tab1 cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT ALL cor0.col2 + - 57 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1344
-2128
-4424

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT + 82 - + 16 AS col1 FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
66
66
66

query I rowsort
SELECT DISTINCT + ( tab2.col1 ) FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col1 * + 55 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2420
3135
330

query I rowsort
SELECT - 60 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
3480
4740
5220

query I rowsort
SELECT ALL + cor0.col2 - 82 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-11
-37
-74

query I rowsort
SELECT ALL + ( - cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6589
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6589
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-6590
SELECT ALL + 65 DIV - 76 AS col2 FROM tab0, tab2 cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6590
SELECT ALL + 65 / - 76 AS col2 FROM tab0, tab2 cor0 GROUP BY cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT cor0.col0 + COALESCE ( + ( 74 ), - cor0.col0 * 18, + cor0.col0 + + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
165
166
89

onlyif mysql # DIV for integer division: 
query I rowsort label-6592
SELECT + + 75 DIV 75 AS col0 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6592
SELECT + + 75 / 75 AS col0 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT ALL 75 FROM tab2 GROUP BY tab2.col1
----
75
75
75

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 4 + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
4
6565

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6598
SELECT - cor0.col1 + - CAST( cor0.col2 AS SIGNED ) * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1444
-6241
-657

skipif mysql # not compatible
query I rowsort label-6598
SELECT - cor0.col1 + - CAST ( cor0.col2 AS INTEGER ) * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1444
-6241
-657

query I rowsort
SELECT 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 - tab2.col2 col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT 31 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT + col2 + cor0.col0 * cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
1056
2133
3192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - cor0.col2 + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-17
-20
-26

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT DISTINCT + 90 FROM tab0 AS cor0 GROUP BY cor0.col2
----
90

query I rowsort
SELECT ALL - col1 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL - 73 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2993
-4307
-4453

query I rowsort
SELECT col1 + - cor0.col1 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2419
4720
5368

query I rowsort
SELECT cor0.col2 + + 31 * + 86 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2690
2704
2745

query I rowsort
SELECT ALL 29 FROM tab0 AS cor0 GROUP BY cor0.col0
----
29
29
29

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6615
SELECT - CAST( NULL AS SIGNED ) + cor0.col2 col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6615
SELECT - CAST ( NULL AS INTEGER ) + cor0.col2 col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + ( + 78 ) FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT ALL + 18 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
18
18
18

query I rowsort
SELECT + + tab1.col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT cor0.col2 * - cor0.col2 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1980
-4970
-56

query I rowsort
SELECT ALL - 78 AS col0 FROM tab1 GROUP BY tab1.col0
----
-78
-78
-78

query I rowsort
SELECT tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - cor0.col0 * + cor0.col1 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-126
-1539
-3564

query I rowsort
SELECT ALL + cor0.col1 * col2 AS col0 FROM tab0 AS cor0 GROUP BY col1, col2
----
0
0
1944

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ALL - 53 FROM tab2 cor0 GROUP BY cor0.col0
----
-53
-53
-53

onlyif mysql # DIV for integer division: 
query I rowsort label-6626
SELECT DISTINCT cor0.col2 DIV - col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1

skipif mysql # not compatible
query I rowsort label-6626
SELECT DISTINCT cor0.col2 / - col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-6627
SELECT ALL - 55 DIV - cor0.col2 FROM tab1 cor0 GROUP BY col2
----
0
1
6

skipif mysql # not compatible
query I rowsort label-6627
SELECT ALL - 55 / - cor0.col2 FROM tab1 cor0 GROUP BY col2
----
0
1
6

query I rowsort
SELECT ALL - cor0.col0 + 78 FROM tab0 AS cor0 GROUP BY col0
----
-5
35
52

query I rowsort
SELECT - + 48 FROM tab1 GROUP BY tab1.col0
----
-48
-48
-48

query I rowsort
SELECT NULLIF ( 82, cor0.col1 / 79 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
82
82
82

onlyif mysql # DIV for integer division: 
query I rowsort label-6631
SELECT ALL 16 DIV + 3 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5
5
5

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6631
SELECT ALL 16 / + 3 col2 FROM tab2 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 * + 57 col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-1482
-2451
-4731

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

onlyif mysql # DIV for integer division: 
query I rowsort label-6634
SELECT cor0.col2 DIV - 29 + 25 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
23
24
25

skipif mysql # not compatible
query I rowsort label-6634
SELECT cor0.col2 / - 29 + 25 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
23
24
25

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT cor0.col1 + - 18 FROM tab1 cor0 GROUP BY cor0.col1, col2
----
-12
26
39

query I rowsort
SELECT DISTINCT cor0.col1 + + 46 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
103
52
90

query I rowsort
SELECT + 32 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
32
32
32

query I rowsort
SELECT 12 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
264
336
984

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 45 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
45
45
45

query I rowsort
SELECT - 23 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
-23
-23
-23

query I rowsort
SELECT DISTINCT ( 48 ) FROM tab0 GROUP BY col1
----
48

query I rowsort
SELECT ( - 73 ) * 71 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
-5183
-5183
-5183

query I rowsort
SELECT - 37 * 61 + + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-2175
-2229
-2235

query I rowsort
SELECT ALL 54 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
54
54
54

query I rowsort
SELECT ALL + 62 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
62
62
62

query I rowsort
SELECT - - 29 AS col0 FROM tab2 GROUP BY col2
----
29
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 86 col1 FROM tab1 cor0 GROUP BY cor0.col2
----
86
86
86

onlyif mysql # DIV for integer division: 
query I rowsort label-6650
SELECT DISTINCT - - 93 DIV + tab1.col2 + + col2 FROM tab1 GROUP BY tab1.col2
----
19
47
72

skipif mysql # not compatible
query I rowsort label-6650
SELECT DISTINCT - - 93 / + tab1.col2 + + col2 FROM tab1 GROUP BY tab1.col2
----
19
47
72

query I rowsort
SELECT 16 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
16
16
16

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6652
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6652
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 75 * 45 FROM tab1 GROUP BY tab1.col1
----
3375
3375
3375

query I rowsort
SELECT ALL - 91 FROM tab2 GROUP BY tab2.col2
----
-91
-91
-91

query I rowsort
SELECT cor0.col2 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
138
148
99

query I rowsort
SELECT ALL 90 * 9 FROM tab0 AS cor0 GROUP BY col1
----
810
810

onlyif mysql # DIV for integer division: 
query I rowsort label-6657
SELECT DISTINCT - cor0.col0 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-6657
SELECT DISTINCT - cor0.col0 / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT ALL 26 + 72 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2978
4274
4418

query I rowsort
SELECT 26 FROM tab1 AS cor0 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT ALL - 32 FROM tab2 cor0 GROUP BY col1
----
-32
-32
-32

query I rowsort
SELECT COALESCE ( 48, cor0.col2 ) FROM tab1 cor0 GROUP BY col2
----
48
48
48

query I rowsort
SELECT - 70 AS col1 FROM tab0 GROUP BY tab0.col2
----
-70
-70
-70

query I rowsort
SELECT ALL 17 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
17
17
17

query I rowsort
SELECT ALL + NULLIF ( col2, cor0.col2 * + cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 52 FROM tab0 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
58
79
87

query I rowsort
SELECT tab2.col1 + + 11 FROM tab2 GROUP BY tab2.col1
----
52
70
72

query I rowsort
SELECT 99 * + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col1
----
4356
5643
594

query I rowsort
SELECT DISTINCT + ( - 30 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 42 col2 FROM tab0 GROUP BY tab0.col1
----
-42
-42

onlyif mysql # DIV for integer division: 
query I rowsort label-6671
SELECT cor0.col2 DIV - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6671
SELECT cor0.col2 / - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - + 2 AS col1 FROM tab1 GROUP BY col0
----
-2

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, col0
----
58
79
87

query I rowsort
SELECT DISTINCT + 82 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
82

query I rowsort
SELECT DISTINCT + 91 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
91

query I rowsort
SELECT DISTINCT + col1 + - 38 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
21
23
3

query I rowsort
SELECT - - 39 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 77 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
77
77

query I rowsort
SELECT DISTINCT 6 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
6

query I rowsort
SELECT ALL 85 + + 11 FROM tab1 AS cor0 GROUP BY cor0.col1
----
96
96
96

query I rowsort
SELECT + 60 AS col0 FROM tab0 GROUP BY col2
----
60
60
60

onlyif mysql # DIV for integer division: 
query I rowsort label-6683
SELECT DISTINCT cor0.col1 DIV 62 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-6683
SELECT DISTINCT cor0.col1 / 62 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6684
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6684
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT + 67 - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-12
-20
9

query I rowsort
SELECT - cor0.col1 + + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
17
20
26

query I rowsort
SELECT DISTINCT 62 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-2542
-3658
-3782

query I rowsort
SELECT + col0 * + col0 + - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
1825
597
6851

query I rowsort
SELECT 27 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
27
27
27

query I rowsort
SELECT DISTINCT - 61 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2501
-3599
-3721

query I rowsort
SELECT ALL + 35 FROM tab1 GROUP BY col2
----
35
35
35

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
58
79
87

query I rowsort
SELECT ALL + col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT - - 37 FROM tab0 GROUP BY col0
----
37
37
37

query I rowsort
SELECT 6 FROM tab2 GROUP BY col0
----
6
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 82 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-82
-82
-82

query I rowsort
SELECT DISTINCT 36 AS col1 FROM tab1 GROUP BY tab1.col2
----
36

query I rowsort
SELECT col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6699
SELECT DISTINCT - - COALESCE ( col1, CAST( + 52 AS SIGNED ) + 63, + tab0.col0 * tab0.col0 ) FROM tab0 GROUP BY col1
----
0
81

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-6699
SELECT DISTINCT - - COALESCE ( col1, CAST ( + 52 AS INTEGER ) + 63, + tab0.col0 * tab0.col0 ) FROM tab0 GROUP BY col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-6700
SELECT cor0.col0 DIV - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-6700
SELECT cor0.col0 / - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-3
0

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + 58 FROM tab1 AS cor0 GROUP BY cor0.col2
----
58
58
58

query I rowsort
SELECT + 72 FROM tab2 cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT + 84 * 75 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
6300
6300
6300

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6705
SELECT ALL - cor0.col2 * + CAST( NULL AS SIGNED ) col1 FROM tab2 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-6705
SELECT ALL - cor0.col2 * + CAST ( NULL AS INTEGER ) col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT + 36 FROM tab1 GROUP BY tab1.col0
----
36
36
36

query I rowsort
SELECT - - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT - - 19 FROM tab1 GROUP BY tab1.col1
----
19
19
19

query I rowsort
SELECT - - 67 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
2747
3953
4087

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 92 col0 FROM tab2 GROUP BY tab2.col0
----
-92

query I rowsort
SELECT ALL - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL 73 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1752
2774
5767

query I rowsort
SELECT - 44 + tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
-44
37

query I rowsort
SELECT ALL 46 FROM tab1 AS cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT ALL cor0.col1 * + 5 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
405

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( 19 ) + 39 col2 FROM tab0 GROUP BY tab0.col1
----
58

query I rowsort
SELECT DISTINCT 23 FROM tab1 GROUP BY col1
----
23

query I rowsort
SELECT - 61 FROM tab2 AS cor0 GROUP BY col2
----
-61
-61
-61

query I rowsort
SELECT + cor0.col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6721
SELECT DISTINCT + CAST( NULL AS SIGNED ) * - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-6721
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL

query I rowsort
SELECT - + tab0.col1 * - 29 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
2349

query I rowsort
SELECT - cor0.col2 * - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

onlyif mysql # DIV for integer division: 
query I rowsort label-6724
SELECT DISTINCT - 9 DIV - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-6724
SELECT DISTINCT - 9 / - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 81 col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT - col1 + 59 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2
0
18

query I rowsort
SELECT DISTINCT + ( + 5 ) AS col1 FROM tab0 GROUP BY col2
----
5

query I rowsort
SELECT ALL - 31 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-31
-31
-31

query I rowsort
SELECT ALL 31 FROM tab2 GROUP BY col2
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT 88 FROM tab2 GROUP BY tab2.col0
----
88
88
88

query I rowsort
SELECT - NULLIF ( - tab0.col2, tab0.col2 ) + + 16 FROM tab0 GROUP BY tab0.col2
----
40
54
95

query I rowsort
SELECT + 19 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1577
494
817

query I rowsort
SELECT 91 AS col1 FROM tab2 GROUP BY col0
----
91
91
91

query I rowsort
SELECT + 8 FROM tab2 cor0 GROUP BY cor0.col1
----
8
8
8

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
41
59
61

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + ( - 9 ) col2 FROM tab1 AS cor0 GROUP BY col1
----
396
513
54

query I rowsort
SELECT ALL 45 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0, cor0.col0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

query I rowsort
SELECT - + 46 FROM tab2 GROUP BY tab2.col1
----
-46
-46
-46

query I rowsort
SELECT ALL 87 AS col2 FROM tab1 GROUP BY tab1.col0
----
87
87
87

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - ( - 32 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
32

query I rowsort
SELECT - + tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT - 31 + - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-122
-123
-46

query I rowsort
SELECT + 71 FROM tab1 AS cor0 GROUP BY cor0.col1
----
71
71
71

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT - col0 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT + cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NULL IS NULL
----
-24
-38
-79

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT cor0.col0 * - 80 FROM tab0 cor0 GROUP BY col0
----
-2080
-3440
-6640

query I rowsort
SELECT cor0.col1 * + 53 FROM tab2 AS cor0 GROUP BY col1
----
2173
3127
3233

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + + 53 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
136
79
96

query I rowsort
SELECT ALL 85 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor0.col2
----
85
85
85

query I rowsort
SELECT DISTINCT - 23 + 42 FROM tab2 AS cor0 GROUP BY col2
----
19

query I rowsort
SELECT cor0.col2 + + 45 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
116
53
90

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + 64 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
64
64
64

query I rowsort
SELECT ALL 38 FROM tab2 AS cor0 GROUP BY cor0.col0
----
38
38
38

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT + 82 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
82

query I rowsort
SELECT ALL - 15 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-15
-15
-15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col1 * 53 col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-2288
-2964
-312

query I rowsort
SELECT DISTINCT 49 FROM tab2 AS cor0 GROUP BY cor0.col0
----
49

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col0 + - 56 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1316
-232
-5878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 12 col2 FROM tab0 GROUP BY col2
----
-12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT + 2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2
2
2

query I rowsort
SELECT ALL + cor0.col1 * col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT + col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT 80 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT 56 * + cor0.col2 + - 18 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
3230
4406
4854

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6777
SELECT CAST( - 80 AS SIGNED ) col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-80
-80
-80

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6777
SELECT CAST ( - 80 AS INTEGER ) col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-80
-80
-80

query I rowsort
SELECT - + col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT + 75 AS col0 FROM tab2 GROUP BY tab2.col0
----
75
75
75

query I rowsort
SELECT - 2 FROM tab2 GROUP BY tab2.col0
----
-2
-2
-2

query I rowsort
SELECT DISTINCT 52 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2132
3068
3172

query I rowsort
SELECT DISTINCT 56 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
56

query I rowsort
SELECT ALL 44 FROM tab2 GROUP BY tab2.col1
----
44
44
44

query I rowsort
SELECT + cor1.col0 FROM tab1 cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT + cor0.col2 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
105
121
67

query I rowsort
SELECT cor0.col2 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT 37 FROM tab2 AS cor0 GROUP BY cor0.col2
----
37
37
37

query I rowsort
SELECT DISTINCT - 93 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-93

query I rowsort
SELECT 3 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
3
3
3

query I rowsort
SELECT ALL - cor0.col0 * col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
-1260
-176
-5822

query I rowsort
SELECT cor0.col2 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1444
-576
-6241

query I rowsort
SELECT ALL - cor0.col2 - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-142
-16
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 38 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
38
38
38

query I rowsort
SELECT DISTINCT - 29 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-29

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 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-15
-91
-92

query I rowsort
SELECT ALL col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT DISTINCT + 22 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 63 + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-20
-37
20

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6800
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-6800
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 74 + cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
100
117
157

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + 40 FROM tab0 cor0 GROUP BY cor0.col1
----
40

onlyif mysql # DIV for integer division: 
query I rowsort label-6804
SELECT ALL cor0.col2 DIV - cor0.col1 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-72
-9

skipif mysql # not compatible
query I rowsort label-6804
SELECT ALL cor0.col2 / - cor0.col1 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-72
-9

query I rowsort
SELECT DISTINCT + + tab0.col1 + + 85 AS col2 FROM tab0 GROUP BY tab0.col1
----
166
85

query I rowsort
SELECT ALL + 96 * cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
5568
7584
8352

query I rowsort
SELECT ALL + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT ( - 54 ) AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-54

query I rowsort
SELECT DISTINCT 85 AS col2 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
85

onlyif mysql # DIV for integer division: 
query I rowsort label-6810
SELECT - ( - cor0.col1 ) DIV 97 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6810
SELECT - ( - cor0.col1 ) / 97 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT 73 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
73
73

query I rowsort
SELECT + ( + cor0.col1 ) * 2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT ALL 50 FROM tab2 AS cor0 GROUP BY col2
----
50
50
50

query I rowsort
SELECT 98 FROM tab0 cor0 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT 51 - - tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
51
6612

query I rowsort
SELECT DISTINCT ( 55 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
55

query I rowsort
SELECT ALL + 42 AS col2 FROM tab0 cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
42
42
42

query I rowsort
SELECT ALL - ( + cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + 47 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
47
47
47

query I rowsort
SELECT DISTINCT 70 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
70

query I rowsort
SELECT DISTINCT - - tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-6822
SELECT - cor0.col2 DIV - cor0.col2 + 4 FROM tab1 AS cor0 GROUP BY cor0.col2
----
5
5
5

skipif mysql # not compatible
query I rowsort label-6822
SELECT - cor0.col2 / - cor0.col2 + 4 FROM tab1 AS cor0 GROUP BY cor0.col2
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col2 FROM tab1 GROUP BY col1
----
-44
-57
-6

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6824
SELECT - + CAST( NULL AS DECIMAL ) AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6824
SELECT - + CAST ( NULL AS REAL ) AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 64 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
-64

query I rowsort
SELECT + 86 FROM tab2 GROUP BY tab2.col2
----
86
86
86

query I rowsort
SELECT + 19 FROM tab2 AS cor0 GROUP BY col1
----
19
19
19

query I rowsort
SELECT DISTINCT - cor0.col0 * + NULLIF ( + 71, cor0.col0 ) + 37 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1525
-1951
-5785

query I rowsort
SELECT ALL + 21 FROM tab2 cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT ALL - 84 FROM tab1 GROUP BY tab1.col1
----
-84
-84
-84

query I rowsort
SELECT DISTINCT + 62 FROM tab1 GROUP BY tab1.col1
----
62

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6832
SELECT CAST( NULL AS DECIMAL ) * - 23 + - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6832
SELECT CAST ( NULL AS REAL ) * - 23 + - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, col0
----
NULL
NULL
NULL

query I rowsort
SELECT ( cor0.col1 ) * cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
2378
4661
5307

query I rowsort
SELECT ALL 89 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( cor0.col0 ) col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col1 * 72 FROM tab1 AS cor0 GROUP BY col1
----
3168
4104
432

query I rowsort
SELECT DISTINCT 77 * + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
4466
6083
6699

query I rowsort
SELECT ALL tab2.col1 FROM tab2 GROUP BY col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
15
91
92

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - cor0.col2 + - 59 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-117
-138
-146

query I rowsort
SELECT DISTINCT - - COALESCE ( - 76, - tab0.col0 - + 58 ) FROM tab0 GROUP BY tab0.col0
----
-76

query I rowsort
SELECT + 61 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
106
132
69

query I rowsort
SELECT DISTINCT + 49 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
49

query I rowsort
SELECT DISTINCT 27 AS col2 FROM tab1 GROUP BY tab1.col0
----
27

query I rowsort
SELECT ALL + 76 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
76
76
76

query I rowsort
SELECT 49 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
49
49
49

query I rowsort
SELECT - 6 FROM tab1 AS cor0 GROUP BY col1
----
-6
-6
-6

query I rowsort
SELECT ALL + 29 FROM tab2 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT DISTINCT 56 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
56

query I rowsort
SELECT ALL cor0.col0 * 9 FROM tab0 AS cor0 GROUP BY cor0.col0
----
234
387
747

onlyif mysql # DIV for integer division: 
query I rowsort label-6852
SELECT ALL + cor0.col2 DIV cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6852
SELECT ALL + cor0.col2 / cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 94, col0 * - CASE - cor0.col2 WHEN col2 + cor0.col2 * cor0.col1 THEN NULL WHEN + col2 THEN NULL ELSE - cor0.col2 END - col2 ) * cor0.col2 + cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
13667
15747
8816

query I rowsort
SELECT ALL 78 FROM tab1 AS cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT ALL + 32 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1376
2656
832

query I rowsort
SELECT ALL - 65 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-65
-65
-65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + 1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-40
-58
-60

query I rowsort
SELECT cor0.col1 * + 9 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
729

query I rowsort
SELECT DISTINCT + 19 + col0 FROM tab2 GROUP BY tab2.col0
----
110
111
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( cor0.col1 ) col1 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 col2 col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 89 FROM tab0 GROUP BY tab0.col1
----
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + 47 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
1128
1786
3713

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING cor0.col0 IS NULL AND NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
58
79
87

query I rowsort
SELECT DISTINCT - 0 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT - 0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT + 90 - + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
11
52
66

query I rowsort
SELECT cor0.col2 * + 41 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2436
3318
3654

query I rowsort
SELECT + ( cor0.col0 ) AS col1 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL - ( tab2.col0 ) + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6875
SELECT + tab2.col2 DIV 27 FROM tab2 GROUP BY col2
----
2
2
3

skipif mysql # not compatible
query I rowsort label-6875
SELECT + tab2.col2 / 27 FROM tab2 GROUP BY col2
----
2
2
3

query I rowsort
SELECT - 76 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-76
-76
-76

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT 19 FROM tab0 cor0 GROUP BY col0
----
19
19
19

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 8 AS col2 FROM tab0 GROUP BY tab0.col2
----
8
8
8

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT + 9 FROM tab2 AS cor0 GROUP BY cor0.col1
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - col0 FROM tab0 cor0 GROUP BY col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-6886
SELECT ALL cor0.col1 DIV col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6886
SELECT ALL cor0.col1 / col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT col1 * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT - col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + 64 + + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
145
64

query I rowsort
SELECT ALL - 94 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-94
-94
-94

query I rowsort
SELECT ALL - cor0.col0 + - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-164
-44
-56

query I rowsort
SELECT COALESCE ( - COALESCE ( cor0.col0, cor0.col0 ), - 80 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 63 - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-28
-29
48

query I rowsort
SELECT - cor0.col0 + cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1, col1
----
0
0
0

query I rowsort
SELECT + col2 AS col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 70 - 74 AS col2 FROM tab0 GROUP BY tab0.col1
----
-144

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6897
SELECT DISTINCT CAST( cor0.col1 AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
81

skipif mysql # not compatible
query I rowsort label-6897
SELECT DISTINCT CAST ( cor0.col1 AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT - 91 + - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-106
-182
-183

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 5 AS col2 FROM tab2 GROUP BY tab2.col0
----
5
5
5

query I rowsort
SELECT - cor0.col0 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 ALL cor0.col2 + - 74 col2 FROM tab0 AS cor0 GROUP BY col2
----
-36
-50
5

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6903
SELECT ALL - CAST( + 77 AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-77
-77
-77

skipif mysql # not compatible
query I rowsort label-6903
SELECT ALL - CAST ( + 77 AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-77
-77
-77

query I rowsort
SELECT ALL 0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - + col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, col2
----
-15
-91
-92

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col0, col2, cor0.col0
----
58
79
87

query I rowsort
SELECT 64 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
64
64
64

query I rowsort
SELECT DISTINCT + tab1.col1 + + col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-6911
SELECT 94 DIV cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
11
2

skipif mysql # not compatible
query I rowsort label-6911
SELECT 94 / cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
11
2

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + 88 * 31 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 6 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
6

query I rowsort
SELECT - 57 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-2508
-3249
-342

query I rowsort
SELECT DISTINCT - tab0.col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - 55 FROM tab1 GROUP BY col0
----
-55
-55
-55

query I rowsort
SELECT + 16 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-656
-944
-976

query I rowsort
SELECT DISTINCT + 79 FROM tab2 AS cor0 GROUP BY cor0.col0
----
79

query I rowsort
SELECT + 63 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
63
63
63

query I rowsort
SELECT 12 FROM tab2 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT ALL - 26 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-26
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + 49 col1 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
-8
43
5

query I rowsort
SELECT - 36 FROM tab2 GROUP BY tab2.col1
----
-36
-36
-36

query I rowsort
SELECT + NULLIF ( + 9, + cor0.col2 + col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT cor0.col2 * + 97 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5626
7663
8439

query I rowsort
SELECT ALL - 76 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-76
-76
-76

query I rowsort
SELECT cor0.col2 - + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ( cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 59 col0 FROM tab1 GROUP BY tab1.col0
----
-59
-59
-59

query I rowsort
SELECT DISTINCT + cor0.col2 * 39 + - 58 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1424
3023
878

query I rowsort
SELECT + - tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-6933
SELECT - col0 DIV - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6933
SELECT - col0 / - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT DISTINCT 51 AS col2 FROM tab2 GROUP BY tab2.col2
----
51

query I rowsort
SELECT + col1 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT DISTINCT + 24 FROM tab2 cor0 GROUP BY cor0.col1
----
24

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col0, cor0.col1
----
22
28
82

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6938
SELECT CAST( NULL AS DECIMAL ) * - 71 col1 FROM tab2 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6938
SELECT CAST ( NULL AS REAL ) * - 71 col1 FROM tab2 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 71 FROM tab0 AS cor0 GROUP BY cor0.col1
----
71

query I rowsort
SELECT DISTINCT 92 FROM tab0 cor0 GROUP BY cor0.col0
----
92

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 90 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-90

query I rowsort
SELECT ALL + cor0.col0 * 76 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1672
2128
6232

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 57 col2 FROM tab0 GROUP BY tab0.col1
----
57
57

query I rowsort
SELECT - - 29 AS col0 FROM tab1 GROUP BY tab1.col1
----
29
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col1, cor0.col1
----
-81
0
0

query I rowsort
SELECT + cor1.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT + 59 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
140
59

query I rowsort
SELECT DISTINCT + 13 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
13

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 - cor0.col1 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1944
0
0

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT + 61 + - 52 FROM tab1 AS cor0 GROUP BY cor0.col0
----
9
9
9

query I rowsort
SELECT NULLIF ( - col1, cor0.col1 + + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
NULL

query I rowsort
SELECT - 70 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-70
-70
-70

query I rowsort
SELECT ALL + 79 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
79
79

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT DISTINCT - 76 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-76

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT DISTINCT 44 FROM tab2 AS cor0 GROUP BY cor0.col2
----
44

query I rowsort
SELECT + cor0.col2 - - 32 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
111
56
70

onlyif mysql # DIV for integer division: 
query I rowsort label-6964
SELECT DISTINCT cor0.col2 + + cor0.col2 DIV - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
23
37
78

skipif mysql # not compatible
query I rowsort label-6964
SELECT DISTINCT cor0.col2 + + cor0.col2 / - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
23
37
78

query I rowsort
SELECT DISTINCT - 36 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
-36

query I rowsort
SELECT 69 + - col2 * cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-2496
-3055
21

query I rowsort
SELECT ALL + col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT 9 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL col0 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 ALL COALESCE ( 78, - cor1.col2 * - 62 - + 55 ) col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT DISTINCT - - 91 FROM tab2 GROUP BY tab2.col2
----
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 46 + col2 col0 FROM tab0 AS cor0 GROUP BY col2
----
125
70
84

query I rowsort
SELECT + 31 * - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
-1271
-1829
-1891

query I rowsort
SELECT ALL 60 + + tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
104
117
66

query I rowsort
SELECT ALL - 65 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-65
-65
-65

onlyif mysql # DIV for integer division: 
query I rowsort label-6977
SELECT ALL 57 DIV - 16 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-3
-3
-3

skipif mysql # not compatible
query I rowsort label-6977
SELECT ALL 57 / - 16 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-3
-3
-3

query I rowsort
SELECT DISTINCT + 65 * - col0 + 73 FROM tab2 GROUP BY col0
----
-5842
-5907
-902

query I rowsort
SELECT col0 AS col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col2 * + 88 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3960
6248
704

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
----
-81
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6982
SELECT DISTINCT CAST( + 80 AS SIGNED ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col2
----
80

skipif mysql # not compatible
query I rowsort label-6982
SELECT DISTINCT CAST ( + 80 AS INTEGER ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col2
----
80

onlyif mysql # DIV for integer division: 
query I rowsort label-6983
SELECT + 91 DIV - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-1
-15
-2

skipif mysql # not compatible
query I rowsort label-6983
SELECT + 91 / - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-1
-15
-2

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6984
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6984
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - cor1.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 23 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
23
23
23

query I rowsort
SELECT 3 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT ALL cor0.col1 + - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT 62 FROM tab0 GROUP BY tab0.col2
----
62
62
62

query I rowsort
SELECT ALL - - 98 FROM tab1 GROUP BY tab1.col2
----
98
98
98

query I rowsort
SELECT + 10 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
10
10
10

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-17
11
14

query I rowsort
SELECT DISTINCT + cor0.col1 + + 11 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
11
92

query I rowsort
SELECT DISTINCT cor0.col0 * + 71 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1562
1988
5822

query I rowsort
SELECT DISTINCT + 45 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
45

query I rowsort
SELECT 87 FROM tab0 GROUP BY tab0.col1
----
87
87

query I rowsort
SELECT - cor0.col1 + - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-162
0

query I rowsort
SELECT + 66 FROM tab1 AS cor0 GROUP BY cor0.col0
----
66
66
66

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6999
SELECT CAST( NULL AS DECIMAL ) AS col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6999
SELECT CAST ( NULL AS REAL ) AS col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-7000
SELECT + cor0.col1 DIV + 13 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6

skipif mysql # not compatible
query I rowsort label-7000
SELECT + cor0.col1 / + 13 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6

query I rowsort
SELECT - 62 AS col1 FROM tab2 GROUP BY tab2.col1
----
-62
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 18 col1 FROM tab0 GROUP BY tab0.col2
----
18
18
18

query I rowsort
SELECT ALL + 50 FROM tab2 GROUP BY tab2.col0
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 96 col0 FROM tab1 GROUP BY tab1.col2
----
96
96
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 70 * tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
1680
2660
5530

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7006
SELECT DISTINCT CAST( NULL AS DECIMAL ) col2 FROM tab1 GROUP BY tab1.col2
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7006
SELECT DISTINCT CAST ( NULL AS REAL ) col2 FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT 12 FROM tab0 AS cor0 GROUP BY col0
----
12
12
12

query I rowsort
SELECT DISTINCT - 24 * 52 FROM tab1 AS cor0 GROUP BY col1
----
-1248

onlyif mysql # DIV for integer division: 
query I rowsort label-7010
SELECT ALL col0 DIV + 92 col2 FROM tab1 cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7010
SELECT ALL col0 / + 92 col2 FROM tab1 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL 45 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
45
45
45

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 80 AS col1 FROM tab1 GROUP BY tab1.col1
----
80
80
80

query I rowsort
SELECT ALL + cor0.col1 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
102
115
14

query I rowsort
SELECT cor0.col1 - - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

query I rowsort
SELECT col1 * 46 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2024
2622
276

query I rowsort
SELECT ALL + col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
58
79
87

query I rowsort
SELECT 99 FROM tab0 cor0 GROUP BY col2, cor0.col2, cor0.col2
----
99
99
99

query I rowsort
SELECT DISTINCT + 97 FROM tab1 cor0 GROUP BY cor0.col2
----
97

onlyif mysql # DIV for integer division: 
query I rowsort label-7020
SELECT - col0 + + cor0.col2 DIV - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col2, cor0.col0
----
-20
-91
-92

skipif mysql # not compatible
query I rowsort label-7020
SELECT - col0 + + cor0.col2 / - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col2, cor0.col0
----
-20
-91
-92

query I rowsort
SELECT ALL tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT cor0.col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7023
SELECT DISTINCT 60 DIV - col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1
-10

skipif mysql # not compatible
query I rowsort label-7023
SELECT DISTINCT 60 / - col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1
-10

query I rowsort
SELECT DISTINCT ( col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - 99 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-99
-99
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
24
38
79

query I rowsort
SELECT ALL + cor0.col1 + + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
118
122
82

query I rowsort
SELECT ALL + - 39 FROM tab1 GROUP BY tab1.col0
----
-39
-39
-39

query I rowsort
SELECT ALL 80 FROM tab1 AS cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT 66 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
66
66
66

query I rowsort
SELECT ALL cor0.col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT + cor0.col1 + + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
138
148
99

query I rowsort
SELECT DISTINCT + 54 FROM tab2 AS cor0 GROUP BY cor0.col2
----
54

query I rowsort
SELECT ( cor1.col1 ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

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.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT + 53 FROM tab1 GROUP BY tab1.col1
----
53
53
53

query I rowsort
SELECT - 50 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-141
-142
-65

query I rowsort
SELECT + 25 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
25
25

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7040
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7040
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 82 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
82

query I rowsort
SELECT ALL - cor0.col2 - - 51 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-28
-36
-7

query I rowsort
SELECT ALL - 44 * col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1804
-2596
-2684

query I rowsort
SELECT cor0.col0 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - cor0.col1 + col1 FROM tab0 AS cor0 GROUP BY col1
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7046
SELECT ALL cor0.col2 DIV - ( 30 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-2
-2

skipif mysql # not compatible
query I rowsort label-7046
SELECT ALL cor0.col2 / - ( 30 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-2
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT cor0.col2 + + 26 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
105
113
84

query I rowsort
SELECT 62 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
105
145
88

query I rowsort
SELECT + ( 76 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
76
76
76

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7052
SELECT ALL CAST( NULL AS SIGNED ) * 65 AS col1 FROM tab1 cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7052
SELECT ALL CAST ( NULL AS INTEGER ) * 65 AS col1 FROM tab1 cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 35 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-35

query I rowsort
SELECT - 13 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-13
-13
-13

query I rowsort
SELECT ALL + col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT cor0.col2 + - cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-19
-45
53

query I rowsort
SELECT ALL cor0.col2 * + 81 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
4698
6399
7047

query I rowsort
SELECT ALL + cor0.col0 * - CASE + cor0.col1 WHEN cor0.col2 THEN cor0.col2 WHEN cor0.col2 / cor0.col2 THEN + cor0.col2 END FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 * NULLIF ( 64, col1 * cor0.col0 + cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-2624
-3776
-3904

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
118
122
82

query I rowsort
SELECT ALL 3 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT 69 FROM tab2 AS cor0 GROUP BY cor0.col1
----
69
69
69

onlyif mysql # DIV for integer division: 
query I rowsort label-7063
SELECT cor0.col0 DIV - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7063
SELECT cor0.col0 / - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT + 82 + 16 FROM tab2 AS cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-7066
SELECT DISTINCT - - col1 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1

skipif mysql # not compatible
query I rowsort label-7066
SELECT DISTINCT - - col1 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, col0
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-7068
SELECT cor0.col1 * cor0.col1 + + cor0.col1 DIV + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1936
3250
36

skipif mysql # not compatible
query I rowsort label-7068
SELECT cor0.col1 * cor0.col1 + + cor0.col1 / + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1936
3250
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + col2 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 ALL - cor0.col1 + COALESCE ( 55, - col1, - cor0.col2 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-26
55

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT - col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT - cor0.col2 - - col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
0

query I rowsort
SELECT ALL 88 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
88
88
88

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT - cor0.col0 * - 96 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
2112
2688
7872

query I rowsort
SELECT ALL cor0.col2 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
102
150
170

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-19
-45
53

query I rowsort
SELECT cor0.col2 / col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL - + 51 FROM tab1 GROUP BY tab1.col2
----
-51
-51
-51

query I rowsort
SELECT ALL - 45 AS col2 FROM tab1 GROUP BY tab1.col0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT - 50 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-50

query I rowsort
SELECT + + 41 AS col2 FROM tab0 GROUP BY col1
----
41
41

query I rowsort
SELECT + ( - 57 ) FROM tab2 cor0 GROUP BY cor0.col0
----
-57
-57
-57

query I rowsort
SELECT + 17 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT - 56 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-15
3
5

query I rowsort
SELECT ALL cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
58
79
87

query I rowsort
SELECT + - 95 AS col1 FROM tab2 GROUP BY tab2.col0
----
-95
-95
-95

query I rowsort
SELECT DISTINCT + + 58 AS col2 FROM tab1 GROUP BY tab1.col1
----
58

query I rowsort
SELECT - cor0.col0 FROM tab0 cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT 87 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
87
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * + 10 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
440
570
60

query I rowsort
SELECT - 90 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-90
-90
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + + tab1.col1 + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT DISTINCT - tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col1 * 96 + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3977
5723
5917

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7101
SELECT - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7101
SELECT - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( 57 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
57

query I rowsort
SELECT + 86 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
86
86
86

query I rowsort
SELECT DISTINCT - - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 + + ( - col0 ) FROM tab0 cor0 GROUP BY cor0.col0
----
1806
650
6806

query I rowsort
SELECT cor0.col2 + 87 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
132
158
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 94 col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
94
94
94

query I rowsort
SELECT DISTINCT + cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT + cor0.col0 * cor0.col0 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
0

query I rowsort
SELECT - cor0.col2 + + cor0.col1 * + 25 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-38
-79
2001

query I rowsort
SELECT cor0.col2 * - 81 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3645
-5751
-648

query I rowsort
SELECT cor0.col0 * 21 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1911
1932
315

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7114
SELECT DISTINCT - CAST( NULL AS SIGNED ) * 29 FROM tab0 AS cor0 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-7114
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * 29 FROM tab0 AS cor0 GROUP BY col1
----
NULL

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT ALL 3 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
3
3
3

query I rowsort
SELECT ( - cor0.col0 ) AS col1 FROM tab0 cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - 41 + + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-17
-3
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 45 * + col1 col2 FROM tab1 GROUP BY tab1.col1
----
-1980
-2565
-270

query I rowsort
SELECT - 30 FROM tab1 GROUP BY tab1.col1
----
-30
-30
-30

query I rowsort
SELECT ALL + 38 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
38
38
38

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY col0, cor0.col0
----
22
28
82

query I rowsort
SELECT - tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT ( NULL ) IS NOT NULL
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 65 col2 FROM tab0 cor0 GROUP BY col0
----
65
65
65

onlyif mysql # DIV for integer division: 
query I rowsort label-7126
SELECT + tab1.col1 DIV col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7126
SELECT + tab1.col1 / col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT + + 3 FROM tab2 GROUP BY tab2.col2
----
3
3
3

query I rowsort
SELECT DISTINCT COALESCE ( cor0.col2, cor0.col2 ) * 14 + 36 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1738
-528
-836

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 14 col0 FROM tab2 GROUP BY col2
----
14
14
14

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
105
38
79

query I rowsort
SELECT + ( + 48 ) FROM tab1 GROUP BY col0
----
48
48
48

query I rowsort
SELECT ALL + cor0.col2 * ( + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 91 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-91
-91
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 71 * + 38 + + 21 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2677
-2677
-2677

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 31 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
31
31
31

query I rowsort
SELECT - 35 + - 24 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1381
1429
949

onlyif mysql # DIV for integer division: 
query I rowsort label-7137
SELECT DISTINCT + cor0.col1 DIV + 91 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-7137
SELECT DISTINCT + cor0.col1 / + 91 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
0

query I rowsort
SELECT 8 FROM tab1 AS cor0 GROUP BY col1
----
8
8
8

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 9 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
9
9
9

query I rowsort
SELECT + col2 AS col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT 37 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
37
37
37

query I rowsort
SELECT 84 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT DISTINCT - cor0.col1 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT + ( 11 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
11

query I rowsort
SELECT ALL + 12 * + 49 FROM tab2 GROUP BY col1
----
588
588
588

query I rowsort
SELECT - ( cor0.col0 ) + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT + 2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2
2
2

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col2 * 58 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1368
2166
4503

onlyif mysql # DIV for integer division: 
query I rowsort label-7150
SELECT cor0.col2 DIV - 26 + 45 DIV cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2
-3
-3

skipif mysql # not compatible
query I rowsort label-7150
SELECT cor0.col2 / - 26 + 45 / cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2
-3
-3

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7151
SELECT DISTINCT CAST( NULL AS SIGNED ) * - cor0.col1 col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7151
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - cor0.col1 col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT - 53 + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-12
6
8

query I rowsort
SELECT ALL 76 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col2
----
76
76
76

query I rowsort
SELECT - 28 FROM tab0 GROUP BY tab0.col2
----
-28
-28
-28

query I rowsort
SELECT + 67 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
67
67
67

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-26
-43
-83

query I rowsort
SELECT ALL + + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col0 - cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1806
-650
-6806

query I rowsort
SELECT DISTINCT + cor0.col2 * 80 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1920
3040
6320

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT 73 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
73

query I rowsort
SELECT ALL + 95 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
95
95
95

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-1936
-3249
-36

query I rowsort
SELECT - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 12 col1 FROM tab1 GROUP BY tab1.col0
----
-12

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( - 16, cor0.col1 * cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-16
-16
-16

query I rowsort
SELECT ALL - - 51 AS col1 FROM tab2 GROUP BY tab2.col1
----
51
51
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( - col0 ) col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT - - 60 AS col0 FROM tab2 GROUP BY tab2.col0
----
60
60
60

query I rowsort
SELECT ALL 36 FROM tab0 cor0 GROUP BY col0
----
36
36
36

onlyif mysql # DIV for integer division: 
query I rowsort label-7172
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-7172
SELECT - ( cor0.col1 ) / cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2565
-3124
-48

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - 21 + - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-27
-65
-78

query I rowsort
SELECT + 94 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
94
94
94

query I rowsort
SELECT + 85 * - 97 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-8245
-8245
-8245

query I rowsort
SELECT ALL 27 + + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
109
49
55

query I rowsort
SELECT + 15 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT col0 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT - cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT - cor0.col0 * - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT ALL + 23 FROM tab2 GROUP BY tab2.col0
----
23
23
23

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 89 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-89

onlyif mysql # DIV for integer division: 
query I rowsort label-7187
SELECT ALL + 32 DIV - 97 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7187
SELECT ALL + 32 / - 97 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL 70 + 53 FROM tab2 cor0 GROUP BY col2, cor0.col1
----
123
123
123

query I rowsort
SELECT + 12 * + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
528
684
72

query I rowsort
SELECT + - 72 AS col1 FROM tab2 GROUP BY tab2.col0
----
-72
-72
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 19 * - cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1083
114
836

query I rowsort
SELECT 4 FROM tab0 AS cor0 GROUP BY col1
----
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, col0
----
26
43
83

query I rowsort
SELECT ALL - - 98 FROM tab0 GROUP BY tab0.col2
----
98
98
98

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7196
SELECT ALL + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7196
SELECT ALL + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 50 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-50
31

query I rowsort
SELECT + 32 FROM tab1 AS cor0 GROUP BY col2
----
32
32
32

query I rowsort
SELECT ALL 71 FROM tab1 cor0 GROUP BY cor0.col1
----
71
71
71

query I rowsort
SELECT DISTINCT 60 AS col0 FROM tab0 GROUP BY col2
----
60

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT 15 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1215
0

query I rowsort
SELECT cor0.col0 * cor0.col0 + + cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
240
8372
8556

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7204
SELECT ALL - cor0.col0 * CAST( - 57 AS SIGNED ) + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1276
1624
4756

skipif mysql # not compatible
query I rowsort label-7204
SELECT ALL - cor0.col0 * CAST ( - 57 AS INTEGER ) + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1276
1624
4756

query I rowsort
SELECT 6 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
6
6
6

query I rowsort
SELECT ALL + 7 + 81 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
1222
7378
7459

onlyif mysql # DIV for integer division: 
query I rowsort label-7207
SELECT cor0.col0 + cor0.col0 DIV - 33 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
80

skipif mysql # not compatible
query I rowsort label-7207
SELECT cor0.col0 + cor0.col0 / - 33 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
80

query I rowsort
SELECT + cor0.col0 + + 52 FROM tab0 AS cor0 GROUP BY col0
----
135
78
95

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - ( + col1 ) FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 46 * 65 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
3014
3028
3069

query I rowsort
SELECT - cor0.col0 * - 47 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
4277
4324
705

query I rowsort
SELECT DISTINCT 28 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
28

onlyif mysql # DIV for integer division: 
query I rowsort label-7214
SELECT ALL 51 DIV - 49 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1
-1

skipif mysql # not compatible
query I rowsort label-7214
SELECT ALL 51 / - 49 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1
-1

query I rowsort
SELECT DISTINCT 15 * - 66 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-990

query I rowsort
SELECT DISTINCT - 34 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col1
----
-34

query I rowsort
SELECT ALL col2 - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
17
20
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - 92 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2024
-2576
-7544

query I rowsort
SELECT ALL 86 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
86
86
86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7221
SELECT ALL CAST( 7 AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
7
7
7

skipif mysql # not compatible
query I rowsort label-7221
SELECT ALL CAST ( 7 AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT NULLIF ( 59, - cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col2
----
59
59
59

query I rowsort
SELECT DISTINCT - cor0.col1 + + cor0.col1 AS col0 FROM tab0 cor0 GROUP BY col1
----
0

query I rowsort
SELECT col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + cor0.col2 - - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT + + 96 AS col2 FROM tab0 GROUP BY tab0.col1
----
96
96

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT - 98 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-98

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 FROM tab1 AS cor0 WHERE NOT ( NULL ) IN ( cor0.col0 + cor0.col2 ) GROUP BY cor0.col1
----

query I rowsort
SELECT - cor0.col1 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL tab0.col0 * tab0.col0 FROM tab0 GROUP BY col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 99 + - cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
17
71
77

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT - cor0.col1 + - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-118
-122
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-7235
SELECT + 11 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7235
SELECT + 11 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col2 * 72 FROM tab2 AS cor0 GROUP BY col2
----
4176
5688
6264

query I rowsort
SELECT cor0.col1 - - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col1, col1, cor0.col2
----
138
148
99

query I rowsort
SELECT DISTINCT + + tab2.col2 * col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL <= cor0.col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 79 * col2 col0 FROM tab2 GROUP BY col2
----
-4582
-6241
-6873

query I rowsort
SELECT + ( 84 ) FROM tab0 cor0 GROUP BY cor0.col2
----
84
84
84

query I rowsort
SELECT 80 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1920
3040
6320

query I rowsort
SELECT ALL + 9 FROM tab1 GROUP BY tab1.col0
----
9
9
9

query I rowsort
SELECT - + col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT - col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, col2
----
58
79
87

query I rowsort
SELECT - 57 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-57
-57
-57

onlyif mysql # DIV for integer division: 
query I rowsort label-7249
SELECT + cor0.col2 + cor0.col2 DIV + 46 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
72
8

skipif mysql # not compatible
query I rowsort label-7249
SELECT + cor0.col2 + cor0.col2 / + 46 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
72
8

query I rowsort
SELECT ALL - - 51 FROM tab0 GROUP BY tab0.col0
----
51
51
51

query I rowsort
SELECT + + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL + + 58 AS col1 FROM tab1 GROUP BY tab1.col0
----
58
58
58

query I rowsort
SELECT DISTINCT + 49 FROM tab0 GROUP BY tab0.col0
----
49

query I rowsort
SELECT DISTINCT 15 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
15

query I rowsort
SELECT - cor1.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-44
-57
-6

query I rowsort
SELECT - tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - + col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT 0 * cor0.col0 + + 72 FROM tab1 AS cor0 GROUP BY cor0.col0
----
72
72
72

query I rowsort
SELECT - 41 FROM tab0 AS cor0 GROUP BY col0
----
-41
-41
-41

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
1305
5336
7189

query I rowsort
SELECT + 57 FROM tab2 AS cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT ALL + 68 + + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
106
147
92

query I rowsort
SELECT 37 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 82 * + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1968
3116
6478

query I rowsort
SELECT DISTINCT - 42 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-42

onlyif mysql # DIV for integer division: 
query I rowsort label-7266
SELECT + + col1 + + tab2.col1 DIV - 68 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif mysql # not compatible
query I rowsort label-7266
SELECT + + col1 + + tab2.col1 / - 68 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT - 90 AS col0 FROM tab2 GROUP BY col2
----
-90
-90
-90

query I rowsort
SELECT + 56 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
56
56
56

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + - col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + 79 FROM tab2 cor0 GROUP BY cor0.col1
----
79

query I rowsort
SELECT - cor0.col1 + 26 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-18
-31
20

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col1 * cor0.col1 + 11 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1692
3492
3732

onlyif mysql # DIV for integer division: 
query I rowsort label-7276
SELECT DISTINCT - 16 DIV - 3 FROM tab1 AS cor0 GROUP BY cor0.col0
----
5

skipif mysql # not compatible
query I rowsort label-7276
SELECT DISTINCT - 16 / - 3 FROM tab1 AS cor0 GROUP BY cor0.col0
----
5

query I rowsort
SELECT - 59 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-59
-59
-59

query I rowsort
SELECT + 25 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT ALL + ( 78 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
78
78
78

query I rowsort
SELECT 87 AS col0 FROM tab2 GROUP BY tab2.col1
----
87
87
87

query I rowsort
SELECT DISTINCT + cor0.col1 * + 15 FROM tab2 AS cor0 GROUP BY cor0.col1
----
615
885
915

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 96 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
96
96
96

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 67 FROM tab0 AS cor0 GROUP BY cor0.col2
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + 77 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
77
77
77

query I rowsort
SELECT + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT - ( 22 * + cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col0
----
-1826
-572
-946

query I rowsort
SELECT DISTINCT 47 - - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
138
139
62

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

query I rowsort
SELECT DISTINCT + 84 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
84

query I rowsort
SELECT DISTINCT + 72 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
153
72

query I rowsort
SELECT ALL 60 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
60
60
60

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7296
SELECT DISTINCT CAST( + cor0.col0 AS SIGNED ) FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

skipif mysql # not compatible
query I rowsort label-7296
SELECT DISTINCT CAST ( + cor0.col0 AS INTEGER ) FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - ( + 74 ) AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-74

query I rowsort
SELECT DISTINCT + 43 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
43

query I rowsort
SELECT - tab1.col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 2 * + cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-162
0

query I rowsort
SELECT - ( - ( cor0.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 DISTINCT 42 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
42

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + - tab1.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 ALL col2 * - col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-1305
-5336
-7189

query I rowsort
SELECT ALL cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT + - cor0.col0 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 44 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-44
-44

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + 29 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
29

query I rowsort
SELECT + 27 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
27
27
27

query I rowsort
SELECT 62 FROM tab2 AS cor0 GROUP BY col0
----
62
62
62

query I rowsort
SELECT 47 FROM tab1 AS cor0 GROUP BY cor0.col1
----
47
47
47

query I rowsort
SELECT 86 FROM tab0 AS cor0 GROUP BY cor0.col1
----
86
86

query I rowsort
SELECT col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT - cor0.col2 * + ( 82 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4756
-6478
-7134

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT + + 99 * - 46 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-4554
-4554
-4554

query I rowsort
SELECT ALL + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
41
59
61

query I rowsort
SELECT + 53 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT + 14 * - 96 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1344
-1344
-1344

query I rowsort
SELECT 79 FROM tab0 AS cor0 GROUP BY cor0.col1
----
79
79

query I rowsort
SELECT col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - ( + cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT cor0.col2 + 95 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
103
140
166

query I rowsort
SELECT DISTINCT 48 + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
127
72
86

query I rowsort
SELECT ALL - 54 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-54
-54
-54

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT - 16 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-16

query I rowsort
SELECT 0 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
0

query I rowsort
SELECT + 95 + 62 AS col1 FROM tab0 GROUP BY tab0.col0
----
157
157
157

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7335
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-7335
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT - 65 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-65
-65
-65

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, col0
----
58
79
87

query I rowsort
SELECT - tab0.col1 * - ( + tab0.col1 ) AS col1 FROM tab0 GROUP BY col1
----
0
6561

query I rowsort
SELECT 42 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
42
42
42

query I rowsort
SELECT 68 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
68
68
68

query I rowsort
SELECT DISTINCT + 63 AS col2 FROM tab1 GROUP BY col1
----
63

query I rowsort
SELECT 9 * + 4 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
36
36
36

query I rowsort
SELECT 41 + 54 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
2471
3875
473

query I rowsort
SELECT DISTINCT + tab1.col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT 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 cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT + 87 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
87

query I rowsort
SELECT DISTINCT ( 60 ) FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
60

query I rowsort
SELECT ALL + col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL <= ( NULL )
----

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
0

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
22
28
82

query I rowsort
SELECT DISTINCT 52 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
52

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT - 62 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-62

query I rowsort
SELECT col0 FROM tab2 AS cor0 GROUP BY col0, col1
----
15
91
92

query I rowsort
SELECT + 72 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
72
72

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL 45 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
45
45

query I rowsort
SELECT ALL - cor0.col0 + 30 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-52
2
8

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + cor0.col2 * 2 + + col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
174
237
261

onlyif mysql # DIV for integer division: 
query I rowsort label-7366
SELECT 83 DIV - cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-3

skipif mysql # not compatible
query I rowsort label-7366
SELECT 83 / - cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-3

query I rowsort
SELECT ALL 3 FROM tab2 AS cor0 GROUP BY col0
----
3
3
3

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + ( - cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT 23 FROM tab1, tab0 cor0 GROUP BY cor0.col0
----
23

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + cor0.col2 - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + 59 FROM tab0 AS cor0 GROUP BY cor0.col2
----
59
59
59

query I rowsort
SELECT - col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
164
44
56

query I rowsort
SELECT DISTINCT - 27 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-27

query I rowsort
SELECT DISTINCT 79 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1185
7189
7268

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT col1 * ( col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT - + ( 2 ) AS col1 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
-2
-2
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + 56 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-2296
-3304
-3416

query I rowsort
SELECT + ( + col0 ) FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - 13 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-13
-13
-13

query I rowsort
SELECT DISTINCT 8 FROM tab2 AS cor0 GROUP BY cor0.col1
----
8

query I rowsort
SELECT + col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 37 FROM tab1 GROUP BY col2
----
-37

query I rowsort
SELECT col0 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
1260
176
5822

query I rowsort
SELECT 20 FROM tab2 AS cor0 GROUP BY cor0.col1
----
20
20
20

query I rowsort
SELECT ALL col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 39 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-39

query I rowsort
SELECT 4 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
4
4
4

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - 98 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-98
-98
-98

query I rowsort
SELECT - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-58
-79
-87

query I rowsort
SELECT ALL - 13 FROM tab1 AS cor0 GROUP BY col2
----
-13
-13
-13

query I rowsort
SELECT ALL 54 FROM tab1 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT 15 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
15
15
15

query I rowsort
SELECT ALL + 76 FROM tab0 AS cor0 GROUP BY cor0.col0
----
76
76
76

query I rowsort
SELECT cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT col2 * 11 FROM tab2 AS cor0 GROUP BY cor0.col2
----
638
869
957

query I rowsort
SELECT cor0.col1 + - 87 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6
-87

query I rowsort
SELECT ALL - 1 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 41 col0 FROM tab2 GROUP BY tab2.col2
----
-41
-41
-41

query I rowsort
SELECT ( + 48 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
48
48
48

query I rowsort
SELECT ALL + 69 FROM tab2 AS cor0 GROUP BY cor0.col1
----
69
69
69

query I rowsort
SELECT ALL + cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 66 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
66
66

query I rowsort
SELECT DISTINCT + 58 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1392
2204
4582

query I rowsort
SELECT + col1 * - cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

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.col2
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 + col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
162

query I rowsort
SELECT ALL tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + cor0.col2 * - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL + cor0.col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT cor0.col0 * 47 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1034
1316
3854

query I rowsort
SELECT DISTINCT 50 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
50

query I rowsort
SELECT DISTINCT - 38 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-38

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-7427
SELECT DISTINCT + CASE cor0.col1 WHEN + 96 THEN - 5 DIV 1 ELSE - cor0.col1 END FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-44
-57
-6

skipif mysql # not compatible
query I rowsort label-7427
SELECT DISTINCT + CASE cor0.col1 WHEN + 96 THEN - 5 / 1 ELSE - cor0.col1 END FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - 62 FROM tab2 GROUP BY col2
----
-62

query I rowsort
SELECT - + 36 AS col1 FROM tab0 GROUP BY tab0.col0
----
-36
-36
-36

query I rowsort
SELECT - 60 * - 84 AS col1 FROM tab1 GROUP BY tab1.col0
----
5040
5040
5040

query I rowsort
SELECT ALL - - 18 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1044
-1422
-1566

query I rowsort
SELECT 75 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
75
75
75

query I rowsort
SELECT NULLIF ( 97, cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY col1
----
97
97
97

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7434
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7434
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT + 33 FROM tab0 AS cor0 GROUP BY col2
----
33

query I rowsort
SELECT + 85 - - 56 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
141
141
141

query I rowsort
SELECT ALL 97 + + 90 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
187
187
187

query I rowsort
SELECT ALL - 31 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-31
-31
-31

query I rowsort
SELECT cor0.col2 + col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2, cor0.col2
----
105
121
67

query I rowsort
SELECT - 52 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-52
-52
-52

query I rowsort
SELECT - 7 FROM tab1 GROUP BY col1
----
-7
-7
-7

query I rowsort
SELECT + cor0.col2 * - col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-1944
0
0

query I rowsort
SELECT ALL cor0.col2 + col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
116
158
174

query I rowsort
SELECT ALL - cor0.col2 * + 40 + - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2378
-3239
-3567

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - cor0.col2 ) col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
40

query I rowsort
SELECT ALL 52 AS col2 FROM tab2 GROUP BY col0
----
52
52
52

query I rowsort
SELECT ALL + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - col0 * + 92 - - cor0.col0 * + 34 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5278
-5336
-870

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-45
-71
-8

query I rowsort
SELECT ALL 94 FROM tab1 AS cor0 GROUP BY cor0.col0
----
94
94
94

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - cor0.col2 * - 3 FROM tab0 cor0 GROUP BY cor0.col2
----
114
237
72

query I rowsort
SELECT DISTINCT - col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT cor0.col1 + - 99 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-18
-99
-99

query I rowsort
SELECT 81 + - 98 * - 65 AS col2 FROM tab1 GROUP BY col1
----
6451
6451
6451

query I rowsort
SELECT DISTINCT ( cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 25 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-2050
-550
-700

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 2 + - cor0.col1 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1934
-3247
-34

query I rowsort
SELECT + 92 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
92
92
92

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col0, col2
----
225
8281
8464

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7464
SELECT ALL CAST( - 25 AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-25
-25
-25

skipif mysql # not compatible
query I rowsort label-7464
SELECT ALL CAST ( - 25 AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-25
-25
-25

query I rowsort
SELECT ALL 95 * 10 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1032
972
978

query I rowsort
SELECT ALL + 69 FROM tab2 AS cor0 GROUP BY cor0.col2
----
69
69
69

query I rowsort
SELECT + 72 FROM tab2 AS cor0 GROUP BY col1
----
72
72
72

query I rowsort
SELECT ALL 92 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
92
92
92

query I rowsort
SELECT + 91 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
91
91
91

query I rowsort
SELECT DISTINCT + 49 FROM tab2 AS cor0 GROUP BY cor0.col2
----
49

query I rowsort
SELECT - cor0.col0 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1305
-5336
-7189

query I rowsort
SELECT + cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT + cor0.col0 * 72 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1846
3053
5893

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 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.col1 col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + 65 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
65
65
65

query I rowsort
SELECT DISTINCT + + 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 - - 64 col2 FROM tab2 GROUP BY tab2.col1
----
64
64
64

query I rowsort
SELECT cor0.col2 FROM tab0 cor0 GROUP BY col0, cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT ALL 83 FROM tab2 AS cor0 GROUP BY cor0.col2
----
83
83
83

query I rowsort
SELECT ( 3 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT ALL - 64 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-64
-64
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 82 col1 FROM tab1 AS cor0 GROUP BY col2
----
82
82
82

query I rowsort
SELECT col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT + 34 * - 0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
-44
-57
-6

query I rowsort
SELECT - col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + 86 FROM tab1 GROUP BY col1
----
86
86
86

query I rowsort
SELECT + 51 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-4641
-4692
-765

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col1 FROM tab2 cor0 GROUP BY cor0.col0, col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 62 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-62
-62
-62

query I rowsort
SELECT ALL + - 17 AS col1 FROM tab2 GROUP BY col0
----
-17
-17
-17

query I rowsort
SELECT DISTINCT + tab0.col2 * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL >= NULL
----

query I rowsort
SELECT tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT cor0.col2 + - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL - - 80 AS col1 FROM tab2 GROUP BY tab2.col1
----
80
80
80

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
26
43
83

query I rowsort
SELECT ALL + 62 FROM tab2 GROUP BY col2
----
62
62
62

query I rowsort
SELECT DISTINCT + 37 FROM tab1 GROUP BY tab1.col0
----
37

query I rowsort
SELECT - cor0.col1 FROM tab2 cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL + 49 FROM tab1 cor0 GROUP BY cor0.col1
----
49
49
49

query I rowsort
SELECT + - 92 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-4140
-6532
-736

query I rowsort
SELECT + 89 FROM tab2 GROUP BY tab2.col1
----
89
89
89

query I rowsort
SELECT + 67 FROM tab1 GROUP BY tab1.col1
----
67
67
67

query I rowsort
SELECT + cor0.col0 + - 14 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, col1
----
1
77
78

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1, cor0.col1
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT COALESCE ( 6, - cor0.col2 * 9, + cor0.col2 * cor0.col1, cor0.col2 + + cor0.col1 ) col1 FROM tab2 AS cor0 GROUP BY col0
----
6
6
6

query I rowsort
SELECT DISTINCT 16 * + 72 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
1152

query I rowsort
SELECT + cor0.col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT col1 + 14 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
14
95

query I rowsort
SELECT - cor0.col2 + 62 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-17
-25
4

query I rowsort
SELECT ALL + - 32 AS col2 FROM tab1 GROUP BY tab1.col0
----
-32
-32
-32

query I rowsort
SELECT ALL + 1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-7517
SELECT - cor0.col2 DIV 23 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-3
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7517
SELECT - cor0.col2 / 23 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 14 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
14
14
14

query I rowsort
SELECT DISTINCT - 82 - 99 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-181

query I rowsort
SELECT cor0.col1 * - col2 + + cor0.col2 * 26 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-2607
-3045
-870

query I rowsort
SELECT DISTINCT 64 * - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-1408
-1792
-5248

onlyif mysql # DIV for integer division: 
query I rowsort label-7522
SELECT DISTINCT + cor0.col0 DIV - 43 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
43
57
6

skipif mysql # not compatible
query I rowsort label-7522
SELECT DISTINCT + cor0.col0 / - 43 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
43
57
6

query I rowsort
SELECT ALL 28 FROM tab0 cor0 GROUP BY cor0.col2, col0, col0
----
28
28
28

query I rowsort
SELECT ALL 44 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT - - 58 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
58
58
58

query I rowsort
SELECT ( 2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2
2
2

query I rowsort
SELECT DISTINCT 92 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
92

query I rowsort
SELECT - CASE 1 WHEN - cor0.col1 THEN col1 * - col1 + + cor0.col0 END * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 66 FROM tab0 AS cor0 GROUP BY col1
----
66

query I rowsort
SELECT 39 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
39
39
39

query I rowsort
SELECT ALL + 59 FROM tab2 AS cor0 GROUP BY cor0.col2
----
59
59
59

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7532
SELECT ALL CAST( NULL AS SIGNED ) / 76 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7532
SELECT ALL CAST ( NULL AS INTEGER ) / 76 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 27 * - 48 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-1296
-1296
-1296

query I rowsort
SELECT 64 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
64
64
64

query I rowsort
SELECT ALL 58 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT - 8 FROM tab1 GROUP BY tab1.col0
----
-8
-8
-8

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT 2 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT ALL + cor0.col0 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
124
26
83

query I rowsort
SELECT cor0.col2 + 2 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
159
159
20

query I rowsort
SELECT - 49 FROM tab2 GROUP BY tab2.col2
----
-49
-49
-49

query I rowsort
SELECT ALL 84 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
84
84
84

query I rowsort
SELECT + 69 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
69
69
69

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7547
SELECT CAST( NULL AS DECIMAL ) * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7547
SELECT CAST ( NULL AS REAL ) * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 52 FROM tab0 cor0 GROUP BY cor0.col2
----
52
52
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT NULLIF ( - 92, - 57 ) col1 FROM tab0 GROUP BY tab0.col1
----
-92

query I rowsort
SELECT ALL + 75 FROM tab0 AS cor0 GROUP BY col1
----
75
75

query I rowsort
SELECT ( + cor0.col2 ) * cor0.col2 - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1980
4970
56

query I rowsort
SELECT ALL 69 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
69
69
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT - 18 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-18
-18
-18

query I rowsort
SELECT ALL col2 * - ( cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-1444
-576
-6241

query I rowsort
SELECT + col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 93 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-137
-150
-99

query I rowsort
SELECT - 8 * - 93 FROM tab0 AS cor0 GROUP BY col1
----
744
744

query I rowsort
SELECT col0 AS col2 FROM tab1 WHERE NULL IS NOT NULL GROUP BY tab1.col0
----

query I rowsort
SELECT 79 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT ALL + tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT ( - col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7563
SELECT - CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7563
SELECT - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 + col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7565
SELECT DISTINCT cor0.col0 DIV COALESCE ( 57, + cor0.col0 * - cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-7565
SELECT DISTINCT cor0.col0 / COALESCE ( 57, + cor0.col0 * - cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
1

query I rowsort
SELECT ALL 47 FROM tab2 AS cor0 GROUP BY cor0.col2
----
47
47
47

query I rowsort
SELECT + col1 AS col1 FROM tab0 GROUP BY col1
----
0
81

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 cor0.col2 + 93 AS col2 FROM tab0 cor0 GROUP BY col2
----
117
131
172

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * cor0.col1 + cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
1980
3306
42

query I rowsort
SELECT - 24 * 6 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-144
-144
-144

query I rowsort
SELECT - cor0.col2 * 36 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1620
-2556
-288

query I rowsort
SELECT DISTINCT ( + 29 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
29

query I rowsort
SELECT ALL - cor1.col2 * - cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col1
----
2565
3124
48

query I rowsort
SELECT + 77 FROM tab1 AS cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT DISTINCT - 90 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-90

query I rowsort
SELECT cor0.col0 + + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT + 2 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
2

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
58
79
87

query I rowsort
SELECT 64 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
145
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * 85 - + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY col2
----
4872
6636
7308

query I rowsort
SELECT DISTINCT 54 FROM tab2 cor0 GROUP BY cor0.col2
----
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 62 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
62
62
62

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2, cor0.col1, cor0.col1
----
15
91
92

query I rowsort
SELECT DISTINCT + 27 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
27

query I rowsort
SELECT + 51 * 2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
102
102

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-7588
SELECT 14 DIV - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7588
SELECT 14 / - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, col2
----
0
0
0

query I rowsort
SELECT ALL 63 FROM tab0 GROUP BY tab0.col1
----
63
63

query I rowsort
SELECT ALL 66 FROM tab2 cor0 GROUP BY cor0.col2
----
66
66
66

query I rowsort
SELECT cor0.col1 - 50 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2244
2907
306

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + 76 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
104
158
98

query I rowsort
SELECT cor0.col2 * ( 99 ) FROM tab2 cor0 GROUP BY cor0.col2
----
5742
7821
8613

query I rowsort
SELECT cor0.col2 * + 90 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4050
6390
720

onlyif mysql # DIV for integer division: 
query I rowsort label-7596
SELECT DISTINCT cor0.col2 DIV cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-7596
SELECT DISTINCT cor0.col2 / cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT ALL cor0.col2 * + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT ALL 6 FROM tab2 AS cor0 GROUP BY cor0.col1
----
6
6
6

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-7600
SELECT ALL - cor0.col0 DIV ( + col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7600
SELECT ALL - cor0.col0 / ( + col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL 69 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2829
-4071
-4209

onlyif mysql # DIV for integer division: 
query I rowsort label-7602
SELECT ALL + cor0.col1 DIV 93 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-7602
SELECT ALL + cor0.col1 / 93 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - 95 FROM tab2 cor0 GROUP BY cor0.col0
----
-95
-95
-95

onlyif mysql # DIV for integer division: 
query I rowsort label-7604
SELECT 47 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-7604
SELECT 47 / - cor0.col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-3
0
0

query I rowsort
SELECT ALL 64 * cor0.col1 + - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2772
3591
378

query I rowsort
SELECT - col1 + + cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7607
SELECT cor0.col1 DIV 57 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-7607
SELECT cor0.col1 / 57 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1

query I rowsort
SELECT DISTINCT + col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + 89 FROM tab1 cor0 GROUP BY col1
----
89
89
89

query I rowsort
SELECT ALL 35 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
35
35
35

query I rowsort
SELECT cor0.col1 * + 87 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
3567
5133
5307

query I rowsort
SELECT 22 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
22
22
22

query I rowsort
SELECT 63 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT + 42 FROM tab1 AS cor0 GROUP BY cor0.col1
----
42
42
42

query I rowsort
SELECT 46 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
104
125
133

query I rowsort
SELECT ALL + 72 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
72
72
72

query I rowsort
SELECT - 15 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-15
-15
-15

query I rowsort
SELECT col1 * - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT - cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 + col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
166
52
86

query I rowsort
SELECT 0 * col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + 99 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
99

query I rowsort
SELECT cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1936
3249
36

query I rowsort
SELECT ALL 28 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
28
28
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 63 * col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-2772
-3591
-378

query I rowsort
SELECT cor0.col1 + - 85 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-24
-26
-44

query I rowsort
SELECT ALL + 66 FROM tab2 GROUP BY col2
----
66
66
66

query I rowsort
SELECT ALL - 11 FROM tab0 GROUP BY tab0.col1
----
-11
-11

query I rowsort
SELECT tab1.col2 - + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL - cor0.col2 + col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 52 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
52

query I rowsort
SELECT 67 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
67
67
67

query I rowsort
SELECT ALL + 41 AS col1 FROM tab2 GROUP BY tab2.col0
----
41
41
41

query I rowsort
SELECT DISTINCT + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL 46 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
46
46

query I rowsort
SELECT ALL - + 19 FROM tab0 GROUP BY tab0.col1
----
-19
-19

onlyif mysql # DIV for integer division: 
query I rowsort label-7638
SELECT DISTINCT - cor0.col2 DIV + 39 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2
0

skipif mysql # not compatible
query I rowsort label-7638
SELECT DISTINCT - cor0.col2 / + 39 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2
0

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT 46 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 89 col2 FROM tab0 GROUP BY tab0.col1
----
89

query I rowsort
SELECT - COALESCE ( - cor0.col1, cor0.col1 + + cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL 66 AS col2 FROM tab2 GROUP BY tab2.col2
----
66
66
66

query I rowsort
SELECT ALL tab1.col2 * - tab1.col2 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + 60 FROM tab1 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT + 5 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
5
5
5

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col1 * + ( - 56 ) - 24 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2320
-3328
-3440

query I rowsort
SELECT DISTINCT ( - 42 ) AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-42

query I rowsort
SELECT DISTINCT - 15 FROM tab1 GROUP BY tab1.col2
----
-15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + - cor0.col2 * cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1997
-42
-4959

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col0 * - 3 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-202
-27
-60

query I rowsort
SELECT DISTINCT 2 FROM tab1 GROUP BY tab1.col0
----
2

query I rowsort
SELECT + col1 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0

query I rowsort
SELECT - 47 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-47
-47
-47

query I rowsort
SELECT ALL - cor0.col2 FROM tab0 cor0 GROUP BY col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-7659
SELECT DISTINCT cor0.col2 DIV cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-7659
SELECT DISTINCT cor0.col2 / cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3306
-6162
-7482

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 ALL cor0.col0 * col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
3483

query I rowsort
SELECT + cor0.col1 + + col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
138
148
99

query I rowsort
SELECT cor0.col0 + + 28 FROM tab0 AS cor0 GROUP BY cor0.col0
----
111
54
71

query I rowsort
SELECT - - col0 * 66 FROM tab1 GROUP BY tab1.col0
----
1452
1848
5412

query I rowsort
SELECT + cor0.col1 + col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6642

query I rowsort
SELECT DISTINCT - cor0.col1 + - 57 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-116
-118
-98

query I rowsort
SELECT ALL - col2 AS col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT - tab1.col2 + + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 * 2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
246
66
84

query I rowsort
SELECT ALL col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT - ( 19 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-19

onlyif mysql # DIV for integer division: 
query I rowsort label-7673
SELECT DISTINCT - cor0.col1 DIV cor0.col1 + - ( + 42 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-43

skipif mysql # not compatible
query I rowsort label-7673
SELECT DISTINCT - cor0.col1 / cor0.col1 + - ( + 42 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-43

query I rowsort
SELECT 25 FROM tab0 GROUP BY tab0.col2
----
25
25
25

query I rowsort
SELECT ALL - - tab0.col2 FROM tab0 GROUP BY col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7676
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7676
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT ALL ( - 34 ) FROM tab2 GROUP BY tab2.col2
----
-34
-34
-34

query I rowsort
SELECT ALL + ( + 30 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
30
30
30

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7679
SELECT - CAST( 74 AS SIGNED ) * 95 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-7030
-7030
-7030

skipif mysql # not compatible
query I rowsort label-7679
SELECT - CAST ( 74 AS INTEGER ) * 95 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-7030
-7030
-7030

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7680
SELECT ALL CAST( NULL AS SIGNED ) + - cor0.col2 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7680
SELECT ALL CAST ( NULL AS INTEGER ) + - cor0.col2 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT CASE - cor0.col1 WHEN - cor0.col1 + ( + cor0.col1 ) THEN NULL WHEN + cor0.col0 THEN cor0.col0 END + - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - 35 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-35

query I rowsort
SELECT DISTINCT - 8 + cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1673
3473
3713

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 ALL + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT cor0.col1 + 74 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
155
74
74

query I rowsort
SELECT ALL + cor0.col0 + + cor0.col0 * 12 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1183
1196
195

query I rowsort
SELECT ALL + 6 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
6
6
6

onlyif mysql # DIV for integer division: 
query I rowsort label-7690
SELECT DISTINCT - cor0.col0 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING ( col0 ) IS NOT NULL
----
-1

skipif mysql # not compatible
query I rowsort label-7690
SELECT DISTINCT - cor0.col0 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING ( col0 ) IS NOT NULL
----
-1

query I rowsort
SELECT - cor0.col1 * cor0.col2 FROM tab1 cor0 GROUP BY col0, col2, cor0.col1
----
-2565
-3124
-48

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.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT cor0.col1 + - 18 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
23
41
43

query I rowsort
SELECT + 75 AS col2 FROM tab1 GROUP BY tab1.col1
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT 62 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
62
62
62

query I rowsort
SELECT DISTINCT - 24 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1968
528
672

query I rowsort
SELECT ALL 48 FROM tab0 AS cor0 GROUP BY col1
----
48
48

query I rowsort
SELECT - 47 FROM tab0 AS cor0 GROUP BY col2
----
-47
-47
-47

query I rowsort
SELECT + 69 + 33 FROM tab0 GROUP BY tab0.col1
----
102
102

query I rowsort
SELECT DISTINCT - 64 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + 42 * 39 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1679
1697
1699

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7705
SELECT CAST( 20 AS SIGNED ) - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-38
-59
-67

skipif mysql # not compatible
query I rowsort label-7705
SELECT CAST ( 20 AS INTEGER ) - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-38
-59
-67

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7706
SELECT ALL - col0 * CAST( NULL AS DECIMAL ) col1 FROM tab1 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-7706
SELECT ALL - col0 * CAST ( NULL AS REAL ) col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-7707
SELECT ALL 40 DIV - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-7707
SELECT ALL 40 / - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-1
-1
0

query I rowsort
SELECT DISTINCT 28 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
28

query I rowsort
SELECT - - 71 AS col2 FROM tab0 GROUP BY tab0.col2
----
71
71
71

query I rowsort
SELECT - tab2.col0 + - 14 FROM tab2 GROUP BY col0
----
-105
-106
-29

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
44
57
6

query I rowsort
SELECT + 62 + - 46 FROM tab2 GROUP BY col2
----
16
16
16

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 cor0.col2 AS col1 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
45
71
8

query I rowsort
SELECT ALL + 82 FROM tab1 AS cor0 GROUP BY cor0.col2
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL 26 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT 52 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
52
52
52

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7719
SELECT + cor0.col2 - CAST( + cor0.col0 AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
-12
-34
72

skipif mysql # not compatible
query I rowsort label-7719
SELECT + cor0.col2 - CAST ( + cor0.col0 AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
-12
-34
72

query I rowsort
SELECT DISTINCT - col2 + 48 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
-10
-31
-39

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col2 + - 51 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
3313
6190
7518

query I rowsort
SELECT 30 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
30
30
30

query I rowsort
SELECT + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - 81 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-81
-81
-81

query I rowsort
SELECT DISTINCT + tab0.col1 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT ALL col2 - - 50 FROM tab2 cor0 GROUP BY cor0.col2
----
108
129
137

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT 44 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT - 1 + + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
43
5
56

query I rowsort
SELECT ALL 60 * + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1320
1680
4920

query I rowsort
SELECT - - 79 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT DISTINCT 91 FROM tab2 GROUP BY tab2.col0
----
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 col0 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
114
12
88

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-7736
SELECT + 38 + + cor0.col1 DIV - 16 col2 FROM tab1 cor0 GROUP BY cor0.col1
----
35
36
38

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7736
SELECT + 38 + + cor0.col1 / - 16 col2 FROM tab1 cor0 GROUP BY cor0.col1
----
35
36
38

query I rowsort
SELECT ALL 88 * 77 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
6776
6776
6776

query I rowsort
SELECT ALL + 37 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
37
37
37

onlyif mysql # DIV for integer division: 
query I rowsort label-7739
SELECT ALL - cor0.col0 DIV + cor0.col2 col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-1
-2
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7739
SELECT ALL - cor0.col0 / + cor0.col2 col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-1
-2
0

query I rowsort
SELECT DISTINCT - 33 * + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2706
-726
-924

query I rowsort
SELECT ALL + 45 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
45
45
45

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT cor0.col2 FROM tab2 cor0 GROUP BY cor0.col1, col1, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1892
30
3192

query I rowsort
SELECT ( - col1 ) AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL - 59 AS col1 FROM tab0 GROUP BY col2
----
-59
-59
-59

query I rowsort
SELECT + 84 FROM tab1 GROUP BY tab1.col2
----
84
84
84

query I rowsort
SELECT ALL 50 AS col0 FROM tab1 GROUP BY tab1.col2
----
50
50
50

query I rowsort
SELECT ALL + - 6 FROM tab2 GROUP BY col0
----
-6
-6
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7750
SELECT col0 + + cor0.col0 * + 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-7750
SELECT col0 + + cor0.col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( + 51 ) AS col2 FROM tab0 cor0 GROUP BY col0
----
51
51
51

onlyif mysql # DIV for integer division: 
query I rowsort label-7752
SELECT cor0.col0 DIV cor0.col0 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7752
SELECT cor0.col0 / cor0.col0 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
1
1
1

query I rowsort
SELECT ALL + 65 FROM tab0 GROUP BY tab0.col1
----
65
65

query I rowsort
SELECT NULLIF ( 50, - col1 ) FROM tab2 GROUP BY tab2.col1
----
50
50
50

query I rowsort
SELECT col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 37 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor1.col1
----
37

query I rowsort
SELECT DISTINCT + 52 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
52

onlyif mysql # DIV for integer division: 
query I rowsort label-7758
SELECT - cor0.col1 DIV - 31 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
2

skipif mysql # not compatible
query I rowsort label-7758
SELECT - cor0.col1 / - 31 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
2

query I rowsort
SELECT DISTINCT + 16 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
16

query I rowsort
SELECT - ( + 72 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-72
-72
-72

query I rowsort
SELECT + tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NOT NULL
----
22
28
82

query I rowsort
SELECT DISTINCT col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT 15 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
15

query I rowsort
SELECT - - 96 FROM tab1 GROUP BY col2
----
96
96
96

query I rowsort
SELECT DISTINCT 12 AS col0 FROM tab2 GROUP BY col0
----
12

query I rowsort
SELECT DISTINCT - 63 FROM tab2 GROUP BY tab2.col2
----
-63

query I rowsort
SELECT cor0.col2 * + ( + cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT cor0.col2 - - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

onlyif mysql # DIV for integer division: 
query I rowsort label-7769
SELECT col0 * ( + 86 ) + + cor0.col2 DIV cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1893
2409
7053

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7769
SELECT col0 * ( + 86 ) + + cor0.col2 / cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1893
2409
7053

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.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT + cor0.col0 - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT - col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 30 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-30
-30
-30

query I rowsort
SELECT cor0.col2 + - 38 AS col1 FROM tab0 cor0 GROUP BY col2
----
-14
0
41

query I rowsort
SELECT ALL col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT col2 * + ( - cor0.col2 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-13824
-493039
-54872

query I rowsort
SELECT 80 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
80
80
80

query I rowsort
SELECT ALL NULLIF ( 10, cor0.col0 ) * cor0.col0 + - col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
260
349
830

query I rowsort
SELECT COALESCE ( + 87, - cor0.col1 + + cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
87
87
87

query I rowsort
SELECT DISTINCT - - tab2.col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT - 44 - col1 AS col1 FROM tab2 cor0 GROUP BY col1
----
-103
-105
-85

query I rowsort
SELECT ALL - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL 72 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
72
72
72

query I rowsort
SELECT ALL - 16 FROM tab1 GROUP BY col1
----
-16
-16
-16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 68 col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT DISTINCT + 55 FROM tab0 GROUP BY col2
----
55

query I rowsort
SELECT DISTINCT + col2 * - 46 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1104
-1748
-3634

query I rowsort
SELECT ALL col2 - cor0.col2 * - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1482
600
6320

query I rowsort
SELECT - cor0.col2 * - 87 FROM tab1 AS cor0 GROUP BY col2
----
3915
6177
696

query I rowsort
SELECT ALL cor0.col2 * + col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT + cor0.col1 + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
133
150
76

query I rowsort
SELECT ALL - 96 FROM tab0 AS cor0 GROUP BY col0
----
-96
-96
-96

onlyif mysql # DIV for integer division: 
query I rowsort label-7797
SELECT - 36 DIV cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-6
0
0

skipif mysql # not compatible
query I rowsort label-7797
SELECT - 36 / cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-6
0
0

query I rowsort
SELECT + 89 * cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
2314
3827
7387

query I rowsort
SELECT ALL - 17 * + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-1377
0

query I rowsort
SELECT ALL 78 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3510
-5538
-624

query I rowsort
SELECT - 92 FROM tab1 AS cor0 GROUP BY col1
----
-92
-92
-92

query I rowsort
SELECT - col1 * - col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
6561

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1305
-5336
-7189

query I rowsort
SELECT 56 FROM tab1 cor0 GROUP BY col0
----
56
56
56

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 tab0.col0 + - tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL - + 23 FROM tab1 GROUP BY tab1.col0
----
-23
-23
-23

query I rowsort
SELECT ALL - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT + 24 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
24
24

query I rowsort
SELECT - cor0.col0 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-225
-8281
-8464

query I rowsort
SELECT ALL 74 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
74
74
74

query I rowsort
SELECT ALL + 65 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
65
65
65

query I rowsort
SELECT - 3 FROM tab1 GROUP BY tab1.col1
----
-3
-3
-3

query I rowsort
SELECT - 65 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-37
-43
17

query I rowsort
SELECT DISTINCT 39 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
39

query I rowsort
SELECT + 94 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
94
94
94

query I rowsort
SELECT + 44 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT 57 FROM tab1 GROUP BY col1
----
57
57
57

query I rowsort
SELECT 38 FROM tab0 GROUP BY col1
----
38
38

query I rowsort
SELECT ALL + 38 * - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-2204
-3002
-3306

query I rowsort
SELECT + 56 AS col2 FROM tab0 GROUP BY tab0.col1
----
56
56

query I rowsort
SELECT - 26 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
-26
-26
-26

query I rowsort
SELECT 72 FROM tab0 AS cor0 GROUP BY cor0.col1
----
72
72

query I rowsort
SELECT 68 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
68
68
68

query I rowsort
SELECT 53 FROM tab0 AS cor0 GROUP BY col0
----
53
53
53

query I rowsort
SELECT DISTINCT - 60 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-60

query I rowsort
SELECT - 3 + col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-3
78

query I rowsort
SELECT 34 FROM tab1 GROUP BY tab1.col1
----
34
34
34

query I rowsort
SELECT - col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-158
-48
-76

onlyif mysql # DIV for integer division: 
query I rowsort label-7831
SELECT 12 DIV - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7831
SELECT 12 / - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 64 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
64

query I rowsort
SELECT ALL 17 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
17
17
17

query I rowsort
SELECT 38 * - 64 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-2432
-2432
-2432

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7835
SELECT DISTINCT + CAST( 8 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
8

skipif mysql # not compatible
query I rowsort label-7835
SELECT DISTINCT + CAST ( 8 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
8

query I rowsort
SELECT DISTINCT - 58 FROM tab0 GROUP BY tab0.col0
----
-58

query I rowsort
SELECT + + 0 * - col2 AS col0 FROM tab0 GROUP BY col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7838
SELECT DISTINCT + 29 + cor0.col2 DIV + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
30

skipif mysql # not compatible
query I rowsort label-7838
SELECT DISTINCT + 29 + cor0.col2 / + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 94 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-94
-94

query I rowsort
SELECT ALL 15 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
15
15

query I rowsort
SELECT 36 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
36
36
36

query I rowsort
SELECT + - ( + 96 ) FROM tab0 GROUP BY tab0.col1
----
-96
-96

query I rowsort
SELECT ALL - 59 FROM tab1 GROUP BY tab1.col2
----
-59
-59
-59

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col2 * cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
1406
552
6162

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col0, col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7846
SELECT CAST( col1 AS SIGNED ) - + col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7846
SELECT CAST ( col1 AS INTEGER ) - + col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT 25 + 12 FROM tab0 GROUP BY tab0.col1
----
37
37

query I rowsort
SELECT DISTINCT - 60 FROM tab2 AS cor0 GROUP BY col0
----
-60

query I rowsort
SELECT tab0.col2 * 96 FROM tab0 GROUP BY tab0.col2
----
2304
3648
7584

query I rowsort
SELECT + 68 * cor1.col1 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
5508

query I rowsort
SELECT 93 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4092
5301
558

query I rowsort
SELECT cor0.col1 * + 61 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
2684
3477
366

onlyif mysql # DIV for integer division: 
query I rowsort label-7853
SELECT DISTINCT cor0.col2 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-7853
SELECT DISTINCT cor0.col2 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT DISTINCT + COALESCE ( - cor0.col2, + cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - 99 * col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, col2
----
-2376
-3762
-7821

query I rowsort
SELECT col1 + + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT ALL - tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL >= ( NULL )
----

query I rowsort
SELECT DISTINCT - + tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT + 58 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
58

query I rowsort
SELECT - 50 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-50
-50

query I rowsort
SELECT ALL + cor0.col2 - + cor0.col2 AS col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 95 + + 43 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
138
138
138

query I rowsort
SELECT ALL + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + tab2.col0 - ( 66 ) AS col0 FROM tab2 GROUP BY col0
----
-51
25
26

query I rowsort
SELECT + cor0.col1 * 58 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
4698

onlyif mysql # DIV for integer division: 
query I rowsort label-7867
SELECT cor0.col2 * + ( 64 DIV cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
38
48

skipif mysql # not compatible
query I rowsort label-7867
SELECT cor0.col2 * + ( 64 / cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
38
48

query I rowsort
SELECT ALL - col0 * + 49 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-4459
-4508
-735

query I rowsort
SELECT + ( cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col0 * 28 + 71 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2178
2772
8118

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT - col1 AS col1 FROM tab0 cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT - 64 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-64
-64
-64

query I rowsort
SELECT 43 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT ALL + + 89 FROM tab0 GROUP BY tab0.col2
----
89
89
89

query I rowsort
SELECT DISTINCT + - 83 FROM tab2 GROUP BY tab2.col2
----
-83

query I rowsort
SELECT - - col1 FROM tab1 GROUP BY col1
----
44
57
6

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 col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col1 * 71 + + 84 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3208
4131
510

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, col0
----
-22
-28
-82

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, col1
----
45
71
8

query I rowsort
SELECT DISTINCT - 74 FROM tab2 GROUP BY tab2.col1
----
-74

query I rowsort
SELECT DISTINCT + - 1 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
44
7
70

query I rowsort
SELECT 67 FROM tab2 AS cor0 GROUP BY col1
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 58 + 14 col0 FROM tab1 AS cor0 GROUP BY col0, col1, col2
----
72
72
72

query I rowsort
SELECT 40 FROM tab2 AS cor0 GROUP BY col0
----
40
40
40

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
45
71
8

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 - col2 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT + cor0.col2 + + 85 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
109
123
164

query I rowsort
SELECT ALL - 29 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
-29
-29
-29

query I rowsort
SELECT ALL + 29 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
29
29
29

query I rowsort
SELECT ALL 18 - 81 FROM tab1 AS cor0 GROUP BY col0
----
-63
-63
-63

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7897
SELECT CAST( 78 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
78
78
78

skipif mysql # not compatible
query I rowsort label-7897
SELECT CAST ( 78 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT DISTINCT 9 FROM tab2 GROUP BY col1
----
9

query I rowsort
SELECT ALL 14 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
14
14
14

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
26
43
83

query I rowsort
SELECT + 5 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
110
140
410

query I rowsort
SELECT ALL - 79 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-79
-79
-79

query I rowsort
SELECT ALL 90 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
90
90
90

query I rowsort
SELECT DISTINCT 87 FROM tab1 AS cor0 GROUP BY cor0.col1
----
87

query I rowsort
SELECT 19 FROM tab0 cor0 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT 84 FROM tab1 GROUP BY tab1.col2
----
84
84
84

query I rowsort
SELECT 46 FROM tab1 AS cor0 GROUP BY cor0.col1
----
46
46
46

onlyif mysql # DIV for integer division: 
query I rowsort label-7908
SELECT ALL 4 DIV + cor0.col0 FROM tab1 cor0 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7908
SELECT ALL 4 / + cor0.col0 FROM tab1 cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 * 48 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
4368
4416
720

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7910
SELECT DISTINCT + cor0.col2 * - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-7910
SELECT DISTINCT + cor0.col2 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT - cor0.col0 + + 57 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
14
31

query I rowsort
SELECT DISTINCT + tab0.col2 * - 10 FROM tab0 GROUP BY tab0.col2
----
-240
-380
-790

query I rowsort
SELECT - cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
153
30
73

query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6642

query I rowsort
SELECT ALL 92 FROM tab2 cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT DISTINCT 81 FROM tab0 AS cor0 GROUP BY cor0.col2
----
81

query I rowsort
SELECT DISTINCT cor0.col2 * - 50 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1200
-1900
-3950

query I rowsort
SELECT + cor0.col1 * ( 94 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
3854
5546
5734

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0, cor0.col1
----
0
1944

query I rowsort
SELECT - cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor1.col1
----
-44
-57
-6

query I rowsort
SELECT 96 FROM tab2 AS cor0 GROUP BY cor0.col2
----
96
96
96

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 + - cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
1406
552
6162

query I rowsort
SELECT DISTINCT + + 86 + - 94 FROM tab2 GROUP BY tab2.col2
----
-8

query I rowsort
SELECT ALL 18 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
18
18
18

query I rowsort
SELECT DISTINCT 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.col2 col0 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT 92 FROM tab0 AS cor0 GROUP BY cor0.col1
----
92
92

query I rowsort
SELECT DISTINCT - 92 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-92

query I rowsort
SELECT ALL - ( + 51 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-51
-51
-51

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT ( NULL ) <= NULL AND NULL > NULL
----

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT + cor0.col0 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL + col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - 14 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1134
0

query I rowsort
SELECT ALL 5 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5
5
5

query I rowsort
SELECT + col2 * 47 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2115
3337
376

query I rowsort
SELECT + 81 FROM tab1 GROUP BY col1
----
81
81
81

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + 16 FROM tab1 AS cor0 GROUP BY cor0.col0
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 70 * cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1820
3010
5810

query I rowsort
SELECT ALL 15 - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-30
-56
7

query I rowsort
SELECT ALL - 38 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-38
-38
-38

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( + 24, col0 * cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
24
24
24

query I rowsort
SELECT DISTINCT + - 77 FROM tab2 GROUP BY col0
----
-77

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 ALL col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col2 * + col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1444
576
6241

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
3364
6241
7569

query I rowsort
SELECT + 73 + + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
154
73

query I rowsort
SELECT ALL + + 53 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT ALL + cor0.col0 + - 42 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3731
-3772
-615

query I rowsort
SELECT 85 FROM tab2 GROUP BY tab2.col2
----
85
85
85

query I rowsort
SELECT + ( 82 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
82
82
82

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-17
-20
-26

query I rowsort
SELECT - 68 + + 90 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
22
22
22

query I rowsort
SELECT ALL - 28 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-1148
-1652
-1708

query I rowsort
SELECT DISTINCT 86 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
86

query I rowsort
SELECT ALL 97 * - 58 + + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5545
-5626

query I rowsort
SELECT col0 * - 42 - + 72 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3894
-3936
-702

query I rowsort
SELECT DISTINCT + cor0.col2 * 84 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3780
5964
672

query I rowsort
SELECT DISTINCT - 94 FROM tab1 AS cor0 GROUP BY col0
----
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT - 87 * - cor0.col2 + - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2007
3306
6873

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col2 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 33 FROM tab2 AS cor0 GROUP BY col1
----
33
33
33

query I rowsort
SELECT - 86 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-86
-86
-86

query I rowsort
SELECT DISTINCT 78 * 78 FROM tab0 AS cor0 GROUP BY cor0.col2
----
6084

query I rowsort
SELECT - cor0.col2 + + cor0.col2 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7972
SELECT - col0 DIV + tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING ( NULL ) IS NULL
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7972
SELECT - col0 / + tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING ( NULL ) IS NULL
----
-1
-1
-1

query I rowsort
SELECT ALL 37 FROM tab0 cor0 GROUP BY col1
----
37
37

query I rowsort
SELECT - col2 + cor0.col2 * 77 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4408
6004
6612

query I rowsort
SELECT + 48 FROM tab1 AS cor0 GROUP BY cor0.col1
----
48
48
48

query I rowsort
SELECT 84 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
84
84
84

onlyif mysql # DIV for integer division: 
query I rowsort label-7977
SELECT + ( ( col2 ) ) DIV + cor0.col2 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
82

skipif mysql # not compatible
query I rowsort label-7977
SELECT + ( ( col2 ) ) / + cor0.col2 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
82

query I rowsort
SELECT ALL - cor0.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-7979
SELECT ALL - cor0.col2 DIV + 95 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7979
SELECT ALL - cor0.col2 / + 95 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL + 82 FROM tab1 cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT ALL + tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + 60 FROM tab1 GROUP BY col1
----
60
60
60

query I rowsort
SELECT + + 5 AS col2 FROM tab1 GROUP BY tab1.col0
----
5
5
5

query I rowsort
SELECT ALL - - 44 AS col2 FROM tab2 GROUP BY tab2.col2
----
44
44
44

query I rowsort
SELECT ALL + 27 AS col1 FROM tab1 GROUP BY tab1.col2
----
27
27
27

query I rowsort
SELECT tab1.col2 * 39 + + 61 FROM tab1 GROUP BY col2
----
1816
2830
373

query I rowsort
SELECT + + 20 AS col0 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT + 67 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1608
2546
5293

query I rowsort
SELECT DISTINCT 3 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
3

query I rowsort
SELECT DISTINCT - 36 FROM tab1 GROUP BY tab1.col0
----
-36

query I rowsort
SELECT DISTINCT 50 AS col1 FROM tab0 GROUP BY col0
----
50

query I rowsort
SELECT DISTINCT + 70 AS col2 FROM tab2 GROUP BY col0
----
70

query I rowsort
SELECT DISTINCT - 60 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-60

query I rowsort
SELECT ALL - 33 * cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-2673
0

query I rowsort
SELECT ALL - 93 - col0 FROM tab2 GROUP BY tab2.col0
----
-108
-184
-185

query I rowsort
SELECT 0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
0
0
0

query I rowsort
SELECT DISTINCT 29 + cor0.col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
120
121
44

query I rowsort
SELECT col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 41 FROM tab1 GROUP BY tab1.col1
----
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - 29 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-29

query I rowsort
SELECT 57 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
136
81
95

query I rowsort
SELECT cor0.col0 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1260
176
5822

query I rowsort
SELECT ALL 16 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
16
16
16

query I rowsort
SELECT DISTINCT - 75 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-75

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ALL + col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * + 5 col1 FROM tab0 AS cor0 GROUP BY col2
----
120
190
395

query I rowsort
SELECT col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT + col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL IS NOT NULL
----
15
91
92

query I rowsort
SELECT col0 * col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT + col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT 13 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
13
13
13

query I rowsort
SELECT - - 99 FROM tab2 GROUP BY tab2.col0
----
99
99
99

query I rowsort
SELECT cor0.col2 * + col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2025
5041
64

query I rowsort
SELECT ALL 40 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT ALL 10 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
10
10
10

query I rowsort
SELECT ALL + 68 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
68
68
68

query I rowsort
SELECT ALL + 26 + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
108
48
54

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT 26 FROM tab0 GROUP BY col1
----
26
26

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( - 67, + cor0.col1 * col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-67
-67
-67

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8025
SELECT ALL + CAST( NULL AS SIGNED ) + 30 col0 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-8025
SELECT ALL + CAST ( NULL AS INTEGER ) + 30 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 99 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-99

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8028
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8028
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT 8 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
8
8
8

query I rowsort
SELECT col2 + - cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1406
-552
-6162

query I rowsort
SELECT DISTINCT col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT cor0.col1 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 63 col2 FROM tab1 AS cor0 GROUP BY col0
----
63

query I rowsort
SELECT ALL - 41 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-41
-41
-41

query I rowsort
SELECT ALL 61 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
61
61
61

query I rowsort
SELECT - 56 FROM tab2 GROUP BY tab2.col0
----
-56
-56
-56

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-8038
SELECT - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8038
SELECT - CAST ( NULL AS REAL ) FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 51 AS col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col1
----
51
51
51

query I rowsort
SELECT DISTINCT - 63 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-63

query I rowsort
SELECT ALL 10 - - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
101
102
25

onlyif mysql # DIV for integer division: 
query I rowsort label-8042
SELECT ALL + 60 DIV 8 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
7
7
7

skipif mysql # not compatible
query I rowsort label-8042
SELECT ALL + 60 / 8 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
7
7
7

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8043
SELECT ALL + CAST( 71 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
71
71
71

skipif mysql # not compatible
query I rowsort label-8043
SELECT ALL + CAST ( 71 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
71
71
71

query I rowsort
SELECT DISTINCT - 21 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-21

query I rowsort
SELECT DISTINCT - 17 + + cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-17
-6578

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 - 97 FROM tab2 GROUP BY col2
----
-97
-97
-97

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8048
SELECT ALL cor0.col1 * - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8048
SELECT ALL cor0.col1 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT + 33 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
33

query I rowsort
SELECT - 36 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1368
-2844
-864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - CASE cor0.col1 WHEN + cor0.col1 + - 20 * 44 THEN NULL WHEN 62 * + cor0.col2 THEN cor0.col1 + cor0.col1 * + cor0.col2 END / - 81 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col2 + cor0.col2 FROM tab0 cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT cor0.col2 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT - tab0.col2 * + tab0.col2 - + 40 AS col0 FROM tab0 GROUP BY col2
----
-1484
-616
-6281

query I rowsort
SELECT NULLIF ( - cor0.col2, - cor0.col0 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + - 14 FROM tab2 GROUP BY tab2.col1
----
-14

query I rowsort
SELECT DISTINCT + 17 AS col0 FROM tab2 GROUP BY col0
----
17

query I rowsort
SELECT ALL - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - 87 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-87
-87
-87

query I rowsort
SELECT DISTINCT - 59 FROM tab2 cor0 GROUP BY cor0.col2
----
-59

query I rowsort
SELECT ALL - 75 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-75
-75

query I rowsort
SELECT + 92 FROM tab2 GROUP BY tab2.col0
----
92
92
92

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 - cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT 20 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1160
-1580
-1740

query I rowsort
SELECT + 98 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT ( - 56 ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-56
-56
-56

query I rowsort
SELECT ALL 80 + 13 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, col2
----
93
93
93

query I rowsort
SELECT 83 AS col1 FROM tab1 GROUP BY tab1.col0
----
83
83
83

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + ( + 10 ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
10

query I rowsort
SELECT 56 FROM tab2 GROUP BY col2
----
56
56
56

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + tab2.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 DISTINCT - ( 41 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-41

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-45
-71
-8

query I rowsort
SELECT ALL - NULLIF ( - tab2.col1, 39 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 96 + 12 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
108
108
108

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
1936
3249
36

query I rowsort
SELECT DISTINCT - cor0.col2 * - col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
3364
6241
7569

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 cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
26
43
83

query I rowsort
SELECT - 72 FROM tab0 GROUP BY col1
----
-72
-72

query I rowsort
SELECT + col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT col0 * 66 - 98 FROM tab1 GROUP BY col0
----
1354
1750
5314

query I rowsort
SELECT - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + 62 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
62

query I rowsort
SELECT + cor0.col0 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
105
121
67

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 18 * - 85 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1530
-1530
-1530

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 17 - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
-25
-62
-88

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
22
28
82

query I rowsort
SELECT - 42 AS col2 FROM tab0 cor0 GROUP BY col1
----
-42
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT 34 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
34
34
34

query I rowsort
SELECT DISTINCT 68 FROM tab0 cor0 GROUP BY cor0.col2
----
68

query I rowsort
SELECT - 14 AS col1 FROM tab1 GROUP BY tab1.col0
----
-14
-14
-14

query I rowsort
SELECT + 85 AS col0 FROM tab0 GROUP BY tab0.col1
----
85
85

query I rowsort
SELECT + 98 FROM tab0 AS cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ( + 89 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab0 GROUP BY col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 24 col0 FROM tab1 GROUP BY col2
----
24
24
24

onlyif mysql # DIV for integer division: 
query I rowsort label-8107
SELECT ALL cor0.col2 DIV 27 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-8107
SELECT ALL cor0.col2 / 27 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
1
2

query I rowsort
SELECT 17 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
17
17
17

query I rowsort
SELECT DISTINCT - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT - + 77 FROM tab0 GROUP BY col2
----
-77
-77
-77

query I rowsort
SELECT - 36 * - 26 + cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
1017
936

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT - cor0.col0 FROM tab0 cor0 GROUP BY col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT ALL + 37 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
37
37
37

onlyif mysql # DIV for integer division: 
query I rowsort label-8115
SELECT DISTINCT + cor0.col0 DIV + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-8115
SELECT DISTINCT + cor0.col0 / + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
1
2

query I rowsort
SELECT ALL + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT + cor0.col0 * cor0.col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

onlyif mysql # DIV for integer division: 
query I rowsort label-8118
SELECT 32 DIV - cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8118
SELECT 32 / - cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-1
0
0

query I rowsort
SELECT 92 + - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
13
54
68

query I rowsort
SELECT DISTINCT + 67 + cor0.col2 * 6 FROM tab2 AS cor0 GROUP BY cor0.col2
----
415
541
589

query I rowsort
SELECT DISTINCT - 63 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-63

query I rowsort
SELECT DISTINCT - 72 + 51 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-21

query I rowsort
SELECT + 0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 57 FROM tab0 GROUP BY tab0.col2
----
57

query I rowsort
SELECT ALL 97 AS col2 FROM tab1 GROUP BY tab1.col1
----
97
97
97

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8126
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8126
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
118
122
82

query I rowsort
SELECT 28 FROM tab0 AS cor0 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT - 18 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-18
-18
-18

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8130
SELECT + CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8130
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-22
-28
-82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8132
SELECT - CAST( - 4 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
4
4

skipif mysql # not compatible
query I rowsort label-8132
SELECT - CAST ( - 4 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
4
4

query I rowsort
SELECT DISTINCT - 72 FROM tab1 AS cor0 GROUP BY col2
----
-72

onlyif mysql # DIV for integer division: 
query I rowsort label-8134
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-8134
SELECT cor0.col2 / cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-8135
SELECT col0 + + 52 * + COALESCE ( 15, cor0.col2 + cor0.col2 DIV 65, cor0.col1 + - 53 ) col1 FROM tab0 AS cor0 GROUP BY col0
----
806
823
863

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8135
SELECT col0 + + 52 * + COALESCE ( 15, cor0.col2 + cor0.col2 / 65, cor0.col1 + - 53 ) col1 FROM tab0 AS cor0 GROUP BY col0
----
806
823
863

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8136
SELECT cor0.col0 * + CAST( NULL AS SIGNED ) + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8136
SELECT cor0.col0 * + CAST ( NULL AS INTEGER ) + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + - tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL tab2.col2 AS col1 FROM tab2 GROUP BY col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT 30 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
30

query I rowsort
SELECT 45 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
45
45
45

query I rowsort
SELECT col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + 72 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
72
72
72

query I rowsort
SELECT + 50 AS col2 FROM tab1 GROUP BY tab1.col0
----
50
50
50

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-81
0
0

query I rowsort
SELECT 91 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
91
91
91

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col2 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL - 81 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-81
-81
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 3 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-3
-3
-3

query I rowsort
SELECT + cor0.col2 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
102
115
14

query I rowsort
SELECT D