sqllogictest
Artifact Content
Not logged in

Artifact 17d2a8dc171bca79ce3bc96d341a457565365b88:


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 + 45 FROM tab1 GROUP BY tab1.col2
----
45
45
45

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

query I rowsort
SELECT 49 - - col2 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
1993
49
49

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + 21 * 76 col0 FROM tab0 GROUP BY tab0.col2
----
1517
1558
1572

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

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

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

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

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

query I rowsort
SELECT tab2.col2 * - tab2.col2 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

onlyif mysql # DIV for integer division: 
query I rowsort label-11
SELECT + ( COALESCE ( + 29, + tab1.col2 ) ) DIV - tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
-4
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-11
SELECT + ( COALESCE ( + 29, + tab1.col2 ) ) / - tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
-4
0
0

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

query I rowsort
SELECT - col2 + - 93 * tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-2256
-3572
-7426

query I rowsort
SELECT ALL - cor0.col2 + 48 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-23
3
40

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 8 * tab2.col0 + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-105
-637
-644

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

query I rowsort
SELECT - cor0.col0 * + 61 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1342
-1708
-5002

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - CASE + tab0.col0 WHEN - tab0.col0 THEN - tab0.col0 ELSE - tab0.col0 END FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + + 86 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-2064
-3268
-6794

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

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

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

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

query I rowsort
SELECT + cor0.col1 * 69 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
3036
3933
414

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

query I rowsort
SELECT DISTINCT 12 FROM tab2 GROUP BY col1
----
12

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

query I rowsort
SELECT ALL - col0 AS col2 FROM tab2 WHERE NULL NOT IN ( tab2.col2 ) GROUP BY tab2.col0
----

query I rowsort
SELECT cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL <> ( NULL )
----

query I rowsort
SELECT DISTINCT + + 42 FROM tab1 GROUP BY tab1.col2
----
42

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-49
SELECT + 82 DIV 87 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-49
SELECT + 82 / 87 FROM tab0 GROUP BY tab0.col2
----
0
0
0

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

query I rowsort
SELECT 36 - + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-2
-43
12

query I rowsort
SELECT 30 FROM tab2 GROUP BY col2
----
30
30
30

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

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

query I rowsort
SELECT DISTINCT + cor0.col2 * - 87 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
-5046
-6873
-7569

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

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

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

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

query I rowsort
SELECT ALL tab0.col2 + 11 AS col0 FROM tab0 GROUP BY tab0.col2
----
35
49
90

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-65
SELECT ALL + col2 DIV cor0.col2 + 44 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
45
45

skipif mysql # not compatible
query I rowsort label-65
SELECT ALL + col2 / cor0.col2 + 44 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
45
45

query I rowsort
SELECT DISTINCT - 99 + - 62 FROM tab2 GROUP BY tab2.col0
----
-161

query I rowsort
SELECT + 8 FROM tab1 GROUP BY col1
----
8
8
8

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

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

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

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

query I rowsort
SELECT 44 + - col1 FROM tab0 AS cor0 GROUP BY col1
----
-37
44

query I rowsort
SELECT + cor0.col0 * 57 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1482
2451
4731

query I rowsort
SELECT ALL + ( + 9 ) + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
33
47
88

query I rowsort
SELECT ALL - - 76 + 64 AS col2 FROM tab2 GROUP BY tab2.col1
----
140
140
140

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

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

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

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

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

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

query I rowsort
SELECT ( 89 ) AS col0 FROM tab1 GROUP BY col2
----
89
89
89

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

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

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

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

query I rowsort
SELECT tab1.col0 + tab1.col0 * - 48 FROM tab1 GROUP BY tab1.col0
----
-1034
-1316
-3854

query I rowsort
SELECT + - 67 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-39
-45
15

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

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

query I rowsort
SELECT ALL cor0.col2 + - 74 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-16
13
5

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

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

query I rowsort
SELECT DISTINCT - - 56 FROM tab1 GROUP BY tab1.col2
----
56

query I rowsort
SELECT DISTINCT - 62 FROM tab0, tab0 cor0 GROUP BY cor0.col2
----
-62

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

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

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

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

query I rowsort
SELECT ALL + - 95 FROM tab2 GROUP BY tab2.col0
----
-95
-95
-95

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

query I rowsort
SELECT 27 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1161
2241
702

query I rowsort
SELECT ( 8 ) - - 83 FROM tab0 GROUP BY tab0.col0
----
91
91
91

query I rowsort
SELECT - tab2.col0 + - 38 AS col2 FROM tab2 GROUP BY tab2.col0
----
-129
-130
-53

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

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

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

query I rowsort
SELECT - tab2.col1 - 29 FROM tab2 GROUP BY col1
----
-70
-88
-90

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 - + 10 AS col1 FROM tab2 GROUP BY tab2.col1
----
-10
-10
-10

query I rowsort
SELECT ALL 95 + - 49 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
46
46
46

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 ALL - - col0 col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

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

query I rowsort
SELECT ALL cor0.col2 - - 88 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2136
3382
7031

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

onlyif mysql # DIV for integer division: 
query I rowsort label-115
SELECT col2 DIV 83 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-115
SELECT col2 / 83 col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT tab1.col2 + - 47 * + 70 FROM tab1 GROUP BY tab1.col2
----
-3219
-3245
-3282

onlyif mysql # DIV for integer division: 
query I rowsort label-117
SELECT col0 DIV 57 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-117
SELECT col0 / 57 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
1

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-120
SELECT - 73 DIV + cor0.col0 + + col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
11
91
92

skipif mysql # not compatible
query I rowsort label-120
SELECT - 73 / + cor0.col0 + + col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
11
91
92

query I rowsort
SELECT DISTINCT + 35 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 47 + + col0 col1 FROM tab2 cor0 GROUP BY cor0.col0
----
138
139
62

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

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

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

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

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

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

query I rowsort
SELECT ALL + 76 * + 79 FROM tab0 GROUP BY tab0.col1
----
6004
6004

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

query I rowsort
SELECT DISTINCT + 26 + + 19 FROM tab0 GROUP BY tab0.col0
----
45

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

query I rowsort
SELECT DISTINCT 73 * col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1095
6643
6716

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

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

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

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

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

query I rowsort
SELECT ALL CASE 96 WHEN tab2.col2 + - tab2.col2 * - 31 THEN tab2.col2 END FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col0 + cor0.col2 * ( - cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1320
-5428
-7280

query I rowsort
SELECT - 25 * - 86 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col2
----
2150
2150
2150

query I rowsort
SELECT - 40 + + col1 FROM tab0 cor0 GROUP BY col0, cor0.col1
----
-40
-40
41

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

query I rowsort
SELECT - cor0.col2 - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-102
-115
-14

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL col2 * - 24 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1896
-576
-912

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

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

query I rowsort
SELECT + 10 + - 77 FROM tab2 GROUP BY tab2.col0
----
-67
-67
-67

onlyif mysql # DIV for integer division: 
query I rowsort label-160
SELECT - 56 DIV - 36 AS col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-160
SELECT - 56 / - 36 AS col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

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

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

query I rowsort
SELECT + 9 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
522
711
783

query I rowsort
SELECT DISTINCT 16 * + 89 AS col1 FROM tab0 GROUP BY tab0.col0
----
1424

query I rowsort
SELECT DISTINCT + 33 + + col0 FROM tab2 cor0 GROUP BY cor0.col0
----
124
125
48

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

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

query I rowsort
SELECT cor0.col1 * 48 FROM tab0 AS cor0 GROUP BY col1
----
0
3888

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

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col2, cor0.col0
----
9 values hashing to 559da8f454c4e5599b87319641a4f49a

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

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

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

query I rowsort
SELECT - 64 FROM tab2 GROUP BY tab2.col1
----
-64
-64
-64

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

query I rowsort
SELECT ALL 83 + + 56 FROM tab0 GROUP BY tab0.col0
----
139
139
139

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

query I rowsort
SELECT - 0 - CASE cor0.col0 WHEN cor0.col0 * cor0.col0 THEN + cor0.col0 ELSE - cor0.col0 END FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT ( 17 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
17

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

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

query I rowsort
SELECT DISTINCT 29 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
108
116
87

query I rowsort
SELECT DISTINCT + 92 FROM tab1 GROUP BY tab1.col2
----
92

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

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

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

query I rowsort
SELECT DISTINCT + 78 + + cor0.col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
119
137
139

query I rowsort
SELECT ALL 58 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
58
58
58

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 + 97 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
97
97
97

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

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

query I rowsort
SELECT + - tab2.col1 * + 48 FROM tab2 GROUP BY tab2.col1
----
-1968
-2832
-2928

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

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

query I rowsort
SELECT ALL - 51 + col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-25
-8
32

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

onlyif mysql # DIV for integer division: 
query I rowsort label-198
SELECT DISTINCT + 73 DIV cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2, cor0.col2
----
1
9

skipif mysql # not compatible
query I rowsort label-198
SELECT DISTINCT + 73 / cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2, cor0.col2
----
1
9

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

query I rowsort
SELECT DISTINCT - cor0.col1 * 66 FROM tab2 cor0 GROUP BY cor0.col1
----
-2706
-3894
-4026

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

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

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

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

query I rowsort
SELECT + - 15 FROM tab2 GROUP BY col2
----
-15
-15
-15

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 65 * tab0.col2 col1 FROM tab0 GROUP BY col2
----
-1560
-2470
-5135

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col2 * 28 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1624
2212
2436

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

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

query I rowsort
SELECT DISTINCT - - 98 * - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-1470
-8918
-9016

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 19 col0 FROM tab2 GROUP BY tab2.col0
----
1729
1748
285

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL tab0.col2 * + 18 AS col0 FROM tab0 GROUP BY tab0.col2
----
1422
432
684

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 + 70 FROM tab0 GROUP BY tab0.col2
----
70
70
70

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

query I rowsort
SELECT + 97 * 38 FROM tab1 AS cor0 GROUP BY cor0.col0
----
3686
3686
3686

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

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

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

query I rowsort
SELECT - tab2.col2 * tab2.col2 AS col0 FROM tab2 WHERE NOT NULL NOT IN ( + col0 ) GROUP BY tab2.col2
----

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 85 * + 56 AS col1 FROM tab1 GROUP BY tab1.col1
----
4760
4760
4760

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-257
SELECT cor0.col2 * + cor0.col2 + + 80 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2, cor0.col0
----
2026
5042
74

skipif mysql # not compatible
query I rowsort label-257
SELECT cor0.col2 * + cor0.col2 + + 80 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2, cor0.col0
----
2026
5042
74

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

query I rowsort
SELECT ALL ( 29 ) FROM tab1 GROUP BY tab1.col1
----
29
29
29

query I rowsort
SELECT - 44 FROM tab2 GROUP BY col0
----
-44
-44
-44

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

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

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

query I rowsort
SELECT ALL 91 * 39 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
3549
3549
3549

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

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

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

query I rowsort
SELECT DISTINCT 21 * - cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
-1738
-528
-836

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

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

query I rowsort
SELECT DISTINCT + 25 AS col0 FROM tab0 GROUP BY tab0.col2
----
25

query I rowsort
SELECT - 31 * 51 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1581
-1581
-1581

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-274
SELECT CASE cor0.col0 WHEN cor0.col2 * + cor0.col2 THEN cor0.col2 WHEN - 42 DIV cor0.col2 + cor0.col0 THEN + ( - cor0.col0 ) WHEN - col2 + - cor0.col0 THEN NULL END + NULLIF ( + cor0.col2, + cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col0, col2
----
53
NULL
NULL

skipif mysql # not compatible
query I rowsort label-274
SELECT CASE cor0.col0 WHEN cor0.col2 * + cor0.col2 THEN cor0.col2 WHEN - 42 / cor0.col2 + cor0.col0 THEN + ( - cor0.col0 ) WHEN - col2 + - cor0.col0 THEN NULL END + NULLIF ( + cor0.col2, + cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col0, col2
----
53
NULL
NULL

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

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

skipif mysql # not compatible
query I rowsort label-276
SELECT 13 / cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
1

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

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

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

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

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

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 + 29 AS col0 FROM tab1 GROUP BY tab1.col1
----
29
29
29

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

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

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

query I rowsort
SELECT ALL tab2.col2 + 93 * 45 AS col2 FROM tab2 GROUP BY tab2.col2
----
4243
4264
4272

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

query I rowsort
SELECT DISTINCT col1 + + ( 11 ) FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
52
70
72

query I rowsort
SELECT ALL - tab1.col2 + + 84 AS col0 FROM tab1 GROUP BY tab1.col2
----
13
39
76

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-292
SELECT - 30 + - tab1.col2 DIV + col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-31
-31
-31

skipif mysql # not compatible
query I rowsort label-292
SELECT - 30 + - tab1.col2 / + col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-31
-31
-31

query I rowsort
SELECT + cor0.col1 + + 89 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
133
146
95

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

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

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

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

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

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

query I rowsort
SELECT + NULLIF ( cor0.col0, - cor0.col1 * + 46 ) - - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
124
26
83

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

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

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

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

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

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

query I rowsort
SELECT ALL + tab0.col2 * - 10 AS col1 FROM tab0 GROUP BY tab0.col2
----
-240
-380
-790

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

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

query I rowsort
SELECT DISTINCT 5 - - 56 FROM tab0 AS cor0 GROUP BY cor0.col1
----
61

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

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

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

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

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

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

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

query I rowsort
SELECT ALL ( 32 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
32
32
32

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

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

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

query I rowsort
SELECT ALL 10 * + col0 FROM tab0 GROUP BY tab0.col0
----
260
430
830

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

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

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

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

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

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

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

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

query I rowsort
SELECT ( 97 ) FROM tab2 GROUP BY tab2.col2
----
97
97
97

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

query I rowsort
SELECT - ( tab2.col2 ) - + col2 FROM tab2 GROUP BY col2
----
-116
-158
-174

onlyif mysql # DIV for integer division: 
query I rowsort label-332
SELECT DISTINCT - 93 - cor0.col2 DIV - 74 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
-93

skipif mysql # not compatible
query I rowsort label-332
SELECT DISTINCT - 93 - cor0.col2 / - 74 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
-93

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

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

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

query I rowsort
SELECT DISTINCT + 97 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, col1
----
4365
6887
776

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

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

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

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

query I rowsort
SELECT COALESCE ( cor0.col1, + cor0.col1, - 70 + 16 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

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

onlyif mysql # DIV for integer division: 
query I rowsort label-343
SELECT ALL - 73 DIV cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-343
SELECT ALL - 73 / cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-1
-3
0

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

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

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

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

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 + + 25 FROM tab0 GROUP BY tab0.col1
----
25

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

query I rowsort
SELECT - cor0.col0 * - cor0.col0 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1892
6972
702

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

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col2 + + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3272
-6150
-7554

query I rowsort
SELECT - 77 + - col0 FROM tab1 GROUP BY tab1.col0
----
-105
-159
-99

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

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

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

query I rowsort
SELECT ALL tab2.col1 * + 47 FROM tab2 GROUP BY tab2.col1
----
1927
2773
2867

query I rowsort
SELECT tab0.col0 FROM tab0 GROUP BY col0 HAVING NULL IS NULL
----
26
43
83

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

query I rowsort
SELECT ALL + 64 FROM tab0 GROUP BY tab0.col0
----
64
64
64

query I rowsort
SELECT - + 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 + + tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - cor0.col0 + col0 * - 63 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1664
-2752
-5312

onlyif mysql # DIV for integer division: 
query I rowsort label-364
SELECT - - 91 DIV col2 FROM tab0 GROUP BY tab0.col2
----
1
2
3

skipif mysql # not compatible
query I rowsort label-364
SELECT - - 91 / col2 FROM tab0 GROUP BY tab0.col2
----
1
2
3

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

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

query I rowsort
SELECT DISTINCT - 48 FROM tab1 GROUP BY col2
----
-48

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
166
52
86

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

onlyif mysql # DIV for integer division: 
query I rowsort label-370
SELECT ALL - cor0.col2 + col0 DIV 3 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-36
-44

skipif mysql # not compatible
query I rowsort label-370
SELECT ALL - cor0.col2 + col0 / 3 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-36
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1032
-2054
-3154

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

query I rowsort
SELECT DISTINCT 18 * + 18 AS col2 FROM tab1 GROUP BY tab1.col2
----
324

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

query I rowsort
SELECT DISTINCT col2 + - ( 74 + - tab1.col2 ) * ( tab1.col2 * - tab1.col2 ) FROM tab1 GROUP BY col2
----
15194
4232
58770

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

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

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

query I rowsort
SELECT DISTINCT + + ( 96 ) FROM tab2 GROUP BY tab2.col2
----
96

query I rowsort
SELECT DISTINCT - 85 * 73 AS col2 FROM tab0 GROUP BY tab0.col2
----
-6205

query I rowsort
SELECT DISTINCT 92 AS col2 FROM tab1 GROUP BY col2
----
92

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

query I rowsort
SELECT DISTINCT + 67 AS col2 FROM tab0 GROUP BY tab0.col2
----
67

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

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

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

query I rowsort
SELECT DISTINCT tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NULL
----
0
81

query I rowsort
SELECT ALL tab1.col0 + tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
164
44
56

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
22
28
82

query I rowsort
SELECT ALL 27 AS col0 FROM tab0 GROUP BY col2
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 88 * + 43 col1 FROM tab2, tab0 cor0 GROUP BY tab2.col0
----
3784
3784
3784

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

query I rowsort
SELECT ALL + + tab0.col0 + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
166
52
86

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT tab2.col0 * tab2.col0 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
240
8372
8556

onlyif mysql # DIV for integer division: 
query I rowsort label-401
SELECT ALL + 67 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-401
SELECT ALL + 67 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
2
3

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL ( 90 ) AS col1 FROM tab0 cor0 GROUP BY col0
----
90
90
90

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-414
SELECT ALL + CAST( NULL AS SIGNED ) * + 55 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-414
SELECT ALL + CAST ( NULL AS INTEGER ) * + 55 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
NULL
NULL
NULL

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

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

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

query I rowsort
SELECT - 59 FROM tab1 GROUP BY tab1.col2
----
-59
-59
-59

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

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

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

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

query I rowsort
SELECT DISTINCT 67 - 47 FROM tab2 GROUP BY tab2.col0
----
20

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

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

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

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

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

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

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

query I rowsort
SELECT - tab2.col1 * 25 FROM tab2 GROUP BY tab2.col1
----
-1025
-1475
-1525

query I rowsort
SELECT ALL 32 FROM tab1 GROUP BY tab1.col1
----
32
32
32

query I rowsort
SELECT cor0.col0 * + cor0.col0 + + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
240
8372
8556

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

query I rowsort
SELECT ALL - + ( 46 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-46
-46

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT NULLIF ( - col2, tab0.col2 * - COALESCE ( + 59, col1, col2 ) ) + COALESCE ( 83, tab0.col2 + - ( tab0.col2 ) * + tab0.col2 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
4
45
59

query I rowsort
SELECT 72 + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1
27
64

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

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

query I rowsort
SELECT DISTINCT + ( 66 ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
66

query I rowsort
SELECT ALL + + tab1.col2 * + 22 AS col1 FROM tab1 GROUP BY col2
----
1562
176
990

query I rowsort
SELECT 73 + 22 FROM tab1 GROUP BY tab1.col1
----
95
95
95

query I rowsort
SELECT - + tab2.col0 * 31 FROM tab2 GROUP BY tab2.col0
----
-2821
-2852
-465

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 + cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-1406
-552
-6162

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-446
SELECT + CAST( 38 AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col0
----
38
38
38

skipif mysql # not compatible
query I rowsort label-446
SELECT + CAST ( 38 AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col0
----
38
38
38

query I rowsort
SELECT - tab0.col0 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

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

query I rowsort
SELECT + 80 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
104
118
159

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

query I rowsort
SELECT + 89 FROM tab1 GROUP BY col2
----
89
89
89

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

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL NOT IN ( cor0.col2 )
----

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

query I rowsort
SELECT - tab2.col2 * + 13 - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1044
-696
-948

query I rowsort
SELECT - 6 * - 87 FROM tab1 GROUP BY tab1.col2
----
522
522
522

query I rowsort
SELECT + 61 FROM tab1 GROUP BY tab1.col2
----
61
61
61

query I rowsort
SELECT DISTINCT tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NULL
----

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

query I rowsort
SELECT 10 + + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
32
38
92

query I rowsort
SELECT + 37 * + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
1517
2183
2257

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

query I rowsort
SELECT ALL + tab2.col0 * tab2.col0 + 84 FROM tab2 GROUP BY tab2.col0
----
309
8365
8548

onlyif mysql # DIV for integer division: 
query I rowsort label-464
SELECT + cor0.col0 DIV cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-464
SELECT + cor0.col0 / cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
1

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

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

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

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

query I rowsort
SELECT - 28 FROM tab1 GROUP BY col0
----
-28
-28
-28

query I rowsort
SELECT - 49 AS col2 FROM tab1 GROUP BY col1
----
-49
-49
-49

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

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

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

query I rowsort
SELECT DISTINCT - + tab0.col0 * 72 FROM tab0 GROUP BY tab0.col0
----
-1872
-3096
-5976

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

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

query I rowsort
SELECT ALL - tab1.col0 + - 15 * col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1312
-352
-448

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

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

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

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

query I rowsort
SELECT 50 * + 36 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1800
1800
1800

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

query I rowsort
SELECT 29 * - 66 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-1914
-1914
-1914

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

query I rowsort
SELECT DISTINCT tab2.col0 / tab2.col0 FROM tab2 WHERE NULL IN ( - tab2.col1 ) GROUP BY tab2.col0
----

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

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

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

query I rowsort
SELECT DISTINCT + 10 * tab0.col0 + - tab0.col0 * tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1419
-416
-6059

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 99 + + tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
105
143
156

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

onlyif mysql # DIV for integer division: 
query I rowsort label-494
SELECT 41 DIV + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-494
SELECT 41 / + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
2

query I rowsort
SELECT - 83 FROM tab1 GROUP BY col0
----
-83
-83
-83

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

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

query I rowsort
SELECT DISTINCT tab0.col1 * 52 FROM tab0 GROUP BY tab0.col1
----
0
4212

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

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-499
SELECT CAST ( - 27 AS INTEGER ) col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-27
-27
-27

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

query I rowsort
SELECT DISTINCT - - tab1.col0 * + 35 AS col2 FROM tab1 GROUP BY tab1.col0
----
2870
770
980

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

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

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

query I rowsort
SELECT 11 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
-34
-60
3

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

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

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

query I rowsort
SELECT + - 69 FROM tab1 GROUP BY tab1.col1
----
-69
-69
-69

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

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

query I rowsort
SELECT - + 75 FROM tab1 GROUP BY tab1.col0
----
-75
-75
-75

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

query I rowsort
SELECT 28 * + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1064
2212
672

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

query I rowsort
SELECT - ( - 15 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
15
15
15

query I rowsort
SELECT 41 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
100
102
82

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

query I rowsort
SELECT - col2 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

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

query I rowsort
SELECT cor1.col1 AS col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col1
----
9 values hashing to ad2e5fa6d094292bda21bf46c78171b8

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

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

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

query I rowsort
SELECT DISTINCT 86 FROM tab1 GROUP BY tab1.col2
----
86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-526
SELECT + CAST( col2 AS SIGNED ) * + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

skipif mysql # not compatible
query I rowsort label-526
SELECT + CAST ( col2 AS INTEGER ) * + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT NULLIF ( tab0.col2, tab0.col2 * - tab0.col2 - 84 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

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

query I rowsort
SELECT - + ( + 93 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
-93
-93
-93

query I rowsort
SELECT - - tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT - 1 FROM tab1 GROUP BY tab1.col2
----
-1

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

skipif mysql # not compatible
query I rowsort label-532
SELECT DISTINCT - 84 / cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
0

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

query I rowsort
SELECT 21 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
104
47
64

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

query I rowsort
SELECT ALL + - tab2.col1 * - 16 FROM tab2 GROUP BY col1
----
656
944
976

query I rowsort
SELECT cor0.col0 * - cor0.col0 + + 75 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-409
-6649
-709

query I rowsort
SELECT ALL + 75 AS col1 FROM tab0 GROUP BY tab0.col0
----
75
75
75

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

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

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

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

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

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
26
43
83

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

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

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

query I rowsort
SELECT DISTINCT 99 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2574
4257
8217

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

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

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

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

query I rowsort
SELECT DISTINCT 76 + ( - 33 ) FROM tab0 AS cor0 GROUP BY col1
----
43

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

onlyif mysql # DIV for integer division: 
query I rowsort label-554
SELECT ALL cor0.col0 DIV - cor0.col0 + 76 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1671
2127
6231

skipif mysql # not compatible
query I rowsort label-554
SELECT ALL cor0.col0 / - cor0.col0 + 76 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1671
2127
6231

query I rowsort
SELECT - 89 AS col2 FROM tab2 GROUP BY col1
----
-89
-89
-89

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

query I rowsort
SELECT DISTINCT - 40 FROM tab1 GROUP BY col0
----
-40

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 10, cor0.col1, - cor0.col2 + + 31 ) * 25 + cor0.col2 * + ( 75 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
3625
5575
850

query I rowsort
SELECT DISTINCT 56 FROM tab1 GROUP BY tab1.col2
----
56

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

onlyif mysql # DIV for integer division: 
query I rowsort label-562
SELECT ALL cor0.col2 DIV cor0.col0 + - 39 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-38
-39
-39

skipif mysql # not compatible
query I rowsort label-562
SELECT ALL cor0.col2 / cor0.col0 + - 39 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-38
-39
-39

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

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

query I rowsort
SELECT ALL + + 6 FROM tab0 GROUP BY tab0.col0
----
6
6
6

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

query I rowsort
SELECT + 2 + - col0 FROM tab1 GROUP BY tab1.col0
----
-20
-26
-80

query I rowsort
SELECT - 40 + - 53 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-93
-93
-93

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

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

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

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

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

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

query I rowsort
SELECT + + 59 FROM tab0 GROUP BY col2
----
59
59
59

query I rowsort
SELECT tab1.col1 + - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL IS NULL
----

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

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

query I rowsort
SELECT ALL 92 * - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
-1380
-8372
-8464

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col2 * 24 col2 FROM tab2 GROUP BY tab2.col2
----
-1392
-1896
-2088

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

query I rowsort
SELECT - 67 FROM tab0 GROUP BY col2
----
-67
-67
-67

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

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

query I rowsort
SELECT DISTINCT col0 * 65 FROM tab1 AS cor0 GROUP BY cor0.col0, col2, col0, cor0.col1
----
1430
1820
5330

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

query I rowsort
SELECT DISTINCT + 19 FROM tab1 GROUP BY col1
----
19

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

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

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

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

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

query I rowsort
SELECT + 70 + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
151
70

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

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

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

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

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

query I rowsort
SELECT NULLIF ( + 96, col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
96
96

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

query I rowsort
SELECT ALL cor0.col0 + + 11 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
33
39
93

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 32 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1312
1888
1952

query I rowsort
SELECT ALL + - 7 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
19
36
76

onlyif mysql # DIV for integer division: 
query I rowsort label-616
SELECT DISTINCT - + tab0.col0 DIV tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1

skipif mysql # not compatible
query I rowsort label-616
SELECT DISTINCT - + tab0.col0 / tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT col1 * COALESCE ( 32, - col2 ) AS col2 FROM tab0 GROUP BY col1
----
0
2592

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

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

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

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

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

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

query I rowsort
SELECT 37 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
3367
3404
555

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

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

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

query I rowsort
SELECT ALL + 14 AS col0 FROM tab0 GROUP BY tab0.col1
----
14
14

query I rowsort
SELECT DISTINCT cor0.col0 * 57 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
1254
1596
4674

onlyif mysql # DIV for integer division: 
query I rowsort label-631
SELECT ALL 16 DIV - 4 FROM tab0 GROUP BY tab0.col0
----
-4
-4
-4

skipif mysql # not compatible
query I rowsort label-631
SELECT ALL 16 / - 4 FROM tab0 GROUP BY tab0.col0
----
-4
-4
-4

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-635
SELECT ALL - cor0.col2 + CAST( - 28 AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-107
-115
-86

skipif mysql # not compatible
query I rowsort label-635
SELECT ALL - cor0.col2 + CAST ( - 28 AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-107
-115
-86

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

query I rowsort
SELECT DISTINCT - 93 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-4092
-5301
-558

query I rowsort
SELECT COALESCE ( 64, - 7 + cor0.col0 ) FROM tab2 AS cor0 GROUP BY col0
----
64
64
64

query I rowsort
SELECT + 99 FROM tab1 GROUP BY tab1.col2
----
99
99
99

query I rowsort
SELECT ( 55 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
55
55
55

query I rowsort
SELECT ALL - 71 FROM tab0 GROUP BY col2
----
-71
-71
-71

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

query I rowsort
SELECT DISTINCT - + tab0.col2 + tab0.col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1406
552
6162

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

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

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

query I rowsort
SELECT ALL + ( + 27 ) + - tab2.col2 * + 44 AS col0 FROM tab2 GROUP BY tab2.col2
----
-2525
-3449
-3801

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

query I rowsort
SELECT ALL col2 - 36 AS col1 FROM tab0 GROUP BY tab0.col2
----
-12
2
43

query I rowsort
SELECT cor0.col1 * + 14 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
574
826
854

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

query I rowsort
SELECT - 62 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-18
-5
-56

query I rowsort
SELECT + cor0.col1 * + 13 FROM tab1 AS cor0 GROUP BY cor0.col1
----
572
741
78

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

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

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

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

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

query I rowsort
SELECT 62 + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
120
141
149

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 69 + col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
105
2005
3318

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

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

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

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

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

query I rowsort
SELECT 35 + + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
114
59
73

query I rowsort
SELECT - 15 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1215
0

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

query I rowsort
SELECT - tab0.col0 FROM tab0 WHERE NOT NULL IS NULL GROUP BY tab0.col0
----

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

query I rowsort
SELECT DISTINCT + - tab2.col2 * 88 FROM tab2 GROUP BY tab2.col2
----
-5104
-6952
-7656

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

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

query I rowsort
SELECT ALL + + 56 FROM tab2 GROUP BY tab2.col0
----
56
56
56

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-691
SELECT ALL - ( tab1.col1 ) DIV 32 FROM tab1 GROUP BY tab1.col1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-691
SELECT ALL - ( tab1.col1 ) / 32 FROM tab1 GROUP BY tab1.col1
----
-1
-1
0

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

query I rowsort
SELECT ALL - COALESCE ( cor0.col0, + col0, - ( cor0.col0 ) - cor0.col1 ) + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
-16
-38
29

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

query I rowsort
SELECT ALL + 76 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-3420
-5396
-608

onlyif mysql # DIV for integer division: 
query I rowsort label-696
SELECT DISTINCT 87 + tab0.col0 DIV - col0 FROM tab0 GROUP BY col0
----
86

skipif mysql # not compatible
query I rowsort label-696
SELECT DISTINCT 87 + tab0.col0 / - col0 FROM tab0 GROUP BY col0
----
86

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

onlyif mysql # DIV for integer division: 
query I rowsort label-698
SELECT ALL + CASE + tab1.col0 WHEN tab1.col0 THEN - tab1.col0 DIV tab1.col0 END AS col2 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-698
SELECT ALL + CASE + tab1.col0 WHEN tab1.col0 THEN - tab1.col0 / tab1.col0 END AS col2 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + + ( 84 ) + - 37 FROM tab1 GROUP BY tab1.col0
----
47

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

query I rowsort
SELECT + 16 * + 73 FROM tab0 GROUP BY tab0.col1
----
1168
1168

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

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

query I rowsort
SELECT 60 + + 98 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
158
158
158

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

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

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

query I rowsort
SELECT cor0.col0 * - cor0.col1 + + 30 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-102
-1566
-3578

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

onlyif mysql # DIV for integer division: 
query I rowsort label-710
SELECT DISTINCT + 36 DIV - NULLIF ( cor0.col0, + col0 * 36 + - 75 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0

skipif mysql # not compatible
query I rowsort label-710
SELECT DISTINCT + 36 / - NULLIF ( cor0.col0, + col0 * 36 + - 75 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + COALESCE ( 98, + col2, 62 + cor0.col2 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
98

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

query I rowsort
SELECT ALL - cor1.col1 + cor0.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1, cor0.col0
----
9 values hashing to 18c382f14446dc170840bbc6294a3c52

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

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

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

query I rowsort
SELECT DISTINCT - 84 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-128
-141
-90

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

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

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

query I rowsort
SELECT DISTINCT + 63 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
19
57
6

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

query I rowsort
SELECT ALL + 1 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * - 29 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1305
-2059
-232

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

query I rowsort
SELECT - + 32 FROM tab1 GROUP BY tab1.col2
----
-32
-32
-32

query I rowsort
SELECT ALL - + 97 FROM tab2 GROUP BY col0
----
-97
-97
-97

query I rowsort
SELECT - tab0.col0 * 21 AS col2 FROM tab0 GROUP BY col0
----
-1743
-546
-903

query I rowsort
SELECT 30 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1740
2370
2610

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT 73 * COALESCE ( 82, cor0.col0 - - CASE cor0.col1 WHEN - col2 / + CASE cor0.col2 WHEN + 66 * - cor0.col2 THEN NULL WHEN COALESCE ( + cor0.col1, + cor0.col1 + cor0.col1 * - cor0.col0, - cor0.col2 * col2 ) THEN cor0.col1 END THEN - cor0.col0 + + cor0.col1 ELSE + cor0.col0 END * - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
5986

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

query I rowsort
SELECT ALL + tab2.col1 + - tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING ( NULL ) IS NULL
----
0
0
0

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

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

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

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

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

query I rowsort
SELECT - + 76 FROM tab0 GROUP BY tab0.col2
----
-76
-76
-76

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

onlyif mysql # DIV for integer division: 
query I rowsort label-738
SELECT ALL COALESCE ( 98, - col0 + - cor0.col2 DIV + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
98
98
98

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-738
SELECT ALL COALESCE ( 98, - col0 + - cor0.col2 / + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
98
98
98

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

query I rowsort
SELECT DISTINCT - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL BETWEEN ( NULL ) AND NULL
----

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

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

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 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 88 col0 FROM tab1 GROUP BY tab1.col2
----
88
88
88

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

query I rowsort
SELECT + tab2.col2 - ( 50 + tab2.col2 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
-50
-50
-50

query I rowsort
SELECT 7 * - cor0.col2 - - cor0.col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-348
-474
-522

query I rowsort
SELECT ALL - 29 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-100
-37
-74

query I rowsort
SELECT ALL - cor0.col2 * + 21 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1218
-1659
-1827

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 87 FROM tab2 GROUP BY tab2.col1
----
-87

query I rowsort
SELECT 5 * 28 FROM tab1 AS cor0 GROUP BY cor0.col2
----
140
140
140

query I rowsort
SELECT 21 * - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1239
-1281
-861

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

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

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

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

query I rowsort
SELECT + + ( - 99 ) FROM tab1 GROUP BY tab1.col1
----
-99
-99
-99

query I rowsort
SELECT ALL + + tab1.col1 * col1 + + 77 FROM tab1 GROUP BY tab1.col1
----
113
2013
3326

query I rowsort
SELECT col1 - 68 FROM tab0 GROUP BY tab0.col1
----
-68
13

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab0.col1 + 29 col0 FROM tab0 GROUP BY tab0.col1
----
110
29

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

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

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

query I rowsort
SELECT ALL - 40 + + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-32
31
5

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

query I rowsort
SELECT + - tab0.col2 + - col2 FROM tab0 GROUP BY tab0.col2
----
-158
-48
-76

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

query I rowsort
SELECT + tab1.col0 + + 35 AS col2 FROM tab1 GROUP BY tab1.col0
----
117
57
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 8 * 48 col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
384
384
384

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

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col0 * 80 - + col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-2159
-3464
-6678

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

query I rowsort
SELECT ALL + + 13 - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-11
-25
-66

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

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

query I rowsort
SELECT cor0.col1 + - 0 * 4 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT 63 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2835
4473
504

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

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

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

query I rowsort
SELECT 67 * tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1742
2881
5561

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

query I rowsort
SELECT ALL + tab2.col1 * + 36 AS col1 FROM tab2 GROUP BY tab2.col1
----
1476
2124
2196

query I rowsort
SELECT 22 * 44 FROM tab1 AS cor0 GROUP BY cor0.col0
----
968
968
968

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

query I rowsort
SELECT ALL - ( 65 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-65
-65
-65

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

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

query I rowsort
SELECT DISTINCT + 49 * + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1078
1372
4018

onlyif mysql # DIV for integer division: 
query I rowsort label-804
SELECT DISTINCT - tab1.col0 DIV - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1

skipif mysql # not compatible
query I rowsort label-804
SELECT DISTINCT - tab1.col0 / - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1

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

query I rowsort
SELECT 11 * 91 AS col2 FROM tab2 GROUP BY tab2.col2
----
1001
1001
1001

onlyif mysql # DIV for integer division: 
query I rowsort label-807
SELECT DISTINCT cor0.col0 DIV 64 FROM tab1 AS cor0 GROUP BY col0
----
0
1

skipif mysql # not compatible
query I rowsort label-807
SELECT DISTINCT cor0.col0 / 64 FROM tab1 AS cor0 GROUP BY col0
----
0
1

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT tab0.col1 FROM tab0 WHERE NOT ( NULL ) IN ( + tab0.col1 ) GROUP BY tab0.col1 HAVING NOT NULL IS NULL
----

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

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

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

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

query I rowsort
SELECT cor0.col0 * cor0.col0 + + 13 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1018
8997
9048

query I rowsort
SELECT DISTINCT + cor0.col0 * 97 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2134
2716
7954

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

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

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

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

skipif mysql # not compatible
query I rowsort label-824
SELECT col1 / - 17 + + 4 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
2

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

onlyif mysql # DIV for integer division: 
query I rowsort label-826
SELECT ALL - + 25 DIV tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-826
SELECT ALL - + 25 / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-4
0
0

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

query I rowsort
SELECT - 26 + + tab0.col2 * - col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1470
-602
-6267

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-831
SELECT ALL ( - tab0.col1 ) + + tab0.col1 DIV - 60 AS col2 FROM tab0 GROUP BY tab0.col1
----
-82
0

skipif mysql # not compatible
query I rowsort label-831
SELECT ALL ( - tab0.col1 ) + + tab0.col1 / - 60 AS col2 FROM tab0 GROUP BY tab0.col1
----
-82
0

query I rowsort
SELECT 53 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1272
2014
4187

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

query I rowsort
SELECT ALL 44 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1056
1672
3476

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

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

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

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

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

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

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

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-845
SELECT - tab1.col0 / + col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

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

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

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

query I rowsort
SELECT 17 - + 95 * - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2487
4102
7902

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

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 - - 60 AS col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
1741
3541
3781

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 34 * + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1972
2686
2958

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

query I rowsort
SELECT DISTINCT tab0.col1 * 50 FROM tab0 GROUP BY tab0.col1
----
0
4050

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

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

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

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

query I rowsort
SELECT - 1 + - col0 FROM tab2 GROUP BY tab2.col0
----
-16
-92
-93

query I rowsort
SELECT DISTINCT + 83 + 22 FROM tab2 GROUP BY tab2.col0
----
105

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-869
SELECT ALL - COALESCE ( 90, + tab0.col1 * 71 + + tab0.col1 DIV tab0.col0, - tab0.col0 * + tab0.col2 ) * 3 AS col0 FROM tab0 GROUP BY col2
----
-270
-270
-270

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-869
SELECT ALL - COALESCE ( 90, + tab0.col1 * 71 + + tab0.col1 / tab0.col0, - tab0.col0 * + tab0.col2 ) * 3 AS col0 FROM tab0 GROUP BY col2
----
-270
-270
-270

query I rowsort
SELECT DISTINCT + 25 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1025
-1475
-1525

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

query I rowsort
SELECT - ( - 99 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
99
99

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

query I rowsort
SELECT - tab2.col1 - 67 FROM tab2 GROUP BY tab2.col1
----
-108
-126
-128

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

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

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

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

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

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

query I rowsort
SELECT ALL - col2 * 67 FROM tab1 GROUP BY tab1.col2
----
-3015
-4757
-536

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

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

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

query I rowsort
SELECT + ( + 96 ) FROM tab2 GROUP BY tab2.col0
----
96
96
96

onlyif mysql # DIV for integer division: 
query I rowsort label-885
SELECT DISTINCT - col2 DIV 72 FROM tab2 GROUP BY tab2.col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-885
SELECT DISTINCT - col2 / 72 FROM tab2 GROUP BY tab2.col2
----
-1
0

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

query I rowsort
SELECT ALL - tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NULL NOT IN ( tab1.col2 )
----

query I rowsort
SELECT DISTINCT + NULLIF ( 17, cor1.col1 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor0.col0
----
17

query I rowsort
SELECT ALL + + 18 AS col0 FROM tab2 GROUP BY col2
----
18
18
18

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-893
SELECT + tab1.col1 * ( tab1.col1 ) - + 34 DIV tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
31
3249

skipif mysql # not compatible
query I rowsort label-893
SELECT + tab1.col1 * ( tab1.col1 ) - + 34 / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
31
3249

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

query I rowsort
SELECT 17 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
58
76
78

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

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

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 ALL - ( + 42 ) + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-34
29
3

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

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

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

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

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

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

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

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

query I rowsort
SELECT - 80 FROM tab2 GROUP BY tab2.col2
----
-80
-80
-80

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-912
SELECT ALL - 73 DIV + tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
40
58
60

skipif mysql # not compatible
query I rowsort label-912
SELECT ALL - 73 / + tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
40
58
60

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

query I rowsort
SELECT DISTINCT cor0.col0 * 61 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1586
2623
5063

query I rowsort
SELECT + + tab1.col1 * tab1.col1 + 58 AS col0 FROM tab1 GROUP BY col1
----
1994
3307
94

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

query I rowsort
SELECT - 12 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
3
79
80

onlyif mysql # DIV for integer division: 
query I rowsort label-918
SELECT tab2.col2 DIV - 5 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
47
64
70

skipif mysql # not compatible
query I rowsort label-918
SELECT tab2.col2 / - 5 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
47
64
70

query I rowsort
SELECT DISTINCT - tab0.col2 * - tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NOT NULL
----
1444
576
6241

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

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

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

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

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

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

query I rowsort
SELECT 59 - + 58 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

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

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

query I rowsort
SELECT DISTINCT + 5 + 8 AS col0 FROM tab1 GROUP BY tab1.col0
----
13

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-930
SELECT DISTINCT + CAST( col0 AS SIGNED ) * + 79 AS col0 FROM tab1 GROUP BY tab1.col0
----
1738
2212
6478

skipif mysql # not compatible
query I rowsort label-930
SELECT DISTINCT + CAST ( col0 AS INTEGER ) * + 79 AS col0 FROM tab1 GROUP BY tab1.col0
----
1738
2212
6478

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

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

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

query I rowsort
SELECT ALL 78 + - 74 AS col2 FROM tab2 GROUP BY tab2.col2
----
4
4
4

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

onlyif mysql # DIV for integer division: 
query I rowsort label-936
SELECT - ( - 11 ) DIV - 78 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-936
SELECT - ( - 11 ) / - 78 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
0
0

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

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

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

query I rowsort
SELECT 38 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2204
-3002
-3306

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

query I rowsort
SELECT DISTINCT 25 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
104
49
63

query I rowsort
SELECT DISTINCT 83 * 62 FROM tab0 AS cor0 GROUP BY cor0.col0
----
5146

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-952
SELECT tab0.col1 DIV 63 + 1 FROM tab0 GROUP BY tab0.col1
----
1
2

skipif mysql # not compatible
query I rowsort label-952
SELECT tab0.col1 / 63 + 1 FROM tab0 GROUP BY tab0.col1
----
1
2

query I rowsort
SELECT - tab1.col1 * - tab1.col1 AS col1 FROM tab1 WHERE NOT - col0 + - tab1.col1 * tab1.col0 IN ( - tab1.col0 * tab1.col0 ) GROUP BY tab1.col1
----
1936
3249
36

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

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

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

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 cor0.col0 + - cor0.col0 * 17 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1328
-416
-688

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 86 + + tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
-71
5
6

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

query I rowsort
SELECT DISTINCT + - 20 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-1420
-160
-900

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

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

query I rowsort
SELECT 22 * cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
1276
1738
1914

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

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

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

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

query I rowsort
SELECT 3 FROM tab1 GROUP BY tab1.col2
----
3
3
3

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

query I rowsort
SELECT DISTINCT 92 FROM tab0 GROUP BY tab0.col2
----
92

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-980
SELECT DISTINCT col1 DIV 2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
40

skipif mysql # not compatible
query I rowsort label-980
SELECT DISTINCT col1 / 2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
40

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

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

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

query I rowsort
SELECT + - tab0.col0 - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

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-985
SELECT - cor0.col1 DIV 39 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

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

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

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

query I rowsort
SELECT + - tab0.col0 * 93 AS col0 FROM tab0 GROUP BY tab0.col0
----
-2418
-3999
-7719

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

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

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

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-992
SELECT ALL + + COALESCE ( + 71, - tab0.col2 - CAST( NULL AS SIGNED ) DIV col2, tab0.col0 ) + + tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
114
154
97

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-992
SELECT ALL + + COALESCE ( + 71, - tab0.col2 - CAST ( NULL AS INTEGER ) / col2, tab0.col0 ) + + tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
114
154
97

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

query I rowsort
SELECT + - 96 FROM tab1 GROUP BY col2
----
-96
-96
-96

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-998
SELECT DISTINCT - 45 + tab0.col2 DIV + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-44

skipif mysql # not compatible
query I rowsort label-998
SELECT DISTINCT - 45 + tab0.col2 / + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-44

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

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

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

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

query I rowsort
SELECT ALL - tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NULL <> NULL
----

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

query I rowsort
SELECT ALL - ( 86 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
-86
-86
-86

query I rowsort
SELECT 76 + NULLIF ( + 20, + cor0.col1 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
96
96
96

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1009
SELECT ALL - 3 DIV - 44 col2 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1009
SELECT ALL - 3 / - 44 col2 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 * - 46 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4186
-4232
-690

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1018
SELECT ALL 25 - cor0.col0 DIV cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
24
24
24

skipif mysql # not compatible
query I rowsort label-1018
SELECT ALL 25 - cor0.col0 / cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
24
24
24

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

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

query I rowsort
SELECT - 88 + col0 * 94 FROM tab0 GROUP BY tab0.col0
----
2356
3954
7714

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

query I rowsort
SELECT - - 73 + col0 FROM tab1 GROUP BY tab1.col0
----
101
155
95

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

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

query I rowsort
SELECT 68 * - col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-1632
-2584
-5372

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

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

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

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

query I rowsort
SELECT 9 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
369
531
549

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

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

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

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

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

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

query I rowsort
SELECT - 21 FROM tab1 GROUP BY tab1.col2
----
-21
-21
-21

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

query I rowsort
SELECT DISTINCT + 35 FROM tab0 GROUP BY tab0.col2
----
35

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-240
-8372
-8556

query I rowsort
SELECT ALL + 80 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor0.col0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

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

query I rowsort
SELECT - tab1.col1 * 93 AS col2 FROM tab1 GROUP BY tab1.col1
----
-4092
-5301
-558

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

query I rowsort
SELECT - CASE 96 WHEN cor0.col1 * col1 THEN NULL ELSE 41 END FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-41
-41

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1053
SELECT ALL - tab2.col0 DIV 72 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-1053
SELECT ALL - tab2.col0 / 72 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
0

query I rowsort
SELECT DISTINCT + cor0.col0 + + ( 3 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
29
46
86

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

query I rowsort
SELECT ALL - 73 FROM tab2 GROUP BY col1
----
-73
-73
-73

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

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

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

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

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

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

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

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

query I rowsort
SELECT 78 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
102
116
157

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

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

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

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

query I rowsort
SELECT ALL 63 * + 28 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1764
1764
1764

query I rowsort
SELECT ALL col1 + CASE + cor0.col1 + cor0.col2 * - cor0.col1 WHEN + COALESCE ( cor0.col2, + cor0.col2 / - 77 ) THEN ( 59 ) ELSE + cor0.col2 END AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
105
38
79

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1072
SELECT + - 50 DIV + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-8
0

skipif mysql # not compatible
query I rowsort label-1072
SELECT + - 50 / + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-8
0

query I rowsort
SELECT cor0.col2 * 70 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4060
5530
6090

query I rowsort
SELECT - + tab2.col0 * 57 FROM tab2 GROUP BY tab2.col0
----
-5187
-5244
-855

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1078
SELECT 26 DIV + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1078
SELECT 26 / + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

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

query I rowsort
SELECT tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL IS NOT NULL
----
225
8281
8464

query I rowsort
SELECT - tab1.col0 FROM tab1 GROUP BY col0 HAVING NOT tab1.col0 + - tab1.col0 < ( NULL )
----

onlyif mysql # DIV for integer division: 
query I rowsort label-1082
SELECT DISTINCT + tab2.col1 DIV 27 FROM tab2 GROUP BY tab2.col1
----
1
2

skipif mysql # not compatible
query I rowsort label-1082
SELECT DISTINCT + tab2.col1 / 27 FROM tab2 GROUP BY tab2.col1
----
1
2

query I rowsort
SELECT ALL + 17 - - tab2.col2 FROM tab2 GROUP BY col2
----
104
75
96

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

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

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
210
8190
8372

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

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

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

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

query I rowsort
SELECT + - tab0.col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-158
-48
-76

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT tab1.col0 * + 61 + col0 FROM tab1 GROUP BY tab1.col0
----
1364
1736
5084

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

query I rowsort
SELECT ALL - 17 AS col1 FROM tab0 GROUP BY tab0.col0
----
-17
-17
-17

query I rowsort
SELECT ALL + ( + 30 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
30
30
30

query I rowsort
SELECT 82 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
104
110
164

query I rowsort
SELECT 42 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
2436
3318
3654

query I rowsort
SELECT 44 + 96 FROM tab2 GROUP BY tab2.col2
----
140
140
140

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

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

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

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 DISTINCT - 50 FROM tab1 GROUP BY tab1.col0
----
-50

query I rowsort
SELECT 26 + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
109
52
69

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * cor0.col0 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 DISTINCT 81 col0 FROM tab1 AS cor0 GROUP BY col0
----
81

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

query I rowsort
SELECT + tab1.col2 * + tab1.col2 + 42 AS col1 FROM tab1 GROUP BY tab1.col2
----
106
2067
5083

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 79 * - col1 - - 67 col0 FROM tab2 GROUP BY tab2.col1
----
-3172
-4594
-4752

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

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

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

query I rowsort
SELECT + 97 FROM tab1 GROUP BY tab1.col2
----
97
97
97

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

query I rowsort
SELECT DISTINCT - 42 FROM tab0 GROUP BY tab0.col0
----
-42

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

query I rowsort
SELECT DISTINCT cor0.col0 * 80 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
1760
2240
6560

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

query I rowsort
SELECT - 62 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2728
-3534
-372

query I rowsort
SELECT + 99 FROM tab1 GROUP BY tab1.col0
----
99
99
99

query I rowsort
SELECT 77 * + cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
3465
5467
616

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

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

query I rowsort
SELECT + 22 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-23
-49
14

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

query I rowsort
SELECT cor0.col0 * 69 FROM tab1 cor0 GROUP BY cor0.col0
----
1518
1932
5658

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

query I rowsort
SELECT ALL - tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT tab1.col2 * col2 + + col2 FROM tab1 GROUP BY tab1.col2
----
2070
5112
72

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

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

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

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

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

query I rowsort
SELECT - + tab2.col1 * ( 26 ) + + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1025
-1475
-1525

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

query I rowsort
SELECT - - 1 FROM tab2 GROUP BY col2
----
1
1
1

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

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

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

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

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

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

query I rowsort
SELECT ALL - 1 * 99 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-42
-55
-93

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

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

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

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

query I rowsort
SELECT + 99 FROM tab1 GROUP BY tab1.col1
----
99
99
99

query I rowsort
SELECT - + col2 + - 65 FROM tab0 GROUP BY tab0.col2
----
-103
-144
-89

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1171
SELECT DISTINCT tab2.col0 * 53 + 99 DIV + tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
4824
4877
801

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1171
SELECT DISTINCT tab2.col0 * 53 + 99 / + tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
4824
4877
801

query I rowsort
SELECT ALL + tab1.col1 AS col0 FROM tab1 WHERE NOT ( - col0 ) IS NOT NULL GROUP BY tab1.col1 HAVING NULL IS NULL
----

query I rowsort
SELECT tab1.col2 FROM tab0 AS cor0 CROSS JOIN tab1 GROUP BY tab1.col2 HAVING NOT tab1.col2 IS NULL
----
45
71
8

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

query I rowsort
SELECT ALL - cor1.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
-58
-79
-87

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

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

query I rowsort
SELECT 77 * 87 AS col0 FROM tab0 GROUP BY tab0.col1
----
6699
6699

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1180
SELECT 79 DIV - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-1180
SELECT 79 / - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1
-3
0

query I rowsort
SELECT DISTINCT 52 * + 14 FROM tab1 GROUP BY tab1.col1
----
728

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

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

query I rowsort
SELECT - ( 56 ) + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
2
23
31

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

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

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

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

query I rowsort
SELECT 59 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1534
2537
4897

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + 86 * + cor0.col2 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5046
6873
7569

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

query I rowsort
SELECT 42 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
42
42
42

query I rowsort
SELECT + 49 AS col0 FROM tab2 GROUP BY tab2.col1
----
49
49
49

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 15 FROM tab0 AS cor0 GROUP BY cor0.col0
----
15

query I rowsort
SELECT DISTINCT tab2.col0 * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT cor0.col2 * 92 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2208
3496
7268

query I rowsort
SELECT DISTINCT - 31 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-25
13
26

query I rowsort
SELECT DISTINCT 40 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1760
2280
240

query I rowsort
SELECT DISTINCT - 3 FROM tab2 GROUP BY tab2.col0
----
-3

query I rowsort
SELECT - 18 AS col0 FROM tab2 GROUP BY tab2.col0
----
-18
-18
-18

query I rowsort
SELECT - 91 FROM tab2 GROUP BY tab2.col0
----
-91
-91
-91

query I rowsort
SELECT 67 FROM tab1 GROUP BY tab1.col0
----
67
67
67

query I rowsort
SELECT + 81 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
81
81
81

query I rowsort
SELECT - 35 AS col0 FROM tab2 GROUP BY tab2.col1
----
-35
-35
-35

query I rowsort
SELECT DISTINCT - - 56 FROM tab1 GROUP BY col0
----
56

query I rowsort
SELECT col1 * col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT - + 0 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 11 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
11

query I rowsort
SELECT ALL - 70 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-70
-70
-70

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1219
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1219
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 56 + 73 FROM tab0 AS cor0 GROUP BY cor0.col2
----
129
129
129

query I rowsort
SELECT + col1 AS col2 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT - - 60 AS col1 FROM tab2 GROUP BY tab2.col2
----
60
60
60

query I rowsort
SELECT - 86 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-86
-86
-86

query I rowsort
SELECT ALL - 21 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-21
-21
-21

query I rowsort
SELECT DISTINCT + - tab1.col2 - 80 FROM tab1 GROUP BY tab1.col2
----
-125
-151
-88

query I rowsort
SELECT ALL - col0 AS col2 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT + col1 * + 22 - - 31 * 23 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, col0
----
1615
2011
2055

onlyif mysql # DIV for integer division: 
query I rowsort label-1228
SELECT DISTINCT + cor0.col1 DIV 62 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-1228
SELECT DISTINCT + cor0.col1 / 62 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT ALL + 90 AS col1 FROM tab0 GROUP BY tab0.col1
----
90
90

query I rowsort
SELECT ALL + 7 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
7
7

onlyif mysql # DIV for integer division: 
query I rowsort label-1231
SELECT - - tab2.col1 DIV - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1231
SELECT - - tab2.col1 / - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-1232
SELECT DISTINCT - tab0.col2 + 93 DIV - col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-27
-40
-80

skipif mysql # not compatible
query I rowsort label-1232
SELECT DISTINCT - tab0.col2 + 93 / - col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-27
-40
-80

query I rowsort
SELECT DISTINCT - 65 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
-65

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT + 90 AS col0 FROM tab0 GROUP BY tab0.col2
----
90
90
90

query I rowsort
SELECT + 97 AS col2 FROM tab2 GROUP BY tab2.col2
----
97
97
97

query I rowsort
SELECT ALL - 63 FROM tab0 GROUP BY tab0.col2
----
-63
-63
-63

query I rowsort
SELECT 34 AS col2 FROM tab2 GROUP BY tab2.col2
----
34
34
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 70 col2 FROM tab2 GROUP BY tab2.col0
----
-70
-70
-70

query I rowsort
SELECT 26 * col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1118
2158
676

query I rowsort
SELECT - 96 FROM tab0 GROUP BY tab0.col1
----
-96
-96

query I rowsort
SELECT DISTINCT - ( 2 ) FROM tab0 AS cor0 GROUP BY col2, col1
----
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 33 + col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
104
41
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col2 col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT ALL + cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0, cor0.col0
----
24
38
79

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - ( - ( - cor0.col1 ) ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1250
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1250
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL

query I rowsort
SELECT DISTINCT + tab1.col2 - - 3 AS col1 FROM tab1 GROUP BY tab1.col2
----
11
48
74

query I rowsort
SELECT + + tab1.col0 * 17 + + tab1.col0 * tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
1260
8118
858

query I rowsort
SELECT ALL - - tab1.col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT 33 + 56 FROM tab0 GROUP BY tab0.col0
----
89
89
89

query I rowsort
SELECT DISTINCT + 3 * col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
114
237
72

query I rowsort
SELECT cor0.col1 * + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT cor0.col1 - - col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab1.col0 + + col0 col1 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT 3 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
3
3
3

query I rowsort
SELECT ALL - 24 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1056
-1368
-144

onlyif mysql # DIV for integer division: 
query I rowsort label-1261
SELECT ALL + 72 DIV cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
1
1
9

skipif mysql # not compatible
query I rowsort label-1261
SELECT ALL + 72 / cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
1
1
9

query I rowsort
SELECT - - 16 * + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
1264
1392
928

query I rowsort
SELECT DISTINCT tab2.col2 * - tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT cor0.col1 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
124
26
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 19 col0 FROM tab2 GROUP BY col2
----
19
19
19

query I rowsort
SELECT + 79 AS col0 FROM tab1 GROUP BY tab1.col0
----
79
79
79

query I rowsort
SELECT + + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT 54 AS col0 FROM tab1 GROUP BY col1
----
54
54
54

query I rowsort
SELECT ALL + 34 AS col0 FROM tab1 GROUP BY tab1.col1
----
34
34
34

query I rowsort
SELECT - - COALESCE ( - tab1.col2, - tab1.col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + 83 * 74 AS col2 FROM tab1 GROUP BY tab1.col0
----
6142
6142
6142

onlyif mysql # DIV for integer division: 
query I rowsort label-1272
SELECT DISTINCT 70 DIV + 16 AS col1 FROM tab2 GROUP BY tab2.col0
----
4

skipif mysql # not compatible
query I rowsort label-1272
SELECT DISTINCT 70 / + 16 AS col1 FROM tab2 GROUP BY tab2.col0
----
4

query I rowsort
SELECT - tab1.col2 * + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT - tab1.col0 - - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL = NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab1.col1 * col1 col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL col0 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3772
-5369
-915

onlyif mysql # DIV for integer division: 
query I rowsort label-1278
SELECT DISTINCT + col0 DIV col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
1

skipif mysql # not compatible
query I rowsort label-1278
SELECT DISTINCT + col0 / col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1279
SELECT DISTINCT + CAST( - 3 AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col0
----
-3

skipif mysql # not compatible
query I rowsort label-1279
SELECT DISTINCT + CAST ( - 3 AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col0
----
-3

query I rowsort
SELECT 97 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
97
97
97

query I rowsort
SELECT 27 FROM tab2 GROUP BY tab2.col0
----
27
27
27

query I rowsort
SELECT - ( + 2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2
-2
-2

query I rowsort
SELECT DISTINCT - 83 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-83

query I rowsort
SELECT 78 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
78
78
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 35 + - cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-23
-44
-52

query I rowsort
SELECT - - 95 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-5510
-7505
-8265

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT col2 * tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
45
71
8

query I rowsort
SELECT DISTINCT 71 FROM tab0 GROUP BY tab0.col1
----
71

query I rowsort
SELECT DISTINCT + ( - 71 ) * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
3195
5041
568

query I rowsort
SELECT + tab1.col2 * col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT ALL tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0 HAVING ( NULL ) IS NULL
----
15
91
92

query I rowsort
SELECT DISTINCT 9 FROM tab2 AS cor0 GROUP BY cor0.col2
----
9

query I rowsort
SELECT + ( - cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
-45
-71
-8

query I rowsort
SELECT ALL + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL 32 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 54 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
54

onlyif mysql # DIV for integer division: 
query I rowsort label-1300
SELECT ALL + tab0.col0 DIV + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1300
SELECT ALL + tab0.col0 / + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT + + ( tab1.col2 ) + - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT - - 44 AS col2 FROM tab0 GROUP BY tab0.col0
----
44
44
44

query I rowsort
SELECT ALL + 77 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
77
77
77

query I rowsort
SELECT ALL - cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT + 92 FROM tab1 AS cor0 GROUP BY cor0.col0
----
92
92
92

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 - 59 AS col0 FROM tab0 GROUP BY tab0.col0
----
-59
-59
-59

query I rowsort
SELECT + col2 AS col1 FROM tab2 GROUP BY tab2.col2 HAVING ( NULL ) > NULL
----

query I rowsort
SELECT DISTINCT - tab1.col1 - - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT DISTINCT - col0 * + 85 FROM tab1 GROUP BY tab1.col0
----
-1870
-2380
-6970

query I rowsort
SELECT cor0.col0 * 26 - + cor0.col2 * 99 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-220
-3727
-4897

query I rowsort
SELECT + 22 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
22
22
22

query I rowsort
SELECT ALL - cor0.col1 + 66 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-15
66

query I rowsort
SELECT ( + 21 ) AS col1 FROM tab1 cor0 GROUP BY col2, col1
----
21
21
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 44 col2 FROM tab2 GROUP BY tab2.col0
----
44
44
44

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL - 88 FROM tab0 GROUP BY tab0.col1
----
-88
-88

query I rowsort
SELECT tab0.col2 - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 * tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT + 52 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
131
76
90

query I rowsort
SELECT + - tab0.col2 - - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT + + 33 FROM tab0 GROUP BY tab0.col2
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 80 col1 FROM tab0 GROUP BY tab0.col2
----
-80
-80
-80

query I rowsort
SELECT - + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
484
6724
784

onlyif mysql # DIV for integer division: 
query I rowsort label-1327
SELECT - tab2.col2 DIV + 44 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1327
SELECT - tab2.col2 / + 44 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1328
SELECT tab1.col2 * - CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1328
SELECT tab1.col2 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
182
184
30

query I rowsort
SELECT cor0.col2 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

query I rowsort
SELECT ALL + 97 + tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
178
97

query I rowsort
SELECT DISTINCT + - 71 FROM tab0 GROUP BY tab0.col0
----
-71

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 GROUP BY col2, col1
----
-45
-71
-8

query I rowsort
SELECT - - tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT DISTINCT - cor0.col1 * + ( 44 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3564
0

query I rowsort
SELECT ALL - cor0.col2 + - 15 FROM tab1 AS cor0 GROUP BY col2
----
-23
-60
-86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1337
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1337
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 85 * + 31 AS col2 FROM tab0 GROUP BY tab0.col1
----
-2635
-2635

query I rowsort
SELECT NULLIF ( - tab0.col2, + 12 ) FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT + tab1.col0 * + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT - col1 * 58 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-4779
0

query I rowsort
SELECT tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2 HAVING ( NULL ) BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT + tab2.col0 FROM tab2 WHERE NOT NULL IS NOT NULL GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT + tab2.col1 + + tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
118
122
82

query I rowsort
SELECT DISTINCT - 17 FROM tab0 GROUP BY tab0.col1
----
-17

query I rowsort
SELECT DISTINCT 72 FROM tab1 GROUP BY col2
----
72

query I rowsort
SELECT ALL - tab2.col2 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT + tab2.col0 + - tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-210
-8190
-8372

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 cor0.col0 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + + 16 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
42
59
99

query I rowsort
SELECT ALL + - ( 70 ) AS col0 FROM tab2 GROUP BY tab2.col0
----
-70
-70
-70

query I rowsort
SELECT - 87 FROM tab1 GROUP BY tab1.col2
----
-87
-87
-87

query I rowsort
SELECT ALL + 32 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
32
32
32

query I rowsort
SELECT ALL - 81 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
-81
-81
-81

query I rowsort
SELECT ALL 25 FROM tab1 AS cor0 GROUP BY col1
----
25
25
25

query I rowsort
SELECT - 24 + + 70 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
46
46
46

query I rowsort
SELECT 45 AS col1 FROM tab1 GROUP BY tab1.col2
----
45
45
45

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1359
SELECT DISTINCT + + CAST( NULL AS SIGNED ) AS col2 FROM tab0 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1359
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY col2
----
NULL

query I rowsort
SELECT ALL + tab2.col1 * + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT ALL + cor0.col0 + - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-1363
SELECT ALL + cor0.col1 DIV cor0.col1 + - 20 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-19
-19
-19

skipif mysql # not compatible
query I rowsort label-1363
SELECT ALL + cor0.col1 / cor0.col1 + - 20 AS col2 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 ALL + col0 * - col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL + 76 FROM tab0 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT DISTINCT + + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT 95 + cor0.col1 AS col2 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
136
154
156

query I rowsort
SELECT DISTINCT tab2.col0 * 62 AS col1 FROM tab2 GROUP BY tab2.col0
----
5642
5704
930

query I rowsort
SELECT DISTINCT - - 80 AS col2 FROM tab1 GROUP BY tab1.col0
----
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + - 76 + - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-104
-158
-98

onlyif mysql # DIV for integer division: 
query I rowsort label-1372
SELECT ALL - 36 DIV + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1372
SELECT ALL - 36 / + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL + 52 AS col2 FROM tab0 GROUP BY tab0.col2
----
52
52
52

onlyif mysql # DIV for integer division: 
query I rowsort label-1374
SELECT - 54 DIV tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1
-6
0

skipif mysql # not compatible
query I rowsort label-1374
SELECT - 54 / tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1
-6
0

query I rowsort
SELECT DISTINCT 34 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 74 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT ALL + 60 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT + + ( 95 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
95
95
95

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 71 col0 FROM tab2 GROUP BY tab2.col0
----
71
71
71

query I rowsort
SELECT ALL + - 54 AS col1 FROM tab2 GROUP BY tab2.col0
----
-54
-54
-54

query I rowsort
SELECT - + 21 FROM tab0 GROUP BY tab0.col0
----
-21
-21
-21

query I rowsort
SELECT + ( tab0.col1 ) FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-1385
SELECT DISTINCT 57 DIV 78 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-1385
SELECT DISTINCT 57 / 78 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
0

query I rowsort
SELECT ALL cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL - 82 * 84 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6888
-6888

query I rowsort
SELECT ALL 81 * + ( - tab0.col1 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT 45 FROM tab0 AS cor0 GROUP BY cor0.col0
----
45
45
45

query I rowsort
SELECT ALL - 6 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-546
-552
-90

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL + tab2.col0 + - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT + ( 20 ) - + cor0.col2 * 61 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3518
-4799
-5287

query I rowsort
SELECT DISTINCT - ( + 24 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-24

query I rowsort
SELECT DISTINCT 71 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
71

query I rowsort
SELECT + 85 + - tab2.col2 FROM tab2 GROUP BY col2
----
-2
27
6

query I rowsort
SELECT - tab1.col0 - - 29 AS col1 FROM tab1 GROUP BY tab1.col0
----
-53
1
7

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT cor0.col1 + 55 * - 8 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-379
-381
-399

query I rowsort
SELECT - 56 * cor0.col2 + - cor0.col2 AS col0 FROM tab2 cor0 GROUP BY col2, cor0.col1
----
-3306
-4503
-4959

query I rowsort
SELECT cor0.col1 * 42 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1848
2394
252

query I rowsort
SELECT tab0.col2 AS col1 FROM tab0 GROUP BY col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT - tab2.col1 - - tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
0

query I rowsort
SELECT ALL tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT ALL + + col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL - - 97 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
2134
2716
7954

query I rowsort
SELECT 50 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
132
72
78

query I rowsort
SELECT DISTINCT - - tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT + tab2.col1 * + 20 AS col0 FROM tab2 GROUP BY tab2.col1
----
1180
1220
820

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 - - 93 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
2
78

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL 67 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 22 * - cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1738
-528
-836

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 47 col1 FROM tab1 GROUP BY tab1.col2
----
-47
-47
-47

query I rowsort
SELECT - 9 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-9
-9
-9

query I rowsort
SELECT DISTINCT - cor0.col1 * - 97 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
3977
5723
5917

query I rowsort
SELECT 32 FROM tab2 GROUP BY tab2.col1
----
32
32
32

query I rowsort
SELECT DISTINCT + 69 FROM tab1 GROUP BY tab1.col1
----
69

query I rowsort
SELECT - tab2.col2 + - 94 FROM tab2 GROUP BY tab2.col2
----
-152
-173
-181

query I rowsort
SELECT DISTINCT - 35 AS col2 FROM tab0 GROUP BY tab0.col1
----
-35

query I rowsort
SELECT + tab0.col0 - 95 FROM tab0 GROUP BY tab0.col0
----
-12
-52
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT 53 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT ALL + cor0.col1 * 68 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5508

query I rowsort
SELECT tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL <> ( NULL )
----

query I rowsort
SELECT DISTINCT + col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL cor1.col1 AS col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-1429
SELECT DISTINCT - tab0.col0 DIV - tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1429
SELECT DISTINCT - tab0.col0 / - tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
1

onlyif mysql # DIV for integer division: 
query I rowsort label-1430
SELECT - cor0.col0 DIV ( - 54 ) col1 FROM tab0 cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1430
SELECT - cor0.col0 / ( - 54 ) col1 FROM tab0 cor0 GROUP BY cor0.col0
----
0
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-1431
SELECT ALL tab2.col0 DIV - 41 FROM tab2 GROUP BY tab2.col0
----
-2
-2
0

skipif mysql # not compatible
query I rowsort label-1431
SELECT ALL tab2.col0 / - 41 FROM tab2 GROUP BY tab2.col0
----
-2
-2
0

query I rowsort
SELECT DISTINCT ( 19 ) FROM tab0 cor0 GROUP BY col0
----
19

query I rowsort
SELECT 35 FROM tab1 GROUP BY col1
----
35
35
35

query I rowsort
SELECT - + 39 FROM tab0 GROUP BY col2
----
-39
-39
-39

query I rowsort
SELECT ALL + + 8 FROM tab2 GROUP BY tab2.col1
----
8
8
8

query I rowsort
SELECT + - 62 AS col1 FROM tab1 GROUP BY tab1.col1
----
-62
-62
-62

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 + 17 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
17

query I rowsort
SELECT ALL + 4 FROM tab1 GROUP BY tab1.col0
----
4
4
4

query I rowsort
SELECT - 11 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-11
-11
-11

query I rowsort
SELECT DISTINCT 17 - + col2 FROM tab2 GROUP BY tab2.col2
----
-41
-62
-70

query I rowsort
SELECT ALL tab2.col1 * - 54 FROM tab2 GROUP BY col1
----
-2214
-3186
-3294

query I rowsort
SELECT DISTINCT + ( tab0.col1 ) * 84 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
6804

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - tab2.col0 + tab2.col0 AS col1 FROM tab2 GROUP BY col0 HAVING NOT NULL IS NOT NULL
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1446
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1446
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
NULL

query I rowsort
SELECT col0 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 1 FROM tab1 GROUP BY tab1.col2
----
1

query I rowsort
SELECT - 96 FROM tab1 GROUP BY col1
----
-96
-96
-96

query I rowsort
SELECT ALL 36 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
107
44
81

query I rowsort
SELECT - 92 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4140
-6532
-736

query I rowsort
SELECT - 24 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-24
-24
-24

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT 70 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
70

query I rowsort
SELECT + 10 - + 87 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-77
-77
-77

query I rowsort
SELECT - tab1.col0 * 16 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1312
-352
-448

query I rowsort
SELECT col0 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
3483

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT cor0.col1 + COALESCE ( 35, cor0.col0 - cor0.col2, + cor0.col0 - - CASE cor0.col0 + + cor0.col1 / cor0.col1 WHEN + cor0.col2 * cor0.col2 THEN + cor0.col0 + cor0.col2 WHEN cor0.col2 THEN NULL END, cor0.col2 * cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
41
79
92

query I rowsort
SELECT DISTINCT + 54 AS col1 FROM tab1 cor0 GROUP BY col2
----
54

query I rowsort
SELECT DISTINCT + tab0.col0 + tab0.col0 * - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1806
-650
-6806

query I rowsort
SELECT - + 90 + + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-11
-3
-32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 54 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
54

onlyif mysql # DIV for integer division: 
query I rowsort label-1463
SELECT ALL tab0.col2 DIV - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1463
SELECT ALL tab0.col2 / - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL 5 + - col0 * tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-479
-6719
-779

query I rowsort
SELECT - cor0.col0 * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT + 89 AS col0 FROM tab0 GROUP BY tab0.col1
----
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 99 AS col1 FROM tab0, tab1 cor0 GROUP BY tab0.col0
----
-99

onlyif mysql # DIV for integer division: 
query I rowsort label-1469
SELECT + 69 DIV - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1469
SELECT + 69 / - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

query I rowsort
SELECT 57 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
57
57
57

query I rowsort
SELECT cor0.col1 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT cor0.col2 * + 58 FROM tab0 cor0 GROUP BY cor0.col2
----
1392
2204
4582

query I rowsort
SELECT DISTINCT - tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NULL IN ( tab0.col2 )
----

query I rowsort
SELECT + 48 FROM tab1 GROUP BY tab1.col2
----
48
48
48

query I rowsort
SELECT + + 0 AS col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1477
SELECT ALL + 93 DIV 88 col1 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1477
SELECT ALL + 93 / 88 col1 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT ALL 24 AS col1 FROM tab1 GROUP BY tab1.col2
----
24
24
24

query I rowsort
SELECT DISTINCT - 73 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
-73

query I rowsort
SELECT + cor0.col0 * col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
225
8281
8464

query I rowsort
SELECT - - col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - + tab1.col1 * + 99 + - 60 FROM tab1 GROUP BY tab1.col1
----
-4416
-5703
-654

query I rowsort
SELECT ALL - 7 FROM tab2 GROUP BY tab2.col1
----
-7
-7
-7

query I rowsort
SELECT DISTINCT - 39 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col0
----
-39

query I rowsort
SELECT DISTINCT 50 + 6 FROM tab1 GROUP BY tab1.col2
----
56

query I rowsort
SELECT + 44 - + 39 AS col0 FROM tab1 GROUP BY tab1.col2
----
5
5
5

query I rowsort
SELECT + 28 FROM tab1 AS cor0 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT - CASE - cor0.col2 WHEN + 46 - + 81 THEN NULL WHEN + col2 THEN NULL ELSE + cor0.col1 - cor0.col0 END + cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
26
6523
83

onlyif mysql # DIV for integer division: 
query I rowsort label-1489
SELECT ALL + cor0.col1 DIV - 33 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-1489
SELECT ALL + cor0.col1 / - 33 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
0

query I rowsort
SELECT ALL + cor0.col2 * NULLIF ( + cor0.col2, + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + 39 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
120
39

query I rowsort
SELECT - col2 FROM tab2 WHERE + tab2.col1 * tab2.col1 >= ( NULL ) GROUP BY col2 HAVING NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 22 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
22
22
22

query I rowsort
SELECT ALL 77 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
77
77
77

query I rowsort
SELECT ALL - cor0.col2 - cor0.col2 * - NULLIF ( cor0.col0, cor0.col0 + + 96 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1218
5278
7110

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 3 col0 FROM tab2 GROUP BY tab2.col0
----
-3
-3
-3

query I rowsort
SELECT DISTINCT 15 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
15

query I rowsort
SELECT + cor0.col0 * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT - ( 11 ) * - tab2.col2 FROM tab2 GROUP BY col2
----
638
869
957

query I rowsort
SELECT ALL 83 FROM tab0 GROUP BY col1
----
83
83

query I rowsort
SELECT ALL - tab1.col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT - - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-1504
SELECT ALL + tab1.col0 DIV tab1.col0 FROM tab1 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1504
SELECT ALL + tab1.col0 / tab1.col0 FROM tab1 GROUP BY col0
----
1
1
1

query I rowsort
SELECT ALL - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, col2
----
-24
-38
-79

query I rowsort
SELECT 71 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
71
71
71

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
0
0
81

query I rowsort
SELECT - col2 + 77 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-2
39
53

query I rowsort
SELECT + cor0.col1 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-16
-38
29

query I rowsort
SELECT - 20 FROM tab0 GROUP BY col1
----
-20
-20

query I rowsort
SELECT + 49 FROM tab2 GROUP BY tab2.col1
----
49
49
49

query I rowsort
SELECT DISTINCT + 43 + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
124
43

query I rowsort
SELECT - 54 * 48 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2592
-2592
-2592

query I rowsort
SELECT ALL - - 92 AS col1 FROM tab2 GROUP BY tab2.col0
----
92
92
92

query I rowsort
SELECT ALL - 11 + 49 FROM tab2 GROUP BY tab2.col0
----
38
38
38

query I rowsort
SELECT 69 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
69
69
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 6 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT ALL - - 28 + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
109
28

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - cor0.col1 * + 12 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-972
0

query I rowsort
SELECT DISTINCT 66 AS col0 FROM tab2 GROUP BY tab2.col2
----
66

query I rowsort
SELECT col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NULL NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + 80 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
80
80
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 3 col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
3
3
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 18 * + cor1.col2 col1 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
-1044
-1422
-1566

onlyif mysql # DIV for integer division: 
query I rowsort label-1528
SELECT ALL + cor0.col1 DIV + 36 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1528
SELECT ALL + cor0.col1 / + 36 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
1
1
1

query I rowsort
SELECT ALL - 19 FROM tab2 GROUP BY col1
----
-19
-19
-19

query I rowsort
SELECT 2 + + cor0.col1 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1683
3483
3723

query I rowsort
SELECT DISTINCT + 50 - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-41
-42
35

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 71 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-71

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0
0
81

query I rowsort
SELECT ALL 16 FROM tab0 cor0 GROUP BY col0
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col1 col2 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT DISTINCT + col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT - col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT + 45 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
45
45
45

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT DISTINCT + cor0.col1 * - 99 FROM tab0 cor0 GROUP BY cor0.col1
----
-8019
0

query I rowsort
SELECT - cor0.col0 - 51 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-134
-77
-94

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-1545
SELECT + 16 DIV - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1545
SELECT + 16 / - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col2, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col0 col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-15
-91
-92

query I rowsort
SELECT ALL - - col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 38 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-38

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT - + tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL 74 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
74
74

query I rowsort
SELECT DISTINCT - 44 * + 77 FROM tab1 GROUP BY tab1.col2
----
-3388

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT + 74 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
74
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 30 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
113
56
73

query I rowsort
SELECT ALL 14 FROM tab1 GROUP BY col2
----
14
14
14

query I rowsort
SELECT ALL 19 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1729
1748
285

query I rowsort
SELECT DISTINCT 84 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
84

query I rowsort
SELECT + - tab1.col1 + - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

query I rowsort
SELECT + 66 FROM tab0 GROUP BY tab0.col1
----
66
66

query I rowsort
SELECT 0 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1564
SELECT ALL 69 DIV - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-1564
SELECT ALL 69 / - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-2
0

query I rowsort
SELECT ALL 29 FROM tab1 AS cor0 GROUP BY col1
----
29
29
29

query I rowsort
SELECT - 14 - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-36
-42
-96

onlyif mysql # DIV for integer division: 
query I rowsort label-1567
SELECT DISTINCT - tab0.col0 DIV - 99 AS col0 FROM tab0 GROUP BY tab0.col0
----
0

skipif mysql # not compatible
query I rowsort label-1567
SELECT DISTINCT - tab0.col0 / - 99 AS col0 FROM tab0 GROUP BY tab0.col0
----
0

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 + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL IS NOT NULL
----
15
91
92

query I rowsort
SELECT 14 AS col2 FROM tab2 cor0 GROUP BY col1
----
14
14
14

query I rowsort
SELECT + 36 AS col1 FROM tab0 GROUP BY tab0.col2
----
36
36
36

query I rowsort
SELECT DISTINCT + - tab2.col0 + + 29 AS col1 FROM tab2 GROUP BY col0
----
-62
-63
14

query I rowsort
SELECT ALL 34 * 61 FROM tab0 GROUP BY col0
----
2074
2074
2074

query I rowsort
SELECT - ( tab2.col2 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1575
SELECT NULLIF ( 97, cor0.col2 + CAST( - 81 AS SIGNED ) ) * + col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
7857

skipif mysql # not compatible
query I rowsort label-1575
SELECT NULLIF ( 97, cor0.col2 + CAST ( - 81 AS INTEGER ) ) * + col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
7857

query I rowsort
SELECT + 31 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
112
31

query I rowsort
SELECT col0 * 8 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
120
728
736

query I rowsort
SELECT 14 + 18 FROM tab0 GROUP BY tab0.col0
----
32
32
32

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 27, tab0.col2 ) * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1161
2241
702

query I rowsort
SELECT 73 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
73
73
73

onlyif mysql # DIV for integer division: 
query I rowsort label-1581
SELECT ALL - tab1.col1 DIV + tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1581
SELECT ALL - tab1.col1 / + tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT + 24 FROM tab0 AS cor0 GROUP BY cor0.col1
----
24
24

query I rowsort
SELECT ALL - 5 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-5
-5
-5

query I rowsort
SELECT + 19 FROM tab1 GROUP BY tab1.col1
----
19
19
19

onlyif mysql # DIV for integer division: 
query I rowsort label-1585
SELECT col0 DIV 14 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
1
3
5

skipif mysql # not compatible
query I rowsort label-1585
SELECT col0 / 14 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
1
3
5

query I rowsort
SELECT - tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT + 31 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
31
31
31

query I rowsort
SELECT DISTINCT - 48 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2160
3408
384

query I rowsort
SELECT ALL - - COALESCE ( 99, 11 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
99
99
99

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col1, cor0.col1
----
-81
0

query I rowsort
SELECT - cor0.col1 + 51 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-10
-8
10

query I rowsort
SELECT col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 53 * + 83 FROM tab0 AS cor0 GROUP BY cor0.col0
----
4399

query I rowsort
SELECT DISTINCT 76 FROM tab1 AS cor0 GROUP BY col1, col2
----
76

query I rowsort
SELECT ALL + 6 * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
348
474
522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 95 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT cor0.col0 * - 76 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, col1
----
-1140
-6916
-6992

onlyif mysql # DIV for integer division: 
query I rowsort label-1599
SELECT 61 DIV - 4 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
11
28
68

skipif mysql # not compatible
query I rowsort label-1599
SELECT 61 / - 4 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
11
28
68

query I rowsort
SELECT 17 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
17
17
17

query I rowsort
SELECT DISTINCT - cor0.col1 + 44 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-13
0
38

query I rowsort
SELECT ALL col0 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3483
0
0

query I rowsort
SELECT DISTINCT - 52 FROM tab1 GROUP BY tab1.col0
----
-52

onlyif mysql # DIV for integer division: 
query I rowsort label-1604
SELECT DISTINCT - - 84 DIV + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
5

skipif mysql # not compatible
query I rowsort label-1604
SELECT DISTINCT - - 84 / + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
5

query I rowsort
SELECT - 72 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-72
-72
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
-81
0

query I rowsort
SELECT ALL + 26 FROM tab0 AS cor0 GROUP BY cor0.col1
----
26
26

query I rowsort
SELECT + 55 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
55
55
55

query I rowsort
SELECT ALL + col2 * - 45 AS col1 FROM tab2 GROUP BY col2
----
-2610
-3555
-3915

query I rowsort
SELECT ALL + 58 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
58
58
58

query I rowsort
SELECT - col0 - 83 * - 80 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
6548
6549
6625

query I rowsort
SELECT + + 27 FROM tab0 GROUP BY tab0.col0
----
27
27
27

query I rowsort
SELECT ALL - 89 AS col1 FROM tab1 GROUP BY tab1.col1
----
-89
-89
-89

query I rowsort
SELECT DISTINCT - 20 * - 55 FROM tab0 GROUP BY tab0.col1
----
1100

query I rowsort
SELECT DISTINCT col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
22
28
82

query I rowsort
SELECT ALL col2 * tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT - 72 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-72
-72
-72

query I rowsort
SELECT + 2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2
2
2

query I rowsort
SELECT DISTINCT 41 AS col0 FROM tab1 GROUP BY tab1.col2
----
41

query I rowsort
SELECT DISTINCT - 73 FROM tab0 GROUP BY col1
----
-73

query I rowsort
SELECT 58 FROM tab1 AS cor0 GROUP BY cor0.col1
----
58
58
58

onlyif mysql # DIV for integer division: 
query I rowsort label-1623
SELECT + cor0.col1 DIV + ( 7 * + cor0.col1 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1623
SELECT + cor0.col1 / + ( 7 * + cor0.col1 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - 79 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1738
-2212
-6478

query I rowsort
SELECT DISTINCT col2 + - 85 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-27
-6
2

query I rowsort
SELECT ALL 89 * - 40 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-3560
-3560
-3560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col2 FROM tab0 GROUP BY tab0.col2 HAVING NULL IS NULL
----
24
38
79

query I rowsort
SELECT DISTINCT - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NOT NULL
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 97 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-97

query I rowsort
SELECT DISTINCT + 99 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
99

query I rowsort
SELECT - tab0.col1 * tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT + cor0.col0 * 69 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1794
2967
5727

query I rowsort
SELECT ALL 96 AS col1 FROM tab1 GROUP BY tab1.col0
----
96
96
96

query I rowsort
SELECT DISTINCT - 94 FROM tab2 GROUP BY col1
----
-94

query I rowsort
SELECT DISTINCT + 80 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
80

query I rowsort
SELECT DISTINCT 63 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
63

query I rowsort
SELECT cor0.col0 + col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
164
44
56

query I rowsort
SELECT ALL 79 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col0, cor0.col2
----
0
0
0

query I rowsort
SELECT - tab2.col0 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT - 14 * 64 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-896
-896

query I rowsort
SELECT 52 * - cor0.col1 FROM tab1 AS cor0 GROUP BY col1, col0, col2
----
-2288
-2964
-312

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 83 FROM tab2 GROUP BY tab2.col0
----
83

query I rowsort
SELECT + 1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1
1

query I rowsort
SELECT col0 + 98 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
124
141
181

query I rowsort
SELECT ALL 28 FROM tab0 GROUP BY tab0.col0
----
28
28
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col2 * + col2 col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT - cor0.col2 + 74 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-13
-5
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 * + tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col1 * tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT - 45 * cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
-1260
-3690
-990

query I rowsort
SELECT DISTINCT - 79 AS col2 FROM tab1 GROUP BY tab1.col1
----
-79

query I rowsort
SELECT DISTINCT 17 AS col2 FROM tab1 GROUP BY tab1.col1
----
17

query I rowsort
SELECT ALL cor0.col0 - + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - 39 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-39
-39
-39

query I rowsort
SELECT DISTINCT + - 85 * + 91 AS col0 FROM tab1 GROUP BY tab1.col1
----
-7735

query I rowsort
SELECT - - 71 FROM tab2 GROUP BY tab2.col0
----
71
71
71

query I rowsort
SELECT DISTINCT + 4 * - cor0.col2 + 7 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-145
-309
-89

query I rowsort
SELECT tab2.col2 - - 27 AS col0 FROM tab2 GROUP BY tab2.col2
----
106
114
85

query I rowsort
SELECT DISTINCT - ( + cor0.col2 ) * 38 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-1710
-2698
-304

query I rowsort
SELECT 13 FROM tab2 GROUP BY tab2.col1
----
13
13
13

query I rowsort
SELECT ALL + 40 FROM tab1 GROUP BY col0
----
40
40
40

query I rowsort
SELECT - col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + 81 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor1.col1
----
81

query I rowsort
SELECT 33 + - 52 FROM tab1 GROUP BY col1
----
-19
-19
-19

query I rowsort
SELECT + col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT 60 AS col2 FROM tab1 GROUP BY tab1.col2
----
60
60
60

query I rowsort
SELECT + cor0.col0 * - 48 + - cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-10660
-1540
-2128

query I rowsort
SELECT - 96 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-96
-96
-96

query I rowsort
SELECT ALL - ( 40 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
-40
-40
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 30 * - tab2.col2 col2 FROM tab2 GROUP BY col2
----
1740
2370
2610

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT ALL tab2.col2 + + tab2.col2 * + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3422
6320
7656

query I rowsort
SELECT ALL - 52 FROM tab0 GROUP BY tab0.col2
----
-52
-52
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 col0 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL IS NOT NULL
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1678
SELECT CAST( 17 AS SIGNED ) col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
17
17
17

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1678
SELECT CAST ( 17 AS INTEGER ) col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
17
17
17

onlyif mysql # DIV for integer division: 
query I rowsort label-1679
SELECT + - tab1.col0 DIV tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1679
SELECT + - tab1.col0 / tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

query I rowsort
SELECT + - 3 + 60 AS col1 FROM tab1 GROUP BY tab1.col0
----
57
57
57

onlyif mysql # DIV for integer division: 
query I rowsort label-1681
SELECT tab2.col2 DIV + 97 AS col0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1681
SELECT tab2.col2 / + 97 AS col0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - + 22 AS col0 FROM tab0 GROUP BY col0
----
-22

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1684
SELECT DISTINCT 18 DIV 21 AS col0 FROM tab2 cor0 GROUP BY col2
----
0

skipif mysql # not compatible
query I rowsort label-1684
SELECT DISTINCT 18 / 21 AS col0 FROM tab2 cor0 GROUP BY col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 51 col2 FROM tab2 GROUP BY tab2.col0
----
-51
-51
-51

onlyif mysql # DIV for integer division: 
query I rowsort label-1686
SELECT cor0.col0 * cor0.col0 + 38 DIV - 36 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
483
6723
783

skipif mysql # not compatible
query I rowsort label-1686
SELECT cor0.col0 * cor0.col0 + 38 / - 36 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
483
6723
783

query I rowsort
SELECT - 93 AS col0 FROM tab2 GROUP BY tab2.col2
----
-93
-93
-93

query I rowsort
SELECT DISTINCT 73 FROM tab0 GROUP BY col0
----
73

query I rowsort
SELECT 80 AS col2 FROM tab2 GROUP BY tab2.col1
----
80
80
80

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT + tab2.col2 * col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT + 54 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3132
-4266
-4698

onlyif mysql # DIV for integer division: 
query I rowsort label-1693
SELECT - cor1.col0 DIV - ( 21 ) + cor1.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
23
29
85

skipif mysql # not compatible
query I rowsort label-1693
SELECT - cor1.col0 / - ( 21 ) + cor1.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
23
29
85

query I rowsort
SELECT 7 FROM tab0 cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT DISTINCT + 5 FROM tab1 cor0 GROUP BY cor0.col0
----
5

query I rowsort
SELECT ALL - cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT + cor0.col1 * - cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
-1640
-3422
-3660

query I rowsort
SELECT DISTINCT + 71 * tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
3195
5041
568

query I rowsort
SELECT 41 FROM tab0 GROUP BY tab0.col1
----
41
41

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
0
6561

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT tab0.col2 + col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT 29 FROM tab1 GROUP BY tab1.col0
----
29
29
29

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1707
SELECT ALL + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1707
SELECT ALL + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 38 FROM tab0 GROUP BY tab0.col1
----
-38
-38

onlyif mysql # DIV for integer division: 
query I rowsort label-1709
SELECT DISTINCT + 90 DIV tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
2

skipif mysql # not compatible
query I rowsort label-1709
SELECT DISTINCT + 90 / tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
2

query I rowsort
SELECT DISTINCT + 21 AS col1 FROM tab1 GROUP BY tab1.col2
----
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 10 * + COALESCE ( cor0.col0, - cor0.col0 ) col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
220
280
820

query I rowsort
SELECT ALL - ( cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0
0

query I rowsort
SELECT + 38 FROM tab0 GROUP BY tab0.col0
----
38
38
38

query I rowsort
SELECT 47 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-24
2
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 2 * col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-158
-48
-76

onlyif mysql # DIV for integer division: 
query I rowsort label-1716
SELECT DISTINCT - 47 DIV + 16 + - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-10
-47
-73

skipif mysql # not compatible
query I rowsort label-1716
SELECT DISTINCT - 47 / + 16 + - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-10
-47
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 col0 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + 27 AS col2 FROM tab1 GROUP BY col1
----
27

onlyif mysql # DIV for integer division: 
query I rowsort label-1719
SELECT ALL 1 DIV cor0.col0 FROM tab2 cor0 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1719
SELECT ALL 1 / cor0.col0 FROM tab2 cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT + 36 AS col2 FROM tab0 GROUP BY tab0.col2
----
36
36
36

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-1722
SELECT + cor0.col1 DIV 43 FROM tab1 AS cor0 GROUP BY col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-1722
SELECT + cor0.col1 / 43 FROM tab1 AS cor0 GROUP BY col1
----
0
1
1

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 - col0 col2 FROM tab1 GROUP BY col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-1725
SELECT ALL tab2.col2 DIV - 19 col0 FROM tab2 GROUP BY tab2.col2
----
-3
-4
-4

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1725
SELECT ALL tab2.col2 / - 19 col0 FROM tab2 GROUP BY tab2.col2
----
-3
-4
-4

query I rowsort
SELECT ALL + col2 * + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL 30 FROM tab2 cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT cor0.col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
116
158
174

query I rowsort
SELECT 6 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
6
6
6

query I rowsort
SELECT ALL + col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2 HAVING NOT ( NULL ) <> NULL
----

query I rowsort
SELECT - 87 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-87
-87
-87

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1681
3481
3721

query I rowsort
SELECT ALL - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - 26 AS col0 FROM tab2, tab1 cor0 GROUP BY tab2.col2
----
-26
-26
-26

query I rowsort
SELECT - 27 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-27
-27
-27

query I rowsort
SELECT DISTINCT + 31 AS col0 FROM tab1 GROUP BY tab1.col2
----
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 35 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT - 78 + - 73 * + col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-4312
-5845
-6429

query I rowsort
SELECT + + 38 FROM tab1 GROUP BY tab1.col1
----
38
38
38

query I rowsort
SELECT - tab1.col0 * tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT - 2 FROM tab0 GROUP BY tab0.col2
----
-2
-2
-2

query I rowsort
SELECT DISTINCT - 33 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-33

query I rowsort
SELECT ALL - 56 FROM tab2 GROUP BY tab2.col0
----
-56
-56
-56

query I rowsort
SELECT DISTINCT - 92 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-92

query I rowsort
SELECT DISTINCT 77 + 97 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
174

query I rowsort
SELECT - 88 AS col2 FROM tab0 GROUP BY tab0.col1
----
-88
-88

query I rowsort
SELECT + - 78 AS col1 FROM tab1 GROUP BY tab1.col1
----
-78
-78
-78

query I rowsort
SELECT DISTINCT + 48 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-1751
SELECT + cor0.col2 DIV 9 FROM tab1 cor0 GROUP BY col2
----
0
5
7

skipif mysql # not compatible
query I rowsort label-1751
SELECT + cor0.col2 / 9 FROM tab1 cor0 GROUP BY col2
----
0
5
7

query I rowsort
SELECT DISTINCT 65 FROM tab1 cor0 GROUP BY cor0.col0
----
65

query I rowsort
SELECT + cor0.col0 * - 67 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1742
-2881
-5561

query I rowsort
SELECT + cor0.col0 * + 92 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2024
2576
7544

query I rowsort
SELECT ALL + 92 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
92
92
92

query I rowsort
SELECT ALL - ( 44 ) FROM tab0 GROUP BY col1
----
-44
-44

query I rowsort
SELECT DISTINCT 7 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
15
52
78

query I rowsort
SELECT - 32 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-32
-32
-32

query I rowsort
SELECT + + 79 AS col1 FROM tab2 GROUP BY tab2.col2
----
79
79
79

query I rowsort
SELECT - 16 FROM tab1 AS cor0 GROUP BY col0
----
-16
-16
-16

query I rowsort
SELECT DISTINCT - + 24 FROM tab2 GROUP BY col1
----
-24

query I rowsort
SELECT + 20 AS col2 FROM tab1 GROUP BY tab1.col1
----
20
20
20

query I rowsort
SELECT DISTINCT 91 FROM tab0 AS cor0 GROUP BY cor0.col0
----
91

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( - 70, cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
70

query I rowsort
SELECT ALL + 43 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2494
3397
3741

onlyif mysql # DIV for integer division: 
query I rowsort label-1766
SELECT DISTINCT + tab1.col0 DIV tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1

skipif mysql # not compatible
query I rowsort label-1766
SELECT DISTINCT + tab1.col0 / tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
-26
-43
-83

query I rowsort
SELECT ALL + 99 FROM tab1 GROUP BY tab1.col2
----
99
99
99

query I rowsort
SELECT ALL + 72 - + 13 FROM tab0 GROUP BY tab0.col2
----
59
59
59

query I rowsort
SELECT ALL + 37 FROM tab2 AS cor0 GROUP BY col2
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 13 * - 24 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
312
312
312

query I rowsort
SELECT - ( + col1 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-1773
SELECT DISTINCT - cor0.col1 DIV - 84 col2 FROM tab1 AS cor0 GROUP BY col1
----
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1773
SELECT DISTINCT - cor0.col1 / - 84 col2 FROM tab1 AS cor0 GROUP BY col1
----
0

query I rowsort
SELECT ALL + - 12 AS col0 FROM tab2 GROUP BY tab2.col2
----
-12
-12
-12

query I rowsort
SELECT 71 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5751

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1776
SELECT ALL cor0.col2 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1776
SELECT ALL cor0.col2 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-1777
SELECT DISTINCT cor0.col0 DIV - 76 + col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
22
28
81

skipif mysql # not compatible
query I rowsort label-1777
SELECT DISTINCT cor0.col0 / - 76 + col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
22
28
81

query I rowsort
SELECT - + 33 FROM tab0 GROUP BY tab0.col1
----
-33
-33

query I rowsort
SELECT ALL - 94 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-94
-94
-94

query I rowsort
SELECT ALL - ( + 52 ) FROM tab1 GROUP BY tab1.col2
----
-52
-52
-52

query I rowsort
SELECT - 9 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-9
-9
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
44
57
6

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col2, col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL + 1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT + tab2.col0 * tab2.col0 + + 72 AS col1 FROM tab2 GROUP BY tab2.col0
----
297
8353
8536

query I rowsort
SELECT ALL 82 FROM tab0 AS cor0 GROUP BY cor0.col2
----
82
82
82

onlyif mysql # DIV for integer division: 
query I rowsort label-1788
SELECT DISTINCT cor0.col0 * - cor0.col1 + cor0.col1 DIV - 9 col0 FROM tab1 AS cor0 GROUP BY col0, col1
----
-132
-1602
-3612

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1788
SELECT DISTINCT cor0.col0 * - cor0.col1 + cor0.col1 / - 9 col0 FROM tab1 AS cor0 GROUP BY col0, col1
----
-132
-1602
-3612

query I rowsort
SELECT ALL + col1 + - col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NULL
----
41
59
61

query I rowsort
SELECT DISTINCT - 60 FROM tab0 GROUP BY col2
----
-60

query I rowsort
SELECT 43 FROM tab0 GROUP BY tab0.col2
----
43
43
43

query I rowsort
SELECT ALL - 36 FROM tab1 GROUP BY col0
----
-36
-36
-36

query I rowsort
SELECT - 52 FROM tab1 GROUP BY tab1.col2
----
-52
-52
-52

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1849
676
6889

query I rowsort
SELECT - 80 - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-138
-159
-167

query I rowsort
SELECT ALL + 56 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, col2
----
-2520
-3976
-448

query I rowsort
SELECT DISTINCT 35 FROM tab0 GROUP BY tab0.col0
----
35

query I rowsort
SELECT + 92 FROM tab2 GROUP BY col0
----
92
92
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 - - tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL - col1 + tab2.col1 FROM tab2 GROUP BY col1
----
0
0
0

query I rowsort
SELECT + 88 * - col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3872
-5016
-528

query I rowsort
SELECT DISTINCT + 69 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
69

query I rowsort
SELECT DISTINCT 92 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
92

onlyif mysql # DIV for integer division: 
query I rowsort label-1806
SELECT DISTINCT + 82 DIV 92 FROM tab2 AS cor0 GROUP BY col0
----
0

skipif mysql # not compatible
query I rowsort label-1806
SELECT DISTINCT + 82 / 92 FROM tab2 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT 96 FROM tab0 GROUP BY tab0.col2
----
96
96
96

query I rowsort
SELECT DISTINCT cor0.col0 * 91 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
1365
8281
8372

query I rowsort
SELECT ALL 61 * ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
2684
3477
366

query I rowsort
SELECT DISTINCT + 63 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2583
-3717
-3843

query I rowsort
SELECT + ( + 50 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
50
50
50

onlyif mysql # DIV for integer division: 
query I rowsort label-1812
SELECT - col1 DIV + tab2.col1 FROM tab2 GROUP BY col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1812
SELECT - col1 / + tab2.col1 FROM tab2 GROUP BY col1
----
-1
-1
-1

query I rowsort
SELECT - 95 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-95
-95
-95

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 - 73 AS col1 FROM tab2 GROUP BY tab2.col0
----
-73
-73
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 84 col1 FROM tab1 GROUP BY tab1.col0
----
84
84
84

query I rowsort
SELECT ALL 69 FROM tab2 GROUP BY col2
----
69
69
69

query I rowsort
SELECT DISTINCT tab0.col1 * - 30 FROM tab0 GROUP BY tab0.col1
----
-2430
0

query I rowsort
SELECT + cor0.col2 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1260
176
5822

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 59 col0 FROM tab2 GROUP BY col1
----
-59
-59
-59

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1821
SELECT DISTINCT CAST( NULL AS SIGNED ) + col0 / - 12 FROM tab1 AS cor0 GROUP BY col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1821
SELECT DISTINCT CAST ( NULL AS INTEGER ) + col0 / - 12 FROM tab1 AS cor0 GROUP BY col0
----
NULL

query I rowsort
SELECT - + ( - cor0.col0 ) FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-1823
SELECT - - tab0.col2 DIV tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1823
SELECT - - tab0.col2 / tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT 52 + 53 AS col1 FROM tab0 GROUP BY col2
----
105

query I rowsort
SELECT ALL + cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT + 47 FROM tab2 GROUP BY col2
----
47

query I rowsort
SELECT + 31 * 92 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2852
2852
2852

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * 79 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
4582
6241
6873

query I rowsort
SELECT - 28 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-28
-28
-28

query I rowsort
SELECT - cor0.col1 + 57 * - NULLIF ( cor0.col0 * + cor0.col0 + - 77 * cor0.col2, cor0.col1 / + 88 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-138
-225891
308199

query I rowsort
SELECT ALL + 73 AS col0 FROM tab0 GROUP BY tab0.col0
----
73
73
73

query I rowsort
SELECT DISTINCT 68 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
68

query I rowsort
SELECT - cor0.col1 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT 17 * - 46 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-782
-782
-782

query I rowsort
SELECT - 9 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-198
-252
-738

query I rowsort
SELECT DISTINCT 54 FROM tab0 AS cor0 GROUP BY cor0.col0
----
54

query I rowsort
SELECT - tab2.col2 * - 84 + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
4930
6715
7395

query I rowsort
SELECT 94 * + 33 AS col1 FROM tab0 GROUP BY col0
----
3102
3102
3102

query I rowsort
SELECT - cor0.col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col2 + col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
102
150
170

query I rowsort
SELECT DISTINCT cor0.col1 + + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT - tab1.col2 + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 16 col1 FROM tab0 GROUP BY tab0.col1
----
-16
-16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 9 * tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
-369
-531
-549

query I rowsort
SELECT - 58 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-58
-58
-58

query I rowsort
SELECT ALL + 72 AS col2 FROM tab2 GROUP BY tab2.col0
----
72
72
72

query I rowsort
SELECT 14 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT ALL 7 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-38
-64

query I rowsort
SELECT DISTINCT + 71 AS col2 FROM tab0 GROUP BY tab0.col1
----
71

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab1 cor0 GROUP BY col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-1851
SELECT DISTINCT COALESCE ( - 7, cor0.col2 ) + - 41 * + NULLIF ( + cor0.col0 DIV cor0.col0, - 9 ) FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-48

skipif mysql # not compatible
query I rowsort label-1851
SELECT DISTINCT COALESCE ( - 7, cor0.col2 ) + - 41 * + NULLIF ( + cor0.col0 / cor0.col0, - 9 ) FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-48

query I rowsort
SELECT ALL - col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - tab1.col2 + + 64 FROM tab1 GROUP BY tab1.col2
----
-7
19
56

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1855
SELECT DISTINCT - + CAST( NULL AS SIGNED ) AS col2 FROM tab0 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1855
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY col1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 14 col2 FROM tab1 GROUP BY tab1.col2
----
-14
-14
-14

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
58
79
87

query I rowsort
SELECT - 20 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-20
-20
-20

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
----
0
162

query I rowsort
SELECT ALL 42 FROM tab1 GROUP BY tab1.col0
----
42
42
42

query I rowsort
SELECT - - tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT 17 FROM tab2 GROUP BY tab2.col1
----
17
17
17

onlyif mysql # DIV for integer division: 
query I rowsort label-1863
SELECT 22 DIV cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1863
SELECT 22 / cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT ALL cor0.col2 FROM tab2 cor0 GROUP BY col2, cor0.col0
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-1865
SELECT ALL cor0.col1 DIV 9 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
9

skipif mysql # not compatible
query I rowsort label-1865
SELECT ALL cor0.col1 / 9 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
9

query I rowsort
SELECT ALL + col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT 23 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT ALL + - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - cor0.col2 * - col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
1444
576
6241

query I rowsort
SELECT + 17 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT - + 85 FROM tab2 GROUP BY tab2.col2
----
-85
-85
-85

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 39 AS col0 FROM tab2 GROUP BY tab2.col1
----
39
39
39

onlyif mysql # DIV for integer division: 
query I rowsort label-1874
SELECT + + tab0.col0 DIV tab0.col0 + tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
27
44
84

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1874
SELECT + + tab0.col0 / tab0.col0 + tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
27
44
84

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1875
SELECT ALL CAST( + 59 AS SIGNED ) FROM tab2 GROUP BY col2
----
59
59
59

skipif mysql # not compatible
query I rowsort label-1875
SELECT ALL CAST ( + 59 AS INTEGER ) FROM tab2 GROUP BY col2
----
59
59
59

query I rowsort
SELECT + cor0.col1 * NULLIF ( + 75, + cor0.col1 * - cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
6075

query I rowsort
SELECT ALL 78 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT 2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
2
2
2

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1879
SELECT cor0.col0 * + CAST( NULL AS DECIMAL ) col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1879
SELECT cor0.col0 * + CAST ( NULL AS REAL ) col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 92 AS col2 FROM tab2 cor0 GROUP BY col0
----
92

query I rowsort
SELECT ALL + tab0.col1 - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT col0 - col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT ( NULL ) < NULL
----

query I rowsort
SELECT 23 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
104
23

query I rowsort
SELECT DISTINCT - 85 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-85

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT - cor0.col2 * + col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT 42 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
42
42
42

query I rowsort
SELECT DISTINCT 16 FROM tab1 AS cor0 GROUP BY cor0.col1
----
16

query I rowsort
SELECT cor0.col1 + col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT + tab0.col2 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - 12 FROM tab2 GROUP BY tab2.col2
----
-12
-12
-12

query I rowsort
SELECT 42 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
42
42
42

query I rowsort
SELECT - 63 FROM tab1 AS cor0 GROUP BY col1
----
-63
-63
-63

query I rowsort
SELECT ALL - + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT - cor0.col2 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2
-27
12

query I rowsort
SELECT ALL tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT 89 * cor0.col1 + + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7290

query I rowsort
SELECT DISTINCT 68 * 83 FROM tab0 AS cor0 GROUP BY cor0.col2
----
5644

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 DISTINCT + 19 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, cor0.col0
----
19

query I rowsort
SELECT cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 81 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT + 11 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
37
54
94

query I rowsort
SELECT DISTINCT + + 20 - + col1 FROM tab0 GROUP BY tab0.col1
----
-61
20

query I rowsort
SELECT ALL - 81 FROM tab0 AS cor0 GROUP BY col2
----
-81
-81
-81

query I rowsort
SELECT ALL + 37 FROM tab1 GROUP BY tab1.col1
----
37
37
37

query I rowsort
SELECT + 42 + col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
133
134
57

query I rowsort
SELECT + - 41 FROM tab1 GROUP BY tab1.col0
----
-41
-41
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 * 97 col2 FROM tab1 GROUP BY tab1.col0
----
2134
2716
7954

query I rowsort
SELECT cor0.col2 + col2 FROM tab0 cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT + 93 FROM tab1 AS cor0 GROUP BY cor0.col2
----
93
93
93

query I rowsort
SELECT ALL 8 FROM tab0 AS cor0 GROUP BY col1
----
8
8

onlyif mysql # DIV for integer division: 
query I rowsort label-1917
SELECT ALL - cor0.col0 DIV - col0 + + 35 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
36
36
36

skipif mysql # not compatible
query I rowsort label-1917
SELECT ALL - cor0.col0 / - col0 + + 35 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
36
36
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT + 49 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT DISTINCT - 48 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-48

query I rowsort
SELECT ALL 7 * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-154
-196
-574

query I rowsort
SELECT DISTINCT col0 * + col1 + + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
26
3526
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab0.col1 * - 82 col2 FROM tab0 GROUP BY tab0.col1
----
-6642
0

query I rowsort
SELECT + 47 FROM tab2 GROUP BY col2
----
47
47
47

onlyif mysql # DIV for integer division: 
query I rowsort label-1925
SELECT cor0.col0 DIV cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1925
SELECT cor0.col0 / cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT 47 * col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
1222
2021
3901

query I rowsort
SELECT - 35 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-35
-35
-35

query I rowsort
SELECT ALL - + 1 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

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 1 * - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 + 32 col1 FROM tab1 GROUP BY tab1.col2
----
103
40
77

query I rowsort
SELECT + tab2.col0 * - 7 AS col2 FROM tab2 GROUP BY col0
----
-105
-637
-644

query I rowsort
SELECT + - NULLIF ( + tab1.col0, tab1.col0 ) FROM tab1 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * tab1.col1 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT ALL col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT - 94 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-94

query I rowsort
SELECT DISTINCT + 61 AS col1 FROM tab0 GROUP BY tab0.col1
----
61

query I rowsort
SELECT DISTINCT + 27 FROM tab2 GROUP BY tab2.col0
----
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - ( + tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL 18 AS col2 FROM tab1 GROUP BY tab1.col0
----
18
18
18

query I rowsort
SELECT - ( - cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT col1 - col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT cor0.col2 - - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
105
121
67

query I rowsort
SELECT - 68 AS col2 FROM tab1 GROUP BY tab1.col2
----
-68
-68
-68

query I rowsort
SELECT + + 51 FROM tab1 GROUP BY tab1.col2
----
51
51
51

query I rowsort
SELECT 36 FROM tab0 GROUP BY tab0.col1
----
36
36

query I rowsort
SELECT 17 FROM tab2 GROUP BY tab2.col0
----
17
17
17

query I rowsort
SELECT ALL + tab1.col2 * col2 - - 75 * - tab1.col2 FROM tab1 GROUP BY col2
----
-1350
-284
-536

query I rowsort
SELECT ALL + 53 AS col0 FROM tab2 GROUP BY tab2.col1
----
53
53
53

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 80 * - col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2080
-3440
-6640

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 47 col2 FROM tab1 GROUP BY tab1.col1
----
-47

query I rowsort
SELECT DISTINCT cor0.col0 + + col0 AS col2 FROM tab1 cor0 GROUP BY col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 80 * tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
3600
5680
640

query I rowsort
SELECT + col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT - 98 + + cor1.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-41
-54
-92

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT col1 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT 5 - + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-53
-74
-82

query I rowsort
SELECT tab1.col2 * tab1.col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2070
5112
72

query I rowsort
SELECT DISTINCT - 27 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-27

query I rowsort
SELECT DISTINCT 11 FROM tab1 GROUP BY tab1.col0
----
11

query I rowsort
SELECT ALL + 69 AS col1 FROM tab0 GROUP BY tab0.col0
----
69
69
69

query I rowsort
SELECT ALL - + 56 FROM tab2 GROUP BY tab2.col2
----
-56
-56
-56

query I rowsort
SELECT - + 93 FROM tab2 GROUP BY tab2.col1
----
-93
-93
-93

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 9 * + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
396
513
54

query I rowsort
SELECT DISTINCT 5 FROM tab1 GROUP BY tab1.col1
----
5

query I rowsort
SELECT ALL - 20 AS col0 FROM tab1 GROUP BY tab1.col0
----
-20
-20
-20

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-41
-59
-61

query I rowsort
SELECT 42 + cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
124
64
70

query I rowsort
SELECT DISTINCT 38 - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-20
-41
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
118
122
82

onlyif mysql # DIV for integer division: 
query I rowsort label-1975
SELECT ALL + tab2.col2 DIV + 59 FROM tab2 GROUP BY tab2.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-1975
SELECT ALL + tab2.col2 / + 59 FROM tab2 GROUP BY tab2.col2
----
0
1
1

query I rowsort
SELECT ALL col0 * - tab0.col0 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT + col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-1979
SELECT ALL - + col1 + tab2.col1 DIV 61 AS col1 FROM tab2 GROUP BY col1
----
-41
-59
-60

skipif mysql # not compatible
query I rowsort label-1979
SELECT ALL - + col1 + tab2.col1 / 61 AS col1 FROM tab2 GROUP BY col1
----
-41
-59
-60

query I rowsort
SELECT DISTINCT + - 8 FROM tab2 GROUP BY tab2.col0
----
-8

query I rowsort
SELECT DISTINCT + ( - 8 ) AS col0 FROM tab0 GROUP BY tab0.col0
----
-8

query I rowsort
SELECT 1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT 9 FROM tab1 AS cor0 GROUP BY cor0.col1
----
9
9
9

query I rowsort
SELECT DISTINCT 59 + + col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
150
151
74

query I rowsort
SELECT - + 66 AS col2 FROM tab0 GROUP BY tab0.col1
----
-66
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 87 col1 FROM tab2 GROUP BY tab2.col1
----
-87
-87
-87

query I rowsort
SELECT DISTINCT - - COALESCE ( tab1.col1, - tab1.col1, tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-1988
SELECT - cor0.col0 DIV + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-1988
SELECT - cor0.col0 / + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-2
0

query I rowsort
SELECT ALL tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + tab0.col1 * 52 FROM tab0 GROUP BY tab0.col1
----
0
4212

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + + COALESCE ( 38, - tab2.col0 + - tab2.col2 ) * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1558
2242
2318

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab1.col1 * tab1.col1 col2 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT + + tab0.col0 * 93 FROM tab0 GROUP BY tab0.col0
----
2418
3999
7719

query I rowsort
SELECT DISTINCT 59 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
59

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - 12 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-12
-12
-12

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT ALL - + 62 * + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-2542
-3658
-3782

query I rowsort
SELECT ALL + 50 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
50
50
50

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

query I rowsort
SELECT DISTINCT + 8 FROM tab0 cor0 GROUP BY col0
----
8

query I rowsort
SELECT ALL 32 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT + 79 FROM tab1 cor0 GROUP BY cor0.col1
----
79
79
79

onlyif mysql # DIV for integer division: 
query I rowsort label-2004
SELECT DISTINCT cor0.col1 * COALESCE ( + 14, cor0.col2 DIV + cor0.col0 + cor0.col2, - cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
574
826
854

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2004
SELECT DISTINCT cor0.col1 * COALESCE ( + 14, cor0.col2 / + cor0.col0 + cor0.col2, - cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
574
826
854

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3422
6320
7656

query I rowsort
SELECT 92 AS col2 FROM tab0 GROUP BY tab0.col0
----
92
92
92

query I rowsort
SELECT DISTINCT - 76 AS col1 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor1.col0
----
-76

query I rowsort
SELECT DISTINCT + - col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + 95 AS col0 FROM tab1 GROUP BY tab1.col2
----
95

query I rowsort
SELECT 99 * 13 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1287
1287
1287

query I rowsort
SELECT ALL col0 + cor0.col0 * 96 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2134
2716
7954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 42 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT + col1 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT + NULLIF ( + col1, + cor0.col0 * + cor0.col1 ) - + 50 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-6
7

query I rowsort
SELECT + 38 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
38
38
38

query I rowsort
SELECT - col1 + + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
22
28
82

query I rowsort
SELECT DISTINCT - cor0.col0 - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
-164
-44
-56

query I rowsort
SELECT cor0.col2 + + COALESCE ( cor0.col1, ( + cor0.col1 ) ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
102
115
14

query I rowsort
SELECT cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col0
----
15
91
92

query I rowsort
SELECT - tab0.col1 - + 83 FROM tab0 GROUP BY tab0.col1
----
-164
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-2022
SELECT ALL + col1 DIV cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2022
SELECT ALL + col1 / cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT + tab0.col0 * col0 FROM tab0 GROUP BY col0
----
1849
676
6889

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - - tab0.col2 * COALESCE ( - 18, + tab0.col0 * CASE 98 WHEN - tab0.col0 THEN NULL WHEN - tab0.col2 - tab0.col2 * tab0.col2 THEN NULL WHEN + tab0.col2 THEN tab0.col1 * tab0.col0 ELSE NULL END, tab0.col1 ) FROM tab0 GROUP BY col2
----
-1422
-432
-684

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT - col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT - + ( tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL = NULL
----

query I rowsort
SELECT ALL + col2 FROM tab0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + 21 + - 61 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1565
-2602
-5042

query I rowsort
SELECT ALL - 17 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-17
-17
-17

query I rowsort
SELECT ALL 3 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT + 31 * - 71 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2201
-2201
-2201

query I rowsort
SELECT - 5 + - 44 FROM tab2 GROUP BY tab2.col2
----
-49
-49
-49

query I rowsort
SELECT - 82 AS col1 FROM tab1 GROUP BY tab1.col0
----
-82
-82
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 47 FROM tab2 AS cor0 GROUP BY cor0.col2
----
47

query I rowsort
SELECT + 59 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
59
59
59

query I rowsort
SELECT - ( + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + cor0.col0 FROM tab2 cor0 GROUP BY col0, cor0.col1
----
15
91
92

query I rowsort
SELECT DISTINCT + + tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col1 + tab1.col1 * + col1 col1 FROM tab1 GROUP BY col1
----
1892
30
3192

query I rowsort
SELECT ALL - 64 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-64
-64

query I rowsort
SELECT - - tab1.col2 * 94 FROM tab1 GROUP BY tab1.col2
----
4230
6674
752

query I rowsort
SELECT ( - 62 ) + + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-1
-21
-3

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0
0

query I rowsort
SELECT DISTINCT - + col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + 4 AS col0 FROM tab1 GROUP BY tab1.col1
----
4

query I rowsort
SELECT 73 AS col2 FROM tab0 GROUP BY tab0.col2
----
73
73
73

query I rowsort
SELECT - + 56 AS col2 FROM tab1 GROUP BY tab1.col2
----
-56
-56
-56

query I rowsort
SELECT col0 * 45 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
4095
4140
675

query I rowsort
SELECT DISTINCT cor0.col0 * - 34 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-2706
-726
-924

query I rowsort
SELECT DISTINCT - 24 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-24

query I rowsort
SELECT ALL cor0.col1 * 66 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2904
3762
396

query I rowsort
SELECT DISTINCT 68 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
2788
4012
4148

query I rowsort
SELECT + tab0.col0 * 72 AS col0 FROM tab0 GROUP BY tab0.col0
----
1872
3096
5976

query I rowsort
SELECT ALL - cor0.col0 * + 72 FROM tab2 cor0 GROUP BY cor0.col0
----
-1080
-6552
-6624

query I rowsort
SELECT DISTINCT - ( + 77 ) FROM tab2 GROUP BY tab2.col1
----
-77

query I rowsort
SELECT DISTINCT - 33 AS col2 FROM tab1 GROUP BY tab1.col2
----
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 39 - 3 col1 FROM tab0 GROUP BY tab0.col0
----
36
36
36

query I rowsort
SELECT - 62 AS col1 FROM tab0 GROUP BY tab0.col2
----
-62
-62
-62

onlyif mysql # DIV for integer division: 
query I rowsort label-2064
SELECT DISTINCT + - tab1.col2 DIV - col2 + col2 DIV 84 FROM tab1 GROUP BY col2
----
1

skipif mysql # not compatible
query I rowsort label-2064
SELECT DISTINCT + - tab1.col2 / - col2 + col2 / 84 FROM tab1 GROUP BY col2
----
1

query I rowsort
SELECT DISTINCT - + 46 AS col1 FROM tab0 GROUP BY tab0.col2
----
-46

query I rowsort
SELECT DISTINCT + tab2.col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - - 36 FROM tab2 GROUP BY tab2.col1
----
36
36
36

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2068
SELECT CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2068
SELECT CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

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 ALL + 29 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
29
29
29

query I rowsort
SELECT 4 + - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-77
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 5 col0 FROM tab0 GROUP BY col1
----
5

query I rowsort
SELECT DISTINCT CASE - 70 WHEN - col2 - cor0.col2 THEN NULL WHEN + cor0.col2 THEN cor0.col0 END AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
NULL

query I rowsort
SELECT ALL - col1 AS col2 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - 55 AS col1 FROM tab1 GROUP BY col1
----
-55

query I rowsort
SELECT DISTINCT + - 75 FROM tab2 GROUP BY col2
----
-75

query I rowsort
SELECT ALL cor0.col1 * - 93 FROM tab2 cor0 GROUP BY cor0.col1, col1
----
-3813
-5487
-5673

query I rowsort
SELECT - col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-58
-79
-87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2079
SELECT - CAST( 50 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-50
-50
-50

skipif mysql # not compatible
query I rowsort label-2079
SELECT - CAST ( 50 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-50
-50
-50

query I rowsort
SELECT DISTINCT - 55 + + tab2.col1 FROM tab2 GROUP BY col1
----
-14
4
6

query I rowsort
SELECT cor0.col0 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
22
28
82

query I rowsort
SELECT DISTINCT - cor0.col0 + 91 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
63
69
9

query I rowsort
SELECT - 84 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-84
-84
-84

query I rowsort
SELECT 77 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, col0
----
77
77
77

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 13 col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-13
-13
-13

onlyif mysql # DIV for integer division: 
query I rowsort label-2087
SELECT - cor0.col2 DIV cor0.col2 AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2087
SELECT - cor0.col2 / cor0.col2 AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + cor0.col0 * + 44 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
1232
3608
968

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 WHERE NOT NULL > NULL GROUP BY cor0.col2
----

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NULL
----
45
71
8

query I rowsort
SELECT DISTINCT + 38 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
38

query I rowsort
SELECT DISTINCT - 60 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-60

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL - + 13 AS col2 FROM tab1 GROUP BY tab1.col2
----
-13
-13
-13

query I rowsort
SELECT - - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + 90 FROM tab0 AS cor0 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT - - 64 FROM tab1 GROUP BY tab1.col2
----
64
64
64

query I rowsort
SELECT + + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT + + col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL + cor0.col2 * + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2025
5041
64

query I rowsort
SELECT ALL - 28 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-2
15
55

query I rowsort
SELECT - 16 AS col2 FROM tab2 GROUP BY tab2.col0
----
-16
-16
-16

query I rowsort
SELECT 23 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
104
23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2105
SELECT ALL + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2105
SELECT ALL + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 12 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-12
-12
-12

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0, col1
----
-132
-1596
-3608

query I rowsort
SELECT - cor0.col2 * + 60 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1440
-2280
-4740

query I rowsort
SELECT 53 FROM tab1 GROUP BY tab1.col2
----
53
53
53

query I rowsort
SELECT + - 73 FROM tab2 GROUP BY tab2.col2
----
-73
-73
-73

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT ( cor0.col2 ) FROM tab1 AS cor0 GROUP BY col0, col2
----
45
71
8

query I rowsort
SELECT 1 * + col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT 19 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
19
19
19

query I rowsort
SELECT 73 * + 20 FROM tab1 GROUP BY tab1.col0
----
1460
1460
1460

query I rowsort
SELECT - - 91 AS col2 FROM tab1 GROUP BY tab1.col0
----
91
91
91

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2025
-5041
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 50 col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
50

query I rowsort
SELECT DISTINCT NULLIF ( - cor0.col0, 20 ) * cor0.col0 + ( + 95 ) FROM tab0 cor0 GROUP BY cor0.col0
----
-1754
-581
-6794

query I rowsort
SELECT DISTINCT - + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - 40 FROM tab0 cor0 GROUP BY cor0.col1
----
-40
-40

query I rowsort
SELECT ALL - 21 FROM tab1 cor0 GROUP BY cor0.col1
----
-21
-21
-21

query I rowsort
SELECT DISTINCT + 5 FROM tab0 GROUP BY tab0.col0
----
5

query I rowsort
SELECT DISTINCT + 69 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col0 + col0 * - 73 col1 FROM tab0 GROUP BY tab0.col0
----
-1924
-3182
-6142

query I rowsort
SELECT - - 97 FROM tab2 GROUP BY tab2.col1
----
97
97
97

query I rowsort
SELECT cor0.col0 * 63 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
5733
5796
945

query I rowsort
SELECT col1 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT - + tab1.col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 18 FROM tab0 GROUP BY tab0.col0
----
18

query I rowsort
SELECT ALL - 77 FROM tab0 GROUP BY tab0.col2
----
-77
-77
-77

query I rowsort
SELECT DISTINCT + + 48 FROM tab0 GROUP BY col1
----
48

query I rowsort
SELECT - + tab2.col2 * - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT cor0.col1 + - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT + ( - tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - + tab1.col2 * 53 FROM tab1 GROUP BY col2
----
-2385
-3763
-424

query I rowsort
SELECT DISTINCT 53 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
53

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6480

query I rowsort
SELECT - - col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL + 98 + 68 FROM tab2 GROUP BY tab2.col2
----
166
166
166

query I rowsort
SELECT 30 FROM tab0 AS cor0 GROUP BY col2
----
30
30
30

query I rowsort
SELECT DISTINCT 59 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
59

query I rowsort
SELECT ALL + + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL + - tab2.col2 + 97 AS col1 FROM tab2 GROUP BY tab2.col2
----
10
18
39

query I rowsort
SELECT ALL + cor0.col2 * 96 FROM tab0 AS cor0 GROUP BY col2
----
2304
3648
7584

query I rowsort
SELECT cor0.col1 + 47 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
128
47

query I rowsort
SELECT + 78 AS col1 FROM tab0 GROUP BY col2
----
78
78
78

query I rowsort
SELECT - 40 FROM tab2 GROUP BY tab2.col0
----
-40
-40
-40

query I rowsort
SELECT + 11 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
11
11
11

query I rowsort
SELECT - cor0.col1 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT + - tab0.col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 29 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT - 75 FROM tab1 AS cor0 GROUP BY col1
----
-75
-75
-75

onlyif mysql # DIV for integer division: 
query I rowsort label-2154
SELECT ALL - 85 DIV tab2.col1 + + 13 AS col0 FROM tab2 GROUP BY tab2.col1
----
11
12
12

skipif mysql # not compatible
query I rowsort label-2154
SELECT ALL - 85 / tab2.col1 + + 13 AS col0 FROM tab2 GROUP BY tab2.col1
----
11
12
12

query I rowsort
SELECT DISTINCT + 71 FROM tab1 AS cor0 GROUP BY cor0.col0
----
71

query I rowsort
SELECT + 42 FROM tab1 cor0 GROUP BY cor0.col0
----
42
42
42

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2157
SELECT ALL - - CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2157
SELECT ALL - - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2158
SELECT DISTINCT CAST( col2 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif mysql # not compatible
query I rowsort label-2158
SELECT DISTINCT CAST ( col2 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 61 * - cor0.col1 col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-2501
-3599
-3721

query I rowsort
SELECT DISTINCT 82 FROM tab1 AS cor0 GROUP BY cor0.col0
----
82

query I rowsort
SELECT - + tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 21 * - 64 AS col0 FROM tab2 GROUP BY tab2.col0
----
1344
1344
1344

query I rowsort
SELECT 13 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
13
13
13

query I rowsort
SELECT - cor0.col0 * + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0 HAVING NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT + 38 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
38

query I rowsort
SELECT 14 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
14
14
14

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( - 97, + cor0.col1 + NULLIF ( + cor0.col0 + - cor0.col0, cor0.col0 ) ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-97
-97
-97

query I rowsort
SELECT DISTINCT 99 AS col2 FROM tab2 GROUP BY tab2.col0
----
99

query I rowsort
SELECT col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - cor0.col0 + + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 7 + 65 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
72
72
72

query I rowsort
SELECT DISTINCT 63 FROM tab2 AS cor0 GROUP BY cor0.col0
----
63

query I rowsort
SELECT - 24 FROM tab0 GROUP BY tab0.col2
----
-24
-24
-24

onlyif mysql # DIV for integer division: 
query I rowsort label-2175
SELECT DISTINCT cor0.col0 DIV - cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-1

skipif mysql # not compatible
query I rowsort label-2175
SELECT DISTINCT cor0.col0 / - cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-1

query I rowsort
SELECT 81 AS col2 FROM tab2 GROUP BY tab2.col1
----
81
81
81

query I rowsort
SELECT - 68 + 35 FROM tab0 GROUP BY tab0.col1
----
-33
-33

query I rowsort
SELECT DISTINCT + + 61 FROM tab0 GROUP BY tab0.col0
----
61

query I rowsort
SELECT 15 * 49 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
735
735
735

query I rowsort
SELECT ALL - 94 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-94
-94
-94

query I rowsort
SELECT ALL 98 FROM tab2 cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT ALL 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 DISTINCT col0 + + tab0.col0 col1 FROM tab0 GROUP BY tab0.col0
----
166
52
86

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2184
SELECT DISTINCT - CAST( NULL AS DECIMAL ) + NULLIF ( 48, tab0.col1 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-2184
SELECT DISTINCT - CAST ( NULL AS REAL ) + NULLIF ( 48, tab0.col1 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + + tab1.col1 * COALESCE ( 23, tab1.col0 * 50 ) FROM tab1 GROUP BY tab1.col1
----
1012
1311
138

query I rowsort
SELECT ALL 38 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
38
38
38

query I rowsort
SELECT DISTINCT - 79 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
-79

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY col0, col1, cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-2189
SELECT tab0.col2 + - tab0.col2 DIV - col2 FROM tab0 GROUP BY tab0.col2
----
25
39
80

skipif mysql # not compatible
query I rowsort label-2189
SELECT tab0.col2 + - tab0.col2 / - col2 FROM tab0 GROUP BY tab0.col2
----
25
39
80

onlyif mysql # DIV for integer division: 
query I rowsort label-2190
SELECT DISTINCT tab2.col0 DIV - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-1

skipif mysql # not compatible
query I rowsort label-2190
SELECT DISTINCT tab2.col0 / - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-1

query I rowsort
SELECT ALL + + col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT - tab2.col1 * - 41 FROM tab2 GROUP BY tab2.col1
----
1681
2419
2501

query I rowsort
SELECT 84 AS col2 FROM tab0 GROUP BY tab0.col1
----
84
84

query I rowsort
SELECT DISTINCT 58 FROM tab2 GROUP BY tab2.col0
----
58

query I rowsort
SELECT DISTINCT cor0.col1 * - 56 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-4536
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2196
SELECT cor0.col0 DIV 3 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
30
30
5

skipif mysql # not compatible
query I rowsort label-2196
SELECT cor0.col0 / 3 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
30
30
5

query I rowsort
SELECT - cor0.col1 + - 61 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-105
-118
-67

query I rowsort
SELECT + + 19 AS col0 FROM tab1 GROUP BY tab1.col2
----
19
19
19

query I rowsort
SELECT + + 74 AS col0 FROM tab2 GROUP BY tab2.col2
----
74
74
74

query I rowsort
SELECT ALL 83 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-1826
-2324
-6806

query I rowsort
SELECT - tab0.col0 * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL - 85 - - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-28
-41
-79

query I rowsort
SELECT DISTINCT - - tab1.col1 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT ALL - 45 AS col2 FROM tab1 GROUP BY tab1.col1
----
-45
-45
-45

query I rowsort
SELECT + 50 * 76 FROM tab2 cor0 GROUP BY cor0.col0
----
3800
3800
3800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 70 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
70
70
70

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT - 46 - + 37 AS col2 FROM tab1 GROUP BY col0
----
-83
-83
-83

query I rowsort
SELECT DISTINCT - 15 AS col1 FROM tab2 GROUP BY col2
----
-15

query I rowsort
SELECT ( 23 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
23
23
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 4 - 43 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1, cor0.col1
----
-39

query I rowsort
SELECT 51 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
51
51
51

query I rowsort
SELECT ALL col2 + - 35 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, col0
----
-11
3
44

query I rowsort
SELECT DISTINCT + 10 FROM tab1 GROUP BY tab1.col2
----
10

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT + col0 * tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT - COALESCE ( cor0.col1, cor0.col1 ) FROM tab0 AS cor0 GROUP BY col0, col1
----
-81
0

query I rowsort
SELECT - 98 * + 95 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-9310
-9310
-9310

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 12 col0 FROM tab2 GROUP BY tab2.col1
----
-12
-12
-12

query I rowsort
SELECT - 99 AS col1 FROM tab2 GROUP BY col0
----
-99
-99
-99

query I rowsort
SELECT 5 FROM tab0 AS cor0 GROUP BY cor0.col0
----
5
5
5

query I rowsort
SELECT ALL 40 * 19 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
760
760
760

onlyif mysql # DIV for integer division: 
query I rowsort label-2224
SELECT 49 DIV tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-2224
SELECT 49 / tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2226
SELECT ALL CAST( NULL AS SIGNED ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2226
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 * - tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - + col1 * tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT ALL + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2 HAVING NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL - 76 AS col1 FROM tab0 GROUP BY col2
----
-76
-76
-76

onlyif mysql # DIV for integer division: 
query I rowsort label-2232
SELECT DISTINCT + - tab1.col2 DIV - tab1.col2 FROM tab1 GROUP BY col2
----
1

skipif mysql # not compatible
query I rowsort label-2232
SELECT DISTINCT + - tab1.col2 / - tab1.col2 FROM tab1 GROUP BY col2
----
1

query I rowsort
SELECT 51 FROM tab1 GROUP BY tab1.col2
----
51
51
51

query I rowsort
SELECT ALL 70 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
70
70
70

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2235
SELECT ALL + CAST( NULL AS SIGNED ) + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2235
SELECT ALL + CAST ( NULL AS INTEGER ) + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 42 * - cor0.col1 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1814
2569
2577

query I rowsort
SELECT DISTINCT 82 AS col2 FROM tab2 GROUP BY tab2.col2
----
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 78 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
78
78
78

query I rowsort
SELECT - cor0.col1 * + 57 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2337
-3363
-3477

query I rowsort
SELECT ALL + 85 AS col2 FROM tab2 GROUP BY tab2.col1
----
85
85
85

query I rowsort
SELECT - 84 * 50 AS col1 FROM tab0 GROUP BY tab0.col0
----
-4200
-4200
-4200

query I rowsort
SELECT DISTINCT 39 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
39

query I rowsort
SELECT + 2 FROM tab0 cor0 GROUP BY cor0.col0
----
2
2
2

query I rowsort
SELECT - 96 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-17
-58
-72

query I rowsort
SELECT - 61 AS col0 FROM tab1 GROUP BY tab1.col2
----
-61
-61
-61

query I rowsort
SELECT DISTINCT cor0.col1 * col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
2378
4661
5307

query I rowsort
SELECT 67 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
67
67

query I rowsort
SELECT DISTINCT + 40 FROM tab0 AS cor0 GROUP BY cor0.col1
----
40

query I rowsort
SELECT ALL + 33 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
33
33
33

query I rowsort
SELECT DISTINCT 7 AS col0 FROM tab0 cor0 GROUP BY col1
----
7

query I rowsort
SELECT - + 44 - 77 AS col1 FROM tab1 GROUP BY tab1.col2
----
-121
-121
-121

query I rowsort
SELECT DISTINCT + 71 + tab0.col2 * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1373
-505
-6170

query I rowsort
SELECT DISTINCT + 52 + - col1 FROM tab2 GROUP BY tab2.col1
----
-7
-9
11

query I rowsort
SELECT DISTINCT - 67 AS col0 FROM tab1 GROUP BY col2
----
-67

onlyif mysql # DIV for integer division: 
query I rowsort label-2255
SELECT + - tab1.col2 DIV + tab1.col2 + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
44
7
70

skipif mysql # not compatible
query I rowsort label-2255
SELECT + - tab1.col2 / + tab1.col2 + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
44
7
70

query I rowsort
SELECT DISTINCT - 56 AS col0 FROM tab2 GROUP BY tab2.col2
----
-56

onlyif mysql # DIV for integer division: 
query I rowsort label-2257
SELECT - cor0.col0 DIV cor0.col1 + col1 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
3
43
57

skipif mysql # not compatible
query I rowsort label-2257
SELECT - cor0.col0 / cor0.col1 + col1 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
3
43
57

query I rowsort
SELECT ALL + 10 + - 94 FROM tab0 GROUP BY tab0.col1
----
-84
-84

onlyif mysql # DIV for integer division: 
query I rowsort label-2259
SELECT col2 DIV - 15 FROM tab0 GROUP BY tab0.col2
----
-1
-2
-5

skipif mysql # not compatible
query I rowsort label-2259
SELECT col2 / - 15 FROM tab0 GROUP BY tab0.col2
----
-1
-2
-5

query I rowsort
SELECT - cor0.col2 * - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT DISTINCT - 75 FROM tab2 GROUP BY col0
----
-75

query I rowsort
SELECT ALL - 16 FROM tab2 GROUP BY tab2.col2
----
-16
-16
-16

query I rowsort
SELECT + 95 FROM tab2 GROUP BY col0
----
95
95
95

query I rowsort
SELECT DISTINCT - 70 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL + 42 * - 32 FROM tab1 GROUP BY tab1.col2
----
-1344
-1344
-1344

query I rowsort
SELECT - 79 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-79
-79
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-2270
SELECT DISTINCT cor0.col2 DIV + cor0.col0 + ( cor0.col2 + col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
108
121
67

skipif mysql # not compatible
query I rowsort label-2270
SELECT DISTINCT cor0.col2 / + cor0.col0 + ( cor0.col2 + col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
108
121
67

query I rowsort
SELECT ALL 37 FROM tab0 GROUP BY tab0.col0
----
37
37
37

query I rowsort
SELECT DISTINCT - 58 AS col2 FROM tab0 GROUP BY tab0.col1
----
-58

query I rowsort
SELECT + tab0.col0 + 45 FROM tab0 GROUP BY tab0.col0
----
128
71
88

query I rowsort
SELECT tab0.col2 * - tab0.col2 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT tab1.col0 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT - 26 FROM tab2 cor0 GROUP BY cor0.col0
----
-26
-26
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 35 * col0 + - 85 * tab1.col0 col1 FROM tab1 GROUP BY col0
----
-1100
-1400
-4100

query I rowsort
SELECT 44 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1232
3608
968

query I rowsort
SELECT + 33 * + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
1452
1881
198

query I rowsort
SELECT ALL - - ( + 6 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
6
6
6

query I rowsort
SELECT ALL + + 91 * + tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
0
7371

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + col0 + + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
182
184
30

query I rowsort
SELECT - tab2.col0 * 38 FROM tab2 GROUP BY tab2.col0
----
-3458
-3496
-570

query I rowsort
SELECT ALL col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 26 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
26

onlyif mysql # DIV for integer division: 
query I rowsort label-2287
SELECT cor0.col0 DIV - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2287
SELECT cor0.col0 / - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL - cor0.col0 * - 42 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3822
3864
630

query I rowsort
SELECT cor0.col2 * + col0 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
1305
184
5893

query I rowsort
SELECT DISTINCT - 28 FROM tab2 GROUP BY tab2.col0
----
-28

query I rowsort
SELECT DISTINCT 86 FROM tab1 AS cor0 GROUP BY cor0.col2
----
86

query I rowsort
SELECT - 28 + + cor0.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor0.col2
----
30
51
59

query I rowsort
SELECT - + 51 + 87 FROM tab0 GROUP BY tab0.col1
----
36
36

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - ( 23 ), + cor0.col1 * 73, + cor0.col2 ) * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1035
-1633
-184

query I rowsort
SELECT DISTINCT + - 24 AS col2 FROM tab2 GROUP BY tab2.col1
----
-24

query I rowsort
SELECT - 37 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-37
-37
-37

query I rowsort
SELECT ALL + 30 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
30
30
30

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 53, + cor0.col1, col1, 72 ) * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1166
1484
4346

query I rowsort
SELECT ALL - + 17 AS col1 FROM tab0 GROUP BY tab0.col1
----
-17
-17

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( - 72, cor0.col1, - cor0.col1 + cor0.col2 * cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col0
----
-72

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + tab0.col2 * 52 AS col2 FROM tab0 GROUP BY tab0.col2
----
1248
1976
4108

onlyif mysql # DIV for integer division: 
query I rowsort label-2303
SELECT COALESCE ( - 79, - cor0.col2 DIV col0, NULLIF ( col2, cor0.col2 ) ) DIV 92 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2303
SELECT COALESCE ( - 79, - cor0.col2 / col0, NULLIF ( col2, cor0.col2 ) ) / 92 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-2305
SELECT DISTINCT - - 1 DIV + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
0

skipif mysql # not compatible
query I rowsort label-2305
SELECT DISTINCT - - 1 / + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT ALL 84 AS col1 FROM tab0 GROUP BY tab0.col2
----
84
84
84

query I rowsort
SELECT + - tab1.col0 + + 19 AS col0 FROM tab1 GROUP BY col0
----
-3
-63
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 18 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT ALL + 23 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
23
23
23

onlyif mysql # DIV for integer division: 
query I rowsort label-2310
SELECT DISTINCT + col0 DIV - cor0.col1 - cor0.col1 * + 33 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1453
-1881
-201

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2310
SELECT DISTINCT + col0 / - cor0.col1 - cor0.col1 * + 33 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1453
-1881
-201

query I rowsort
SELECT DISTINCT tab1.col1 + tab1.col1 * + 43 FROM tab1 GROUP BY tab1.col1
----
1936
2508
264

query I rowsort
SELECT DISTINCT + 47 AS col2 FROM tab1 GROUP BY tab1.col2
----
47

query I rowsort
SELECT ALL + 37 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
37
37
37

query I rowsort
SELECT 65 AS col1 FROM tab0 GROUP BY tab0.col2
----
65
65
65

query I rowsort
SELECT + 65 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-14
-22
7

onlyif mysql # DIV for integer division: 
query I rowsort label-2316
SELECT + col2 DIV - 77 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2316
SELECT + col2 / - 77 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
0
0

query I rowsort
SELECT ALL ( + 53 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT DISTINCT - 16 FROM tab0 GROUP BY tab0.col0
----
-16

query I rowsort
SELECT ALL - 35 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-35
-35
-35

query I rowsort
SELECT + + tab1.col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT 80 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 55 col1 FROM tab2 AS cor0 GROUP BY col2
----
-55
-55
-55

query I rowsort
SELECT DISTINCT + - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + 17 FROM tab1 AS cor0 GROUP BY col1
----
17

query I rowsort
SELECT DISTINCT - - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 23 FROM tab2 GROUP BY tab2.col2
----
-23

query I rowsort
SELECT ALL col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL - tab1.col1 * + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL - col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - tab1.col1 + - tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
-114
-12
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col2 col2 FROM tab2 WHERE NULL IS NOT NULL GROUP BY tab2.col2 HAVING NULL = NULL
----

query I rowsort
SELECT ALL 34 FROM tab0 AS cor0 GROUP BY col2
----
34
34
34

query I rowsort
SELECT DISTINCT 99 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
99

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1 HAVING NULL IS NULL
----
41
59
61

query I rowsort
SELECT DISTINCT + + 38 AS col1 FROM tab2 GROUP BY tab2.col0
----
38

query I rowsort
SELECT + 14 - + tab0.col1 * + tab0.col1 AS col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
-6547
14

query I rowsort
SELECT 71 AS col1 FROM tab1 GROUP BY tab1.col1
----
71
71
71

query I rowsort
SELECT 37 FROM tab0 GROUP BY tab0.col1
----
37
37

query I rowsort
SELECT 20 AS col0 FROM tab1 GROUP BY tab1.col1
----
20
20
20

query I rowsort
SELECT 72 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
117
143
80

query I rowsort
SELECT cor0.col2 * 21 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
1491
168
945

query I rowsort
SELECT DISTINCT + - tab1.col2 * 26 AS col0 FROM tab1 GROUP BY tab1.col2
----
-1170
-1846
-208

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 90 col2 FROM tab0 GROUP BY tab0.col2
----
90

query I rowsort
SELECT - + ( + col2 ) AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-2345
SELECT + tab2.col2 * COALESCE ( 15, tab2.col2 + + ( tab2.col1 ) DIV + tab2.col0 ) FROM tab2 GROUP BY tab2.col2
----
1185
1305
870

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2345
SELECT + tab2.col2 * COALESCE ( 15, tab2.col2 + + ( tab2.col1 ) / + tab2.col0 ) FROM tab2 GROUP BY tab2.col2
----
1185
1305
870

query I rowsort
SELECT DISTINCT - 81 + - 29 FROM tab2 cor0 GROUP BY cor0.col0, col2
----
-110

query I rowsort
SELECT ALL 91 * + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
2184
3458
7189

query I rowsort
SELECT ALL cor0.col1 + + 45 FROM tab0 AS cor0 GROUP BY cor0.col1
----
126
45

query I rowsort
SELECT DISTINCT cor0.col0 + 76 FROM tab0 AS cor0 GROUP BY cor0.col0
----
102
119
159

query I rowsort
SELECT 91 FROM tab0 GROUP BY tab0.col2
----
91
91
91

onlyif mysql # DIV for integer division: 
query I rowsort label-2351
SELECT 16 * + cor0.col1 + + 76 DIV + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
108
705
913

skipif mysql # not compatible
query I rowsort label-2351
SELECT 16 * + cor0.col1 + + 76 / + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
108
705
913

query I rowsort
SELECT ALL + + 78 FROM tab2 GROUP BY tab2.col0
----
78
78
78

query I rowsort
SELECT 21 FROM tab1 AS cor0 GROUP BY col1
----
21
21
21

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT DISTINCT + - 51 AS col1 FROM tab0 GROUP BY tab0.col2
----
-51

query I rowsort
SELECT ALL + 96 * + 3 AS col0 FROM tab1 GROUP BY tab1.col2
----
288
288
288

query I rowsort
SELECT - cor0.col0 + 8 FROM tab0 AS cor0 GROUP BY col0
----
-18
-35
-75

onlyif mysql # DIV for integer division: 
query I rowsort label-2358
SELECT + tab1.col0 DIV tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2358
SELECT + tab1.col0 / tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT DISTINCT tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT 47 FROM tab2 AS cor0 GROUP BY cor0.col1
----
47

query I rowsort
SELECT 2 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
2
2
2

query I rowsort
SELECT ALL + 82 FROM tab0 GROUP BY tab0.col0
----
82
82
82

query I rowsort
SELECT + 1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT ALL col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
26
43
83

query I rowsort
SELECT 82 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
82
82

query I rowsort
SELECT ALL + 23 AS col2 FROM tab0 GROUP BY tab0.col1
----
23
23

query I rowsort
SELECT ALL - 56 FROM tab0 GROUP BY tab0.col1
----
-56
-56

query I rowsort
SELECT + ( cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 24 FROM tab0 GROUP BY tab0.col1
----
24
24

query I rowsort
SELECT 7 FROM tab1 GROUP BY tab1.col1
----
7
7
7

query I rowsort
SELECT - 9 FROM tab0 GROUP BY tab0.col2
----
-9
-9
-9

query I rowsort
SELECT ALL - ( - cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 56 * - 47 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2632

query I rowsort
SELECT DISTINCT - 19 * cor0.col1 + - 17 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1556
-17

onlyif mysql # DIV for integer division: 
query I rowsort label-2375
SELECT ALL + tab2.col0 DIV tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2375
SELECT ALL + tab2.col0 / tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT ALL + - tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-15
-91
-92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2377
SELECT ALL + tab2.col2 * - CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2377
SELECT ALL + tab2.col2 * - CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 60 AS col1 FROM tab1 GROUP BY col0
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 75 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL - 61 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-61
-61
-61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2383
SELECT ALL CAST( 56 AS SIGNED ) * col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3248
4424
4872

skipif mysql # not compatible
query I rowsort label-2383
SELECT ALL CAST ( 56 AS INTEGER ) * col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3248
4424
4872

query I rowsort
SELECT ALL + + 57 FROM tab2 GROUP BY tab2.col1
----
57
57
57

query I rowsort
SELECT ALL + 43 - + 95 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
-52
-52
-52

onlyif mysql # DIV for integer division: 
query I rowsort label-2386
SELECT - 51 DIV + 37 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2386
SELECT - 51 / + 37 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
-1
-1
-1

query I rowsort
SELECT - cor0.col1 * COALESCE ( cor0.col0, - cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-132
-1596
-3608

query I rowsort
SELECT ALL + col1 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-2389
SELECT ALL 63 DIV 45 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2389
SELECT ALL 63 / 45 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
1
1

query I rowsort
SELECT tab0.col0 * - col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT + - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT + col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT 98 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT DISTINCT - 25 AS col1 FROM tab0 GROUP BY col0
----
-25

query I rowsort
SELECT - 69 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-127
-148
-156

query I rowsort
SELECT + + 60 FROM tab2 GROUP BY tab2.col2
----
60
60
60

query I rowsort
SELECT DISTINCT + 58 - 39 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
19

query I rowsort
SELECT DISTINCT + 78 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
78

query I rowsort
SELECT 54 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
54
54
54

query I rowsort
SELECT DISTINCT + - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - - col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - tab1.col0 + - tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-506
-6806
-812

onlyif mysql # DIV for integer division: 
query I rowsort label-2404
SELECT + 41 DIV cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2404
SELECT + 41 / cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 79 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
79

query I rowsort
SELECT 38 FROM tab0 AS cor0 GROUP BY col0
----
38
38
38

query I rowsort
SELECT 35 + + cor0.col2 * + ( 15 + cor0.col2 ) FROM tab2 AS cor0 GROUP BY col2
----
4269
7461
8909

query I rowsort
SELECT DISTINCT + - 23 AS col1 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
-23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + cor0.col0 - col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-29
16
38

query I rowsort
SELECT DISTINCT + + 90 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1350
8190
8280

query I rowsort
SELECT - - 25 AS col1 FROM tab2 GROUP BY tab2.col0
----
25
25
25

query I rowsort
SELECT - cor0.col1 + + 76 AS col0 FROM tab2 cor0 GROUP BY col1
----
15
17
35

query I rowsort
SELECT DISTINCT - tab0.col2 + + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL - 56 AS col0 FROM tab0 GROUP BY tab0.col0
----
-56
-56
-56

query I rowsort
SELECT + 38 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
38
38
38

query I rowsort
SELECT 89 FROM tab1 GROUP BY tab1.col0
----
89
89
89

query I rowsort
SELECT col2 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - tab0.col2 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

query I rowsort
SELECT - col0 + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - 53 FROM tab0 GROUP BY tab0.col0
----
-53
-53
-53

query I rowsort
SELECT ALL - ( 64 ) FROM tab2 GROUP BY tab2.col0
----
-64
-64
-64

query I rowsort
SELECT + - 19 FROM tab1 GROUP BY col1
----
-19
-19
-19

query I rowsort
SELECT + 55 AS col1 FROM tab2 GROUP BY tab2.col0
----
55
55
55

query I rowsort
SELECT 4 AS col0 FROM tab2 GROUP BY tab2.col0
----
4
4
4

query I rowsort
SELECT ALL - 74 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
-74
-74
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 7 * 26 col2 FROM tab0 AS cor0 GROUP BY col0
----
182
182
182

query I rowsort
SELECT - 31 AS col2 FROM tab0 GROUP BY tab0.col1
----
-31
-31

query I rowsort
SELECT ALL cor0.col1 * + col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2378
4661
5307

query I rowsort
SELECT ALL 9 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
9
9
9

query I rowsort
SELECT DISTINCT - + 45 FROM tab2 GROUP BY tab2.col1
----
-45

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 DISTINCT + - 59 * 63 FROM tab0 GROUP BY tab0.col1
----
-3717

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL 33 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( 52 ) col0 FROM tab1 GROUP BY tab1.col0
----
52

query I rowsort
SELECT DISTINCT tab2.col2 + tab2.col2 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3422
6320
7656

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT ALL + 45 FROM tab1 GROUP BY tab1.col0
----
45
45
45

onlyif mysql # DIV for integer division: 
query I rowsort label-2445
SELECT + 65 DIV - 47 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2445
SELECT + 65 / - 47 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT + 45 FROM tab2 GROUP BY tab2.col2
----
45
45
45

query I rowsort
SELECT DISTINCT - 56 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-56

query I rowsort
SELECT ALL + tab1.col2 * - 16 AS col1 FROM tab1 GROUP BY tab1.col2
----
-1136
-128
-720

query I rowsort
SELECT ALL - + 78 FROM tab2 GROUP BY tab2.col2
----
-78
-78
-78

query I rowsort
SELECT 60 FROM tab2 AS cor0 GROUP BY col1
----
60
60
60

onlyif mysql # DIV for integer division: 
query I rowsort label-2451
SELECT tab0.col0 DIV - 83 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2451
SELECT tab0.col0 / - 83 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1
0
0

query I rowsort
SELECT DISTINCT + tab2.col2 AS col1 FROM tab2 WHERE NOT col1 < NULL GROUP BY tab2.col2
----

query I rowsort
SELECT tab1.col2 + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT cor0.col1 * - cor0.col1 + 42 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1639
-3439
-3679

onlyif mysql # DIV for integer division: 
query I rowsort label-2455
SELECT DISTINCT - cor0.col1 DIV - col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
1

skipif mysql # not compatible
query I rowsort label-2455
SELECT DISTINCT - cor0.col1 / - col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
1

onlyif mysql # DIV for integer division: 
query I rowsort label-2456
SELECT ALL + cor0.col2 DIV + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2456
SELECT ALL + cor0.col2 / + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT cor0.col1 * cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6642

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-462
-6642
-756

query I rowsort
SELECT ALL tab1.col1 + - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + col2 + + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT + 45 + 4 AS col1 FROM tab0 GROUP BY tab0.col2
----
49
49
49

query I rowsort
SELECT 28 FROM tab2 GROUP BY tab2.col2
----
28
28
28

query I rowsort
SELECT - 84 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-84
-84
-84

query I rowsort
SELECT cor0.col2 - + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2466
SELECT ALL - CAST( + tab1.col1 AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

skipif mysql # not compatible
query I rowsort label-2466
SELECT ALL - CAST ( + tab1.col1 AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-2467
SELECT ALL + cor0.col0 DIV + 41 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-2467
SELECT ALL + cor0.col0 / + 41 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
2
2

query I rowsort
SELECT ALL + col0 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT - 19 FROM tab0 GROUP BY tab0.col1
----
-19
-19

query I rowsort
SELECT + 15 AS col0 FROM tab2 GROUP BY tab2.col1
----
15
15
15

query I rowsort
SELECT ALL - NULLIF ( 15, 6 ) * tab0.col2 + + 52 FROM tab0 GROUP BY col2
----
-1133
-308
-518

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + tab0.col2 + 73 AS col2 FROM tab0 GROUP BY col2
----
111
152
97

query I rowsort
SELECT - + tab1.col2 * 12 FROM tab1 GROUP BY tab1.col2
----
-540
-852
-96

query I rowsort
SELECT 21 * + 64 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1344
1344
1344

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( 95, - cor0.col2 * 84, - 58 * col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
95

query I rowsort
SELECT ALL tab1.col1 * + 70 FROM tab1 GROUP BY col1
----
3080
3990
420

onlyif mysql # DIV for integer division: 
query I rowsort label-2478
SELECT ALL col1 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2478
SELECT ALL col1 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT - 56 * cor0.col1 - + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2337
-3363
-3477

query I rowsort
SELECT ALL 54 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT DISTINCT + col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

onlyif mysql # DIV for integer division: 
query I rowsort label-2482
SELECT - tab2.col1 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2482
SELECT - tab2.col1 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

query I rowsort
SELECT 86 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
86
86
86

query I rowsort
SELECT ALL - + tab0.col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL + 61 FROM tab2 AS cor0 GROUP BY cor0.col1
----
61
61
61

query I rowsort
SELECT ALL + cor0.col1 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
0
0
1944

onlyif mysql # DIV for integer division: 
query I rowsort label-2487
SELECT cor0.col1 * - COALESCE ( - 54, - cor0.col0, cor0.col0 DIV CASE cor0.col2 WHEN - cor0.col2 THEN 60 * - cor0.col0 ELSE NULL END ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2214
3186
3294

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2487
SELECT cor0.col1 * - COALESCE ( - 54, - cor0.col0, cor0.col0 / CASE cor0.col2 WHEN - cor0.col2 THEN 60 * - cor0.col0 ELSE NULL END ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2214
3186
3294

query I rowsort
SELECT 38 - + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-43
38
38

query I rowsort
SELECT DISTINCT - tab2.col0 * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT - 28 FROM tab2 GROUP BY tab2.col2
----
-28
-28
-28

query I rowsort
SELECT - tab1.col0 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT ALL ( 15 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
15
15
15

query I rowsort
SELECT + ( + cor0.col1 ) * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT 78 FROM tab2 cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT ALL + ( - 83 ) FROM tab1 GROUP BY tab1.col2
----
-83
-83
-83

query I rowsort
SELECT ALL col1 - cor0.col2 FROM tab2 AS cor0 GROUP BY col2, col1
----
-17
-20
-26

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - tab2.col2 * 8 FROM tab2 GROUP BY tab2.col2
----
-464
-632
-696

query I rowsort
SELECT 5 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
5
5
5

query I rowsort
SELECT ALL - - 31 AS col2 FROM tab0 GROUP BY tab0.col2
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT - - tab2.col2 * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + 42 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
42

query I rowsort
SELECT ALL - 84 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-84
-84
-84

query I rowsort
SELECT cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
166
52
86

query I rowsort
SELECT 96 * - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1440
-8736
-8832

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT 16 - + tab0.col0 * COALESCE ( + 35, tab0.col2 * + col2 ) FROM tab0 GROUP BY tab0.col0
----
-1489
-2889
-894

query I rowsort
SELECT cor0.col1 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT 15 FROM tab1 AS cor0 GROUP BY col1
----
15
15
15

query I rowsort
SELECT DISTINCT + tab1.col1 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT ALL ( + cor0.col0 ) - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 + + cor0.col1 * ( 7 + - col2 ) FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-801
1444
6241

query I rowsort
SELECT DISTINCT tab2.col2 + 48 FROM tab2 GROUP BY tab2.col2
----
106
127
135

query I rowsort
SELECT DISTINCT - tab0.col1 * 35 FROM tab0 GROUP BY tab0.col1
----
-2835
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2515
SELECT - tab0.col2 - CAST( 74 AS SIGNED ) FROM tab0 GROUP BY col2
----
-112
-153
-98

skipif mysql # not compatible
query I rowsort label-2515
SELECT - tab0.col2 - CAST ( 74 AS INTEGER ) FROM tab0 GROUP BY col2
----
-112
-153
-98

query I rowsort
SELECT ALL - cor0.col2 + + 30 FROM tab0 AS cor0 GROUP BY col2
----
-49
-8
6

query I rowsort
SELECT DISTINCT 82 * + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col2
----
4756
6478
7134

query I rowsort
SELECT + tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT - 80 AS col2 FROM tab0 GROUP BY tab0.col0
----
-80
-80
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 69 col1 FROM tab2 GROUP BY tab2.col1
----
69
69
69

query I rowsort
SELECT ALL 34 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
34
34
34

onlyif mysql # DIV for integer division: 
query I rowsort label-2522
SELECT - tab2.col2 DIV tab2.col2 FROM tab2 WHERE + col0 IS NOT NULL GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2522
SELECT - tab2.col2 / tab2.col2 FROM tab2 WHERE + col0 IS NOT NULL GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT - 84 AS col1 FROM tab0 GROUP BY tab0.col0
----
-84
-84
-84

query I rowsort
SELECT 68 FROM tab1 GROUP BY tab1.col0
----
68
68
68

query I rowsort
SELECT - tab0.col0 + - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

query I rowsort
SELECT - 11 FROM tab2 GROUP BY tab2.col0
----
-11
-11
-11

query I rowsort
SELECT + 62 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
62
62
62

query I rowsort
SELECT - 25 FROM tab0 GROUP BY tab0.col2
----
-25
-25
-25

onlyif mysql # DIV for integer division: 
query I rowsort label-2529
SELECT - 73 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2529
SELECT - 73 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

query I rowsort
SELECT ALL ( - col1 ) FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT tab1.col0 + tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
164
44
56

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - - COALESCE ( 14, + tab2.col1 ) FROM tab2 GROUP BY tab2.col0
----
14
14
14

query I rowsort
SELECT DISTINCT - 16 * 33 + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-445
-485
-502

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 28 col0 FROM tab0 AS cor0 GROUP BY col2
----
28
28
28

query I rowsort
SELECT + 70 FROM tab0 AS cor0 GROUP BY cor0.col1
----
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 30 col2 FROM tab0 GROUP BY tab0.col0
----
30
30
30

query I rowsort
SELECT - cor0.col1 AS col0 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 + 24 col0 FROM tab2 GROUP BY tab2.col0
----
24

query I rowsort
SELECT + cor0.col2 * + 75 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4350
5925
6525

query I rowsort
SELECT 37 FROM tab1 GROUP BY tab1.col2
----
37
37
37

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 99 AS col2 FROM tab0 GROUP BY col1
----
99

query I rowsort
SELECT ALL - col0 + - 13 AS col2 FROM tab0 GROUP BY tab0.col0
----
-39
-56
-96

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 cor0.col1 + + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT 62 * 64 FROM tab2 GROUP BY tab2.col1
----
3968
3968
3968

query I rowsort
SELECT - cor0.col2 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT tab0.col2 + tab0.col2 FROM tab0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT + tab2.col2 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT - - 60 * tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
0
4860

query I rowsort
SELECT DISTINCT tab0.col2 * 79 - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1872
2964
6162

query I rowsort
SELECT 10 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
10
10
10

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( - 67, + tab1.col1, + tab1.col0, tab1.col0 ) FROM tab1 GROUP BY tab1.col1
----
-67
-67
-67

query I rowsort
SELECT cor0.col0 - + 59 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-16
-33
24

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2556
SELECT + COALESCE ( + 31, 97 + tab1.col0, CAST( NULL AS SIGNED ) ) AS col2 FROM tab1 GROUP BY tab1.col0
----
31
31
31

skipif mysql # not compatible
query I rowsort label-2556
SELECT + COALESCE ( + 31, 97 + tab1.col0, CAST ( NULL AS INTEGER ) ) AS col2 FROM tab1 GROUP BY tab1.col0
----
31
31
31

query I rowsort
SELECT ALL - tab1.col1 + 91 FROM tab1 GROUP BY tab1.col1
----
34
47
85

query I rowsort
SELECT ALL - tab2.col2 * - ( 78 ) FROM tab2 GROUP BY col2
----
4524
6162
6786

query I rowsort
SELECT 76 AS col0 FROM tab1 GROUP BY col1
----
76
76
76

query I rowsort
SELECT cor1.col1 + - cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor1.col1
----
-41
-59
-61
20
22
40

query I rowsort
SELECT 22 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
22
22

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 + 0 AS col2 FROM tab1 GROUP BY tab1.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT 58 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
4698

query I rowsort
SELECT + tab2.col1 * + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT col0 + NULLIF ( cor0.col0, - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
166
52
86

query I rowsort
SELECT ALL 73 FROM tab1 AS cor0 GROUP BY cor0.col1
----
73
73
73

query I rowsort
SELECT DISTINCT - cor0.col1 - - cor0.col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-12
2
27

query I rowsort
SELECT tab2.col0 + - col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL - 13 FROM tab0 AS cor0 GROUP BY col2
----
-13
-13
-13

query I rowsort
SELECT DISTINCT - - 85 AS col1 FROM tab0 GROUP BY col1
----
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 70 col2 FROM tab1 GROUP BY col1
----
-70
-70
-70

query I rowsort
SELECT DISTINCT 31 AS col2 FROM tab1 GROUP BY tab1.col1
----
31

query I rowsort
SELECT DISTINCT - 77 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-62
14
15

query I rowsort
SELECT DISTINCT + 9 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-49
-70
-78

query I rowsort
SELECT ALL - ( 87 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
-87
-87
-87

query I rowsort
SELECT 66 FROM tab2 GROUP BY tab2.col1
----
66
66
66

query I rowsort
SELECT cor0.col0 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
1849
676
6889

query I rowsort
SELECT cor0.col1 + + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col1
----
114
12
88

query I rowsort
SELECT ALL 91 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4095
6461
728

query I rowsort
SELECT DISTINCT 61 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2585
SELECT - col0 + + CAST( 36 AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col0
----
-47
-7
10

skipif mysql # not compatible
query I rowsort label-2585
SELECT - col0 + + CAST ( 36 AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col0
----
-47
-7
10

query I rowsort
SELECT DISTINCT + - 1 AS col0 FROM tab2 GROUP BY col2
----
-1

query I rowsort
SELECT 43 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
43
43
43

query I rowsort
SELECT ALL 54 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
54
54
54

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2589
SELECT ALL CAST( - 7 AS SIGNED ) FROM tab1 AS cor0 GROUP BY col0
----
-7
-7
-7

skipif mysql # not compatible
query I rowsort label-2589
SELECT ALL CAST ( - 7 AS INTEGER ) FROM tab1 AS cor0 GROUP BY col0
----
-7
-7
-7

query I rowsort
SELECT DISTINCT ( + col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + 32 FROM tab2 GROUP BY tab2.col0
----
32
32
32

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 col0
----
-484
-6724
-784

query I rowsort
SELECT 44 - - 79 FROM tab0 AS cor0 GROUP BY cor0.col2
----
123
123
123

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2594
SELECT DISTINCT - 77 + tab1.col1 * + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-2594
SELECT DISTINCT - 77 + tab1.col1 * + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 92 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
92
92
92

query I rowsort
SELECT ALL - tab1.col1 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

query I rowsort
SELECT DISTINCT 24 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
24

onlyif mysql # DIV for integer division: 
query I rowsort label-2598
SELECT ALL + cor0.col0 DIV - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2598
SELECT ALL + cor0.col0 / - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT + 59 * + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1298
1652
4838

query I rowsort
SELECT ALL + 95 AS col2 FROM tab1 GROUP BY tab1.col1
----
95
95
95

query I rowsort
SELECT DISTINCT ( tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT 32 * 91 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2912
2912
2912

query I rowsort
SELECT DISTINCT 93 FROM tab0 AS cor0 GROUP BY col0
----
93

query I rowsort
SELECT - cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
0
0
0

query I rowsort
SELECT - 26 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
17
57

query I rowsort
SELECT 60 AS col2 FROM tab2 GROUP BY tab2.col2
----
60
60
60

query I rowsort
SELECT 43 AS col1 FROM tab0 GROUP BY tab0.col2
----
43
43
43

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 29, + cor0.col0 + 3 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
29
29
29

query I rowsort
SELECT + ( - 40 ) FROM tab1 GROUP BY tab1.col2
----
-40
-40
-40

query I rowsort
SELECT ALL + 8 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT 74 * + cor0.col2 FROM tab1 cor0 GROUP BY col2
----
3330
5254
592

query I rowsort
SELECT ALL 5 FROM tab0 AS cor0 GROUP BY col0
----
5
5
5

query I rowsort
SELECT ALL - 66 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-157
-158
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 73 col0 FROM tab1 cor0 GROUP BY cor0.col0
----
73
73
73

onlyif mysql # DIV for integer division: 
query I rowsort label-2615
SELECT DISTINCT - cor0.col1 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-2615
SELECT DISTINCT - cor0.col1 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
0

query I rowsort
SELECT DISTINCT - - 88 AS col1 FROM tab0 GROUP BY tab0.col2
----
88

query I rowsort
SELECT DISTINCT - + col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL + cor0.col1 * - col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT 42 AS col1 FROM tab2 GROUP BY tab2.col2
----
42
42
42

query I rowsort
SELECT + 97 FROM tab2 GROUP BY tab2.col2
----
97
97
97

query I rowsort
SELECT DISTINCT - 3 FROM tab0 GROUP BY tab0.col0
----
-3

query I rowsort
SELECT - 99 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4356
5643
594

query I rowsort
SELECT - tab2.col1 + col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col2 + - 86 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-48
-62
-7

query I rowsort
SELECT ALL + - tab0.col1 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT 22 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
22
22
22

query I rowsort
SELECT ALL - 99 FROM tab1 GROUP BY tab1.col1
----
-99
-99
-99

query I rowsort
SELECT ALL + 39 * - 78 - + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-3083
-3101
-3103

query I rowsort
SELECT DISTINCT + 42 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1722
-2478
-2562

query I rowsort
SELECT 71 FROM tab0 GROUP BY tab0.col2
----
71
71
71

query I rowsort
SELECT ALL - 32 FROM tab2 GROUP BY tab2.col2
----
-32
-32
-32

query I rowsort
SELECT 39 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
39
39

query I rowsort
SELECT ALL - 19 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-19
-19

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2634
SELECT - - CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2634
SELECT - - CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 56 FROM tab1 GROUP BY tab1.col1
----
56
56
56

query I rowsort
SELECT - 88 AS col0 FROM tab2 GROUP BY tab2.col0
----
-88
-88
-88

query I rowsort
SELECT col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
182
184
30

query I rowsort
SELECT - 77 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-77
-77
-77

query I rowsort
SELECT - 85 AS col0 FROM tab1 GROUP BY tab1.col2
----
-85
-85
-85

query I rowsort
SELECT + 81 FROM tab0 GROUP BY tab0.col1
----
81
81

onlyif mysql # DIV for integer division: 
query I rowsort label-2641
SELECT + col1 DIV - 20 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-2641
SELECT + col1 / - 20 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-4
0
0

query I rowsort
SELECT + 77 FROM tab2 GROUP BY col1
----
77
77
77

query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 * - 57 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1456
-2408
-4648

query I rowsort
SELECT + ( 13 ) * - col2 - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1106
-1218
-812

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 86 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-86
-86
-86

query I rowsort
SELECT - + 36 * 60 FROM tab1 GROUP BY tab1.col0
----
-2160
-2160
-2160

query I rowsort
SELECT + 85 FROM tab0 GROUP BY tab0.col0
----
85
85
85

query I rowsort
SELECT - + 97 AS col2 FROM tab1 GROUP BY tab1.col2
----
-97
-97
-97

query I rowsort
SELECT ALL + - 48 FROM tab0 GROUP BY tab0.col0
----
-48
-48
-48

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2650
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2650
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 93 * tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
1395
8463
8556

query I rowsort
SELECT - tab1.col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT - - tab2.col0 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL tab0.col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL + tab0.col1 * - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 GROUP BY col2, col1
----
-58
-79
-87

query I rowsort
SELECT col2 + - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 28 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
28

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2659
SELECT DISTINCT + CAST( NULL AS DECIMAL ) FROM tab0 GROUP BY tab0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2659
SELECT DISTINCT + CAST ( NULL AS REAL ) FROM tab0 GROUP BY tab0.col2
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-2660
SELECT ALL - 96 DIV 76 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2660
SELECT ALL - 96 / 76 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

query I rowsort
SELECT ALL 33 FROM tab1 GROUP BY tab1.col0
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 10 + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
34
48
89

query I rowsort
SELECT ALL 27 * cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
2457
2484
405

query I rowsort
SELECT ALL 58 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT DISTINCT tab1.col1 + - 70 AS col2 FROM tab1 GROUP BY tab1.col1
----
-13
-26
-64

query I rowsort
SELECT - tab2.col1 * tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-2668
SELECT tab2.col0 DIV - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2668
SELECT tab2.col0 / - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

query I rowsort
SELECT tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT tab1.col2 * - tab1.col2 FROM tab1 WHERE NOT NULL IS NOT NULL GROUP BY col2 HAVING NULL IS NULL
----
-2025
-5041
-64

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab2 AS cor0 WHERE NOT NULL IN ( cor0.col1 ) GROUP BY cor0.col2
----

query I rowsort
SELECT + col0 * cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
1305
5336
7189

query I rowsort
SELECT 95 * 93 FROM tab2 AS cor0 GROUP BY col1
----
8835
8835
8835

onlyif mysql # DIV for integer division: 
query I rowsort label-2674
SELECT tab1.col1 + + col1 DIV + ( - 92 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-2674
SELECT tab1.col1 + + col1 / + ( - 92 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

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 71 AS col1 FROM tab1 GROUP BY col2
----
71
71
71

query I rowsort
SELECT DISTINCT - + tab0.col1 * tab0.col1 + col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-6480
0

query I rowsort
SELECT - 29 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-29
-29
-29

query I rowsort
SELECT ALL 36 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
36
36
36

query I rowsort
SELECT DISTINCT + cor0.col0 - + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-17
11
14

query I rowsort
SELECT DISTINCT 73 * + 27 FROM tab2 cor0 GROUP BY cor0.col0
----
1971

query I rowsort
SELECT ALL + 49 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
49
49
49

query I rowsort
SELECT + 19 * - tab2.col2 FROM tab2 GROUP BY col2
----
-1102
-1501
-1653

query I rowsort
SELECT - tab2.col2 * 71 FROM tab2, tab0 cor0 GROUP BY tab2.col2
----
-4118
-5609
-6177

query I rowsort
SELECT - col2 + + 51 AS col0 FROM tab2 GROUP BY tab2.col2
----
-28
-36
-7

query I rowsort
SELECT ALL - - 77 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-2
39
53

query I rowsort
SELECT ALL - + 27 AS col1 FROM tab2 GROUP BY tab2.col2
----
-27
-27
-27

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
166
52
86

query I rowsort
SELECT + NULLIF ( - 68, tab0.col0 * - col0 ) AS col2 FROM tab0 GROUP BY tab0.col0
----
-68
-68
-68

query I rowsort
SELECT ALL + 43 FROM tab1 GROUP BY tab1.col2
----
43
43
43

query I rowsort
SELECT col2 - - cor0.col2 * cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
2070
5112
72

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2693
SELECT ALL - CAST( NULL AS DECIMAL ) * - cor0.col0 FROM tab1 cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2693
SELECT ALL - CAST ( NULL AS REAL ) * - cor0.col0 FROM tab1 cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 73 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
73

onlyif mysql # DIV for integer division: 
query I rowsort label-2695
SELECT - cor0.col2 DIV cor0.col2 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2695
SELECT - cor0.col2 / cor0.col2 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 9 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
9

query I rowsort
SELECT DISTINCT 44 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
44

query I rowsort
SELECT DISTINCT + cor0.col1 * - ( + 10 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-810
0

query I rowsort
SELECT + 51 FROM tab2 GROUP BY tab2.col0
----
51
51
51

query I rowsort
SELECT 39 * - 46 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-1794
-1794
-1794

query I rowsort
SELECT - 80 AS col1 FROM tab1 GROUP BY tab1.col2
----
-80
-80
-80

query I rowsort
SELECT DISTINCT + tab0.col2 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT cor0.col0 * cor0.col1 + + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, col0
----
26
3526
83

query I rowsort
SELECT 23 FROM tab1 GROUP BY tab1.col0
----
23
23
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 45 col0 FROM tab2 GROUP BY tab2.col0
----
45

query I rowsort
SELECT DISTINCT col0 * + col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT ALL - - 68 FROM tab2 GROUP BY tab2.col1
----
68
68
68

query I rowsort
SELECT ALL 52 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
52
52
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 94 col1 FROM tab0 GROUP BY col0
----
-94
-94
-94

query I rowsort
SELECT ALL cor0.col1 * + cor0.col1 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1722
3540
3782

query I rowsort
SELECT cor0.col0 * - 46 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1196
-1978
-3818

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 42 - cor0.col1 col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-101
-103
-83

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
0
81

query I rowsort
SELECT ALL + ( 69 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
69
69
69

query I rowsort
SELECT 81 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
81
81
81

query I rowsort
SELECT ALL - cor0.col0 - cor0.col1 FROM tab0 AS cor0 GROUP BY col0, col1
----
-124
-26
-83

query I rowsort
SELECT DISTINCT + 24 FROM tab1 GROUP BY tab1.col0
----
24

query I rowsort
SELECT DISTINCT 27 FROM tab1 GROUP BY tab1.col2
----
27

query I rowsort
SELECT + 16 FROM tab0 GROUP BY tab0.col0
----
16
16
16

query I rowsort
SELECT DISTINCT + 12 AS col0 FROM tab0 GROUP BY tab0.col0
----
12

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2378
-4661
-5307

onlyif mysql # DIV for integer division: 
query I rowsort label-2722
SELECT + cor0.col0 DIV 84 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2722
SELECT + cor0.col0 / 84 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT cor1.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT - 33 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-33
-33
-33

query I rowsort
SELECT 63 FROM tab0 GROUP BY tab0.col1
----
63
63

query I rowsort
SELECT - 57 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-57
-57
-57

query I rowsort
SELECT ALL + 21 AS col2 FROM tab0 GROUP BY tab0.col1
----
21
21

query I rowsort
SELECT ALL + - col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + - 82 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-54
-60
0

query I rowsort
SELECT DISTINCT 51 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
51

query I rowsort
SELECT + col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + cor0.col1 + + col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT ALL 17 + + 7 FROM tab2 AS cor0 GROUP BY cor0.col0
----
24
24
24

query I rowsort
SELECT - 20 FROM tab1 GROUP BY tab1.col1
----
-20
-20
-20

query I rowsort
SELECT ALL 69 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
3036
3933
414

query I rowsort
SELECT 49 + 16 FROM tab1 cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT + COALESCE ( - cor0.col2, 72 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - 15 FROM tab0 AS cor0 GROUP BY col0
----
-15
-15
-15

query I rowsort
SELECT ALL - 35 FROM tab0 GROUP BY tab0.col2
----
-35
-35
-35

query I rowsort
SELECT DISTINCT - 89 FROM tab1 GROUP BY col0
----
-89

query I rowsort
SELECT - 71 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-71
-71
-71

query I rowsort
SELECT 46 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
46
46
46

query I rowsort
SELECT DISTINCT + 51 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
51

query I rowsort
SELECT - 23 AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-23
-23

query I rowsort
SELECT + 76 AS col2 FROM tab1 GROUP BY tab1.col2
----
76
76
76

query I rowsort
SELECT + 49 FROM tab2 GROUP BY tab2.col2
----
49
49
49

query I rowsort
SELECT + - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT 90 FROM tab1 AS cor0 GROUP BY cor0.col1
----
90
90
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + COALESCE ( - 6, cor0.col2 + + cor0.col2 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-6
-6
75

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT tab1.col1 + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT ALL - - 62 AS col1 FROM tab2 GROUP BY tab2.col2
----
62
62
62

query I rowsort
SELECT + 26 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT ALL - + 22 AS col2 FROM tab2 GROUP BY tab2.col0
----
-22
-22
-22

query I rowsort
SELECT ALL - 90 + 23 FROM tab2 GROUP BY tab2.col2
----
-67
-67
-67

query I rowsort
SELECT ( col2 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + - ( - 66 ) * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
5346

query I rowsort
SELECT - ( cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL + 59 FROM tab2 GROUP BY tab2.col2
----
59
59
59

query I rowsort
SELECT 24 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
24
24

query I rowsort
SELECT + 47 + + cor0.col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
126
71
85

query I rowsort
SELECT ALL 94 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
94
94
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col1 FROM tab2 cor0 GROUP BY cor0.col0, col2
----
58
79
87

query I rowsort
SELECT DISTINCT - col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + COALESCE ( + cor0.col2, cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - 32 - cor0.col2 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-1476
-608
-6273

query I rowsort
SELECT - 56 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-2520
-3976
-448

query I rowsort
SELECT ALL + - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-2769
SELECT DISTINCT + cor0.col2 DIV col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-2769
SELECT DISTINCT + cor0.col2 / col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - 79 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-79
-79
-79

query I rowsort
SELECT - 41 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-41
-41

query I rowsort
SELECT ALL 46 FROM tab1 AS cor0 GROUP BY cor0.col1
----
46
46
46

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
44
57
6

query I rowsort
SELECT ALL + 16 AS col2 FROM tab0 GROUP BY tab0.col1
----
16
16

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT + 73 AS col2 FROM tab2 GROUP BY tab2.col2
----
73
73
73

query I rowsort
SELECT 29 + - cor0.col1 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1652
-3452
-3692

query I rowsort
SELECT cor0.col0 + 27 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
118
119
42

query I rowsort
SELECT - 2 * tab1.col1 FROM tab1 GROUP BY col1
----
-114
-12
-88

onlyif mysql # DIV for integer division: 
query I rowsort label-2781
SELECT DISTINCT + 98 DIV + 92 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-2781
SELECT DISTINCT + 98 / + 92 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT - 63 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-63
-63
-63

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab0 cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - cor0.col0 * ( cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL - + 3 FROM tab2 GROUP BY tab2.col1
----
-3
-3
-3

query I rowsort
SELECT 62 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
62
62
62

query I rowsort
SELECT - cor0.col0 * + 79 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2054
-3397
-6557

query I rowsort
SELECT ALL + + CASE - tab1.col2 WHEN - tab1.col2 THEN col2 - tab1.col2 END AS col0 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT + 67 FROM tab2 GROUP BY tab2.col2
----
67
67
67

query I rowsort
SELECT DISTINCT tab2.col2 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2 HAVING NULL IS NULL
----
3364
6241
7569

query I rowsort
SELECT 98 AS col2 FROM tab2 GROUP BY tab2.col1
----
98
98
98

query I rowsort
SELECT + 74 FROM tab1 AS cor0 GROUP BY col0
----
74
74
74

query I rowsort
SELECT DISTINCT + 40 FROM tab1 GROUP BY tab1.col1
----
40

query I rowsort
SELECT DISTINCT + NULLIF ( - 10, + tab1.col0 ) AS col1 FROM tab1 GROUP BY col0
----
-10

query I rowsort
SELECT - - 56 + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
114
135
143

query I rowsort
SELECT + - col2 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT 99 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
99

query I rowsort
SELECT + NULLIF ( cor0.col0, cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 64 col0 FROM tab1 cor0 GROUP BY col2
----
-64

onlyif mysql # DIV for integer division: 
query I rowsort label-2800
SELECT DISTINCT - tab2.col2 DIV tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-1

skipif mysql # not compatible
query I rowsort label-2800
SELECT DISTINCT - tab2.col2 / tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-1

query I rowsort
SELECT col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0
0
81

query I rowsort
SELECT ALL 60 FROM tab0 AS cor0 GROUP BY col2
----
60
60
60

query I rowsort
SELECT DISTINCT 32 - - col2 * - col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
-3332
-6209
-7537

onlyif mysql # DIV for integer division: 
query I rowsort label-2805
SELECT ALL cor0.col0 DIV - 27 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3
-3
0

skipif mysql # not compatible
query I rowsort label-2805
SELECT ALL cor0.col0 / - 27 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3
-3
0

query I rowsort
SELECT DISTINCT + + 43 AS col0 FROM tab0 GROUP BY tab0.col0
----
43

query I rowsort
SELECT DISTINCT 43 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
43

query I rowsort
SELECT - 75 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-75
-75
-75

query I rowsort
SELECT ALL 81 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT + 74 AS col1 FROM tab1 GROUP BY tab1.col1
----
74
74
74

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2811
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2811
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

query I rowsort
SELECT - cor0.col2 * - cor0.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + 30 AS col1 FROM tab1 GROUP BY tab1.col2
----
30

query I rowsort
SELECT DISTINCT - + 97 AS col0 FROM tab0 GROUP BY tab0.col2
----
-97

query I rowsort
SELECT ( - col2 ) FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT - 79 FROM tab0 cor0 GROUP BY cor0.col0
----
-79
-79
-79

query I rowsort
SELECT + 46 * tab0.col0 + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1222
2021
3901

query I rowsort
SELECT 74 * - 60 FROM tab0 GROUP BY tab0.col1
----
-4440
-4440

query I rowsort
SELECT DISTINCT - tab0.col0 + + col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT DISTINCT + 24 * + 79 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
1896

query I rowsort
SELECT ALL - 61 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-61
-61
-61

query I rowsort
SELECT ALL + + tab2.col2 * + tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 56 + + col2 col2 FROM tab2 GROUP BY col2
----
114
135
143

query I rowsort
SELECT 25 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
25
25
25

query I rowsort
SELECT - col2 + cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT ALL + 70 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
70
70
70

query I rowsort
SELECT 23 - 42 AS col0 FROM tab0 GROUP BY col1
----
-19
-19

query I rowsort
SELECT - ( + 19 ) FROM tab1 GROUP BY tab1.col1
----
-19
-19
-19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 96 col1 FROM tab2 AS cor0 GROUP BY col2
----
96
96
96

onlyif mysql # DIV for integer division: 
query I rowsort label-2830
SELECT DISTINCT - col2 DIV - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col2
----
1

skipif mysql # not compatible
query I rowsort label-2830
SELECT DISTINCT - col2 / - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col2
----
1

query I rowsort
SELECT DISTINCT 55 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
55

query I rowsort
SELECT ALL + 53 * - 52 AS col2 FROM tab0 GROUP BY tab0.col1
----
-2756
-2756

query I rowsort
SELECT 23 * + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY col1
----
0
1863

query I rowsort
SELECT ALL 26 AS col1 FROM tab2 GROUP BY tab2.col0
----
26
26
26

query I rowsort
SELECT + 16 FROM tab2 GROUP BY tab2.col1
----
16
16
16

query I rowsort
SELECT + 89 AS col1 FROM tab0 GROUP BY tab0.col0
----
89
89
89

query I rowsort
SELECT 51 FROM tab2 GROUP BY tab2.col0
----
51
51
51

query I rowsort
SELECT ALL 1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT NULLIF ( - cor0.col0, 41 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 59 AS col2 FROM tab2 GROUP BY tab2.col2
----
59

query I rowsort
SELECT ALL - cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT 42 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
42

query I rowsort
SELECT DISTINCT 69 AS col2 FROM tab1 GROUP BY tab1.col2
----
69

query I rowsort
SELECT DISTINCT ( + 0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
0

query I rowsort
SELECT DISTINCT col2 * - 85 - + 27 AS col0 FROM tab0 GROUP BY tab0.col2
----
-2067
-3257
-6742

query I rowsort
SELECT DISTINCT + 6 + + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
47
65
67

query I rowsort
SELECT DISTINCT 71 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
71

query I rowsort
SELECT 78 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
78
78

query I rowsort
SELECT - 52 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-52
-52
-52

query I rowsort
SELECT 57 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-44
-57
-6

query I rowsort
SELECT - 30 AS col2 FROM tab1 GROUP BY tab1.col2
----
-30
-30
-30

query I rowsort
SELECT + 52 FROM tab2 GROUP BY tab2.col2
----
52
52
52

query I rowsort
SELECT DISTINCT - 45 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-45

query I rowsort
SELECT DISTINCT 63 FROM tab1 AS cor0 GROUP BY cor0.col1
----
63

query I rowsort
SELECT ALL 30 AS col0 FROM tab0 GROUP BY tab0.col0
----
30
30
30

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 53 * cor0.col2 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
2340
3692
416

query I rowsort
SELECT ALL - cor0.col2 + col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY col0, col1, cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - COALESCE ( cor1.col2, - cor1.col2 ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - 6 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-546
-552
-90

query I rowsort
SELECT + 95 FROM tab0 AS cor0 GROUP BY col0
----
95
95
95

query I rowsort
SELECT - cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
-81
0

query I rowsort
SELECT ALL cor0.col2 + 66 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
104
145
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL + - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - 66 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-66
-66

query I rowsort
SELECT cor0.col1 + 68 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
112
125
74

query I rowsort
SELECT ALL + cor0.col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
116
158
174

query I rowsort
SELECT ALL + 69 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT + 20 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 35 col1 FROM tab1 AS cor0 GROUP BY col0
----
35
35
35

query I rowsort
SELECT col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT - + 27 * - col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
1215
1917
216

onlyif mysql # DIV for integer division: 
query I rowsort label-2879
SELECT col1 DIV + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2879
SELECT col1 / + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 88 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
88
88
88

query I rowsort
SELECT + 98 AS col2 FROM tab0 GROUP BY tab0.col1
----
98
98

query I rowsort
SELECT ALL 18 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
18
18
18

query I rowsort
SELECT - 41 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-41
-41
-41

query I rowsort
SELECT 30 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT 97 FROM tab2 AS cor0 GROUP BY cor0.col2
----
97
97
97

query I rowsort
SELECT cor0.col0 * cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT - 24 + - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-32
-69
-95

query I rowsort
SELECT + cor0.col0 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1, cor0.col0
----
126
28
85

query I rowsort
SELECT - 50 - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-133
-76
-93

query I rowsort
SELECT DISTINCT - - 95 FROM tab2 GROUP BY tab2.col0
----
95

query I rowsort
SELECT DISTINCT + + tab1.col0 * - 10 AS col1 FROM tab1 GROUP BY tab1.col0
----
-220
-280
-820

query I rowsort
SELECT - col0 * 38 FROM tab0 GROUP BY tab0.col0
----
-1634
-3154
-988

query I rowsort
SELECT ALL - - 1 AS col1 FROM tab0, tab0 cor0 GROUP BY cor0.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-15
-91
-92

query I rowsort
SELECT ALL 18 FROM tab0 GROUP BY col1
----
18
18

onlyif mysql # DIV for integer division: 
query I rowsort label-2898
SELECT ALL - + tab2.col2 DIV + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2898
SELECT ALL - + tab2.col2 / + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT ALL - 67 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-9
12
20

query I rowsort
SELECT - cor0.col2 - 94 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-152
-173
-181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 50 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
50
50
50

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 + 83 FROM tab0 AS cor0 GROUP BY col0
----
83
83
83

query I rowsort
SELECT DISTINCT - + 30 FROM tab1 GROUP BY tab1.col2
----
-30

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT 45 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-38
19
2

query I rowsort
SELECT - 89 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-89
-89
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL - - ( - tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + 42 FROM tab2 GROUP BY tab2.col0
----
42
42
42

query I rowsort
SELECT ALL tab1.col0 + 16 AS col1 FROM tab1 GROUP BY tab1.col0
----
38
44
98

query I rowsort
SELECT + + 15 AS col1 FROM tab2 GROUP BY tab2.col2
----
15
15
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 13 - col0 col0 FROM tab2 AS cor0 GROUP BY col0
----
-2
-78
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2914
SELECT CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2914
SELECT CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 76 col0 FROM tab1 GROUP BY tab1.col1
----
76

query I rowsort
SELECT ALL - + 15 FROM tab2 GROUP BY col2
----
-15
-15
-15

query I rowsort
SELECT DISTINCT + 4 * 33 AS col2 FROM tab0 GROUP BY tab0.col0
----
132

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2918
SELECT ALL + - CAST( - 3 AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
3
3
3

skipif mysql # not compatible
query I rowsort label-2918
SELECT ALL + - CAST ( - 3 AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
3
3
3

query I rowsort
SELECT - CASE cor0.col2 WHEN cor0.col2 THEN + 0 END AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col2 * 61 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2790
4402
496

query I rowsort
SELECT ALL 79 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
79
79
79

query I rowsort
SELECT - tab2.col0 * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT 19 AS col1 FROM tab2 GROUP BY tab2.col0
----
19
19
19

query I rowsort
SELECT DISTINCT 76 AS col2 FROM tab1 GROUP BY tab1.col0
----
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-81
0
0

query I rowsort
SELECT - 19 + - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-102
-45
-62

query I rowsort
SELECT DISTINCT - - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT - 73 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-73
-73
-73

query I rowsort
SELECT DISTINCT + 36 FROM tab1 GROUP BY tab1.col1
----
36

query I rowsort
SELECT DISTINCT + col2 + 14 * tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
1185
1305
870

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - - COALESCE ( - 55, + tab1.col2 ) FROM tab1 GROUP BY tab1.col1
----
-55

query I rowsort
SELECT ALL - + 58 FROM tab2 GROUP BY tab2.col1
----
-58
-58
-58

query I rowsort
SELECT - + ( - tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL + 89 * 29 AS col1 FROM tab0 GROUP BY tab0.col2
----
2581
2581
2581

query I rowsort
SELECT - 25 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
-25
-25
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 87 col2 FROM tab1 GROUP BY tab1.col0
----
87
87
87

onlyif mysql # DIV for integer division: 
query I rowsort label-2937
SELECT + 23 DIV tab2.col0 + + 58 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
5278
5336
871

skipif mysql # not compatible
query I rowsort label-2937
SELECT + 23 / tab2.col0 + + 58 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
5278
5336
871

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 42 * + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2436
3318
3654

query I rowsort
SELECT DISTINCT 87 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2940
SELECT ALL - tab2.col1 * CAST( + 89 AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
-3649
-5251
-5429

skipif mysql # not compatible
query I rowsort label-2940
SELECT ALL - tab2.col1 * CAST ( + 89 AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
-3649
-5251
-5429

query I rowsort
SELECT ALL + 5 FROM tab0 AS cor0 GROUP BY cor0.col0
----
5
5
5

query I rowsort
SELECT 6 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT 42 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor1.col0, cor0.col1
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT 78 + 58 AS col0 FROM tab1 GROUP BY tab1.col1
----
136
136
136

query I rowsort
SELECT + 28 FROM tab1 GROUP BY tab1.col0
----
28
28
28

query I rowsort
SELECT + 90 FROM tab1 AS cor0 GROUP BY col1
----
90
90
90

query I rowsort
SELECT - 20 FROM tab2 GROUP BY tab2.col1
----
-20
-20
-20

query I rowsort
SELECT 20 FROM tab0 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT DISTINCT + 0 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT 25 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1975
600
950

query I rowsort
SELECT 52 * + ( 32 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
1664
1664

query I rowsort
SELECT - + 55 FROM tab1 GROUP BY tab1.col2
----
-55
-55
-55

query I rowsort
SELECT ALL - 58 * 35 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
-2030
-2030
-2030

query I rowsort
SELECT 47 FROM tab1 cor0 GROUP BY col2
----
47
47
47

query I rowsort
SELECT 75 FROM tab2 AS cor0 GROUP BY col0
----
75
75
75

query I rowsort
SELECT - - 93 FROM tab2, tab2 AS cor0 GROUP BY tab2.col2
----
93
93
93

query I rowsort
SELECT cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1681
3481
3721

query I rowsort
SELECT + 79 + - 57 FROM tab1 GROUP BY tab1.col0
----
22
22
22

onlyif mysql # DIV for integer division: 
query I rowsort label-2959
SELECT DISTINCT + tab0.col0 DIV - 93 FROM tab0 GROUP BY tab0.col0
----
0

skipif mysql # not compatible
query I rowsort label-2959
SELECT DISTINCT + tab0.col0 / - 93 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT ALL + + col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + tab1.col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT + cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - cor0.col1 + 72 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
28
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 31 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-31

query I rowsort
SELECT + 1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT - 84 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
-84

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 tab2.col2 * - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

query I rowsort
SELECT ALL - 79 AS col0 FROM tab1 GROUP BY col2
----
-79
-79
-79

query I rowsort
SELECT - 93 FROM tab1 GROUP BY col2
----
-93
-93
-93

query I rowsort
SELECT - tab2.col2 * + 76 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-4350
-5925
-6525

onlyif mysql # DIV for integer division: 
query I rowsort label-2973
SELECT - COALESCE ( 91, - cor0.col2 + cor0.col1 DIV + cor0.col0, cor0.col2 * cor0.col0 ) * - 27 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2457
2457
2457

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2973
SELECT - COALESCE ( 91, - cor0.col2 + cor0.col1 / + cor0.col0, cor0.col2 * cor0.col0 ) * - 27 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2457
2457
2457

query I rowsort
SELECT DISTINCT + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + cor0.col0 + + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab0.col2 col0 FROM tab0 GROUP BY col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( 3 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3
-3
-3

query I rowsort
SELECT DISTINCT 3 * tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
129
249
78

query I rowsort
SELECT ALL - 11 FROM tab0 GROUP BY tab0.col0
----
-11
-11
-11

query I rowsort
SELECT 83 FROM tab1 GROUP BY tab1.col0
----
83
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col0 + - tab1.col0 * - 23 col2 FROM tab1 GROUP BY tab1.col0
----
1804
484
616

query I rowsort
SELECT ALL 62 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
62
62
62

query I rowsort
SELECT DISTINCT 91 FROM tab1 AS cor0 GROUP BY col1
----
91

query I rowsort
SELECT cor0.col1 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT + cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - + 37 + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-108
-45
-82

query I rowsort
SELECT DISTINCT + + 43 AS col2 FROM tab2 GROUP BY tab2.col2
----
43

query I rowsort
SELECT + COALESCE ( - cor0.col0, cor0.col0, 98 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT ALL - 45 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-4095
-4140
-675

query I rowsort
SELECT DISTINCT tab0.col0 + + tab0.col0 * + col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1892
6972
702

onlyif mysql # DIV for integer division: 
query I rowsort label-2992
SELECT DISTINCT + tab0.col0 DIV - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1

skipif mysql # not compatible
query I rowsort label-2992
SELECT DISTINCT + tab0.col0 / - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1

query I rowsort
SELECT ALL - 95 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-95
-95
-95

query I rowsort
SELECT 76 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
76
76
76

query I rowsort
SELECT DISTINCT - 77 * 42 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3234

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2996
SELECT ALL col1 * + CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2996
SELECT ALL col1 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 17 FROM tab0 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT ALL + cor0.col0 + 37 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
128
129
52

onlyif mysql # DIV for integer division: 
query I rowsort label-2999
SELECT DISTINCT + 43 DIV tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-2999
SELECT DISTINCT + 43 / tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
1

query I rowsort
SELECT DISTINCT + col0 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT + + 71 AS col1 FROM tab1 GROUP BY tab1.col1
----
71

query I rowsort
SELECT DISTINCT - tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT 88 AS col0 FROM tab1 GROUP BY tab1.col1
----
88
88
88

query I rowsort
SELECT ALL + 5 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
220
285
30

onlyif mysql # DIV for integer division: 
query I rowsort label-3005
SELECT ALL + 14 DIV - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3005
SELECT ALL + 14 / - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1
0
0

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col1 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3864
5460
930

query I rowsort
SELECT ALL 0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 28 + + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
119
120
43

onlyif mysql # DIV for integer division: 
query I rowsort label-3009
SELECT - tab2.col0 DIV - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3009
SELECT - tab2.col0 / - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT + 96 FROM tab2 GROUP BY tab2.col0
----
96
96
96

query I rowsort
SELECT 89 AS col1 FROM tab2 GROUP BY tab2.col0
----
89
89
89

query I rowsort
SELECT + 80 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
161
80
80

query I rowsort
SELECT + cor0.col1 + cor0.col1 FROM tab2 cor0 GROUP BY col1, cor0.col0, cor0.col2
----
118
122
82

query I rowsort
SELECT DISTINCT - - 19 AS col1 FROM tab1 GROUP BY tab1.col1
----
19

query I rowsort
SELECT DISTINCT + - 32 FROM tab0 GROUP BY tab0.col1
----
-32

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3016
SELECT DISTINCT + CAST( NULL AS DECIMAL ) - + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-3016
SELECT DISTINCT + CAST ( NULL AS REAL ) - + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL

query I rowsort
SELECT ALL + 55 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT ALL + 16 AS col0 FROM tab2 GROUP BY tab2.col2
----
16
16
16

query I rowsort
SELECT DISTINCT 95 FROM tab2 GROUP BY tab2.col0
----
95

query I rowsort
SELECT DISTINCT 58 FROM tab2 GROUP BY col0
----
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 51 col0 FROM tab1 GROUP BY tab1.col0
----
-51
-51
-51

query I rowsort
SELECT ALL - 93 AS col1 FROM tab0 GROUP BY tab0.col1
----
-93
-93

query I rowsort
SELECT ALL cor0.col1 + + 46 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
103
52
90

query I rowsort
SELECT + 77 AS col2 FROM tab0 GROUP BY tab0.col0
----
77
77
77

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab1.col0 col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL - 12 AS col1 FROM tab1 GROUP BY tab1.col0
----
-12
-12
-12

query I rowsort
SELECT ALL + ( - tab1.col2 ) + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT - 48 FROM tab1 AS cor0 GROUP BY col0
----
-48
-48
-48

query I rowsort
SELECT + - 36 AS col0 FROM tab2 GROUP BY tab2.col2
----
-36
-36
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-3031
SELECT DISTINCT - 56 DIV - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-3031
SELECT DISTINCT - 56 / - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
1

query I rowsort
SELECT + tab0.col1 + + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT ALL + 97 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 49 + 10 col0 FROM tab0 GROUP BY tab0.col1
----
59
59

query I rowsort
SELECT DISTINCT + cor0.col0 * - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT - 48 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-48
-48
-48

query I rowsort
SELECT 33 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1452
-1881
-198

query I rowsort
SELECT + col1 + + 5 FROM tab2 AS cor0 GROUP BY cor0.col1
----
46
64
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + tab1.col2 ) - - 11 col0 FROM tab1 GROUP BY tab1.col2
----
-34
-60
3

query I rowsort
SELECT DISTINCT + ( + tab2.col2 ) * tab2.col2 - tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
3306
6162
7482

query I rowsort
SELECT DISTINCT - ( + 93 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-93

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col1 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - cor0.col1 * + 77 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3157
-4543
-4697

query I rowsort
SELECT DISTINCT + 2 AS col0 FROM tab0 GROUP BY tab0.col2
----
2

query I rowsort
SELECT ALL + 56 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
56
56
56

query I rowsort
SELECT col0 + col0 * tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
1892
6972
702

query I rowsort
SELECT - tab2.col0 + + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL - 83 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
-83
-83
-83

query I rowsort
SELECT cor0.col2 * 97 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
5626
7663
8439

onlyif mysql # DIV for integer division: 
query I rowsort label-3051
SELECT - + tab1.col1 DIV tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3051
SELECT - + tab1.col1 / tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT ALL + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 89 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
89
89
89

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + + COALESCE ( + 5, tab0.col2 ) FROM tab0 GROUP BY col0
----
5
5
5

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-6561
0
0

query I rowsort
SELECT tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL < ( NULL )
----

query I rowsort
SELECT ALL cor0.col0 - - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) >= ( NULL )
----

query I rowsort
SELECT - tab0.col0 + 5 FROM tab0 GROUP BY tab0.col0
----
-21
-38
-78

query I rowsort
SELECT 21 AS col1 FROM tab2 GROUP BY tab2.col2
----
21
21
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab1.col1 col0 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 57 AS col2 FROM tab0 GROUP BY tab0.col0
----
57

query I rowsort
SELECT DISTINCT - 49 AS col1 FROM tab1 GROUP BY tab1.col2
----
-49

query I rowsort
SELECT 90 * 49 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0, cor0.col1
----
4410
4410
4410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 83 col0 FROM tab0 AS cor0 GROUP BY col1
----
83
83

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1681
3481
3721

query I rowsort
SELECT + 92 AS col1 FROM tab1 GROUP BY tab1.col2
----
92
92
92

query I rowsort
SELECT + 14 AS col1 FROM tab0 GROUP BY tab0.col2
----
14
14
14

query I rowsort
SELECT DISTINCT + 38 AS col0 FROM tab1 GROUP BY tab1.col1
----
38

query I rowsort
SELECT DISTINCT 76 AS col1 FROM tab0 GROUP BY tab0.col1
----
76

query I rowsort
SELECT DISTINCT + 68 FROM tab0 GROUP BY tab0.col1
----
68

query I rowsort
SELECT DISTINCT + + tab2.col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col1 * - 43 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-1892
-2451
-258

query I rowsort
SELECT ALL + + tab2.col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL - 18 AS col0 FROM tab0 GROUP BY tab0.col2
----
-18
-18
-18

query I rowsort
SELECT ALL - cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-44
-57
-6

query I rowsort
SELECT 14 FROM tab2 GROUP BY tab2.col0
----
14
14
14

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 / tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL = NULL
----

query I rowsort
SELECT DISTINCT + tab1.col2 - col2 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT + + tab2.col0 * + 79 FROM tab2 GROUP BY col0
----
1185
7189
7268

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 12 col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-12

onlyif mysql # DIV for integer division: 
query I rowsort label-3083
SELECT + cor0.col0 DIV + 84 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3083
SELECT + cor0.col0 / + 84 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3772
5369
915

query I rowsort
SELECT + 59 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
59
59
59

query I rowsort
SELECT DISTINCT 78 - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
17
19
37

query I rowsort
SELECT DISTINCT cor0.col2 * 10 AS col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col2
----
240
380
790

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3088
SELECT DISTINCT CAST( NULL AS DECIMAL ) col2 FROM tab1 cor0 GROUP BY col2
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3088
SELECT DISTINCT CAST ( NULL AS REAL ) col2 FROM tab1 cor0 GROUP BY col2
----
NULL

query I rowsort
SELECT DISTINCT ( 92 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - cor0.col1 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT ALL - + 73 AS col0 FROM tab2 GROUP BY tab2.col2
----
-73
-73
-73

query I rowsort
SELECT DISTINCT - - 0 FROM tab1 GROUP BY tab1.col0
----
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3093
SELECT cor0.col2 * CAST( 63 AS SIGNED ) AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1512
2394
4977

skipif mysql # not compatible
query I rowsort label-3093
SELECT cor0.col2 * CAST ( 63 AS INTEGER ) AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1512
2394
4977

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL - ( 50 ) * - 20 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
1000
1000
1000

query I rowsort
SELECT + 37 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
37
37
37

query I rowsort
SELECT - 91 AS col0 FROM tab0 GROUP BY tab0.col0
----
-91
-91
-91

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
58
79
87

query I rowsort
SELECT + - 42 AS col1 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
-42
-42
-42

query I rowsort
SELECT DISTINCT cor0.col0 * + 54 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
4914
4968
810

query I rowsort
SELECT + - 12 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-540
-852
-96

query I rowsort
SELECT ALL 46 + 17 FROM tab0 cor0 GROUP BY cor0.col1
----
63
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + - tab1.col2 * + tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
-1980
-4970
-56

query I rowsort
SELECT + ( cor0.col2 ) * + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + + 40 AS col1 FROM tab2 GROUP BY tab2.col0
----
40

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( + 2, cor0.col2, cor0.col2 * cor0.col2 ) FROM tab1 cor0 GROUP BY cor0.col1
----
-2
-2
-2

onlyif mysql # DIV for integer division: 
query I rowsort label-3107
SELECT + 47 DIV - 1 FROM tab1 GROUP BY tab1.col2
----
-47
-47
-47

skipif mysql # not compatible
query I rowsort label-3107
SELECT + 47 / - 1 FROM tab1 GROUP BY tab1.col2
----
-47
-47
-47

query I rowsort
SELECT ALL - 25 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-25
-25
-25

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - 59 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3422
-4661
-5133

query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
132
1596
3608

query I rowsort
SELECT ALL + 84 FROM tab2 GROUP BY tab2.col0
----
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * - 86 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2064
-3268
-6794

query I rowsort
SELECT - + tab2.col1 - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT ALL - col1 * 12 FROM tab2 GROUP BY tab2.col1
----
-492
-708
-732

query I rowsort
SELECT DISTINCT - 38 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3458
-3496
-570

query I rowsort
SELECT ALL + + ( - 22 ) FROM tab1 GROUP BY tab1.col0
----
-22
-22
-22

query I rowsort
SELECT + 78 FROM tab0 GROUP BY tab0.col2
----
78
78
78

query I rowsort
SELECT - ( - ( tab2.col2 ) ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + 65 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
147
87
93

query I rowsort
SELECT ALL 71 FROM tab2 AS cor0 GROUP BY col1
----
71
71
71

query I rowsort
SELECT + cor0.col2 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - 64 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-64

onlyif mysql # DIV for integer division: 
query I rowsort label-3124
SELECT DISTINCT cor0.col0 + + 77 DIV 30 col0 FROM tab1 AS cor0 GROUP BY col0
----
24
30
84

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3124
SELECT DISTINCT cor0.col0 + + 77 / 30 col0 FROM tab1 AS cor0 GROUP BY col0
----
24
30
84

query I rowsort
SELECT 63 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
63
63
63

query I rowsort
SELECT ALL - ( + 57 ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-57
-57
-57

query I rowsort
SELECT ALL col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
44
57
6

query I rowsort
SELECT DISTINCT + cor0.col1 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 57 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
57

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3130
SELECT - + tab2.col1 + CAST( 96 AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
35
37
55

skipif mysql # not compatible
query I rowsort label-3130
SELECT - + tab2.col1 + CAST ( 96 AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
35
37
55

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3131
SELECT - - col1 - - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3131
SELECT - - col1 - - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT ALL + tab0.col2 - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
0
0

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

query I rowsort
SELECT cor0.col0 + + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
166
52
86

query I rowsort
SELECT ALL 1 - 18 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-17
-17
-17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
0
0
81

query I rowsort
SELECT 61 FROM tab0 AS cor0 GROUP BY cor0.col1
----
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 60 col1 FROM tab2 GROUP BY tab2.col1
----
-60
-60
-60

query I rowsort
SELECT 51 FROM tab2 AS cor0 GROUP BY col2
----
51
51
51

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.col1 * - 53 col0 FROM tab0 GROUP BY col1
----
0
4293

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 7 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
7

query I rowsort
SELECT ALL + 73 + + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
131
152
160

query I rowsort
SELECT DISTINCT + - tab2.col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col1 * ( 66 ) FROM tab1 cor0 GROUP BY cor0.col1
----
2904
3762
396

query I rowsort
SELECT - 70 FROM tab0 AS cor0 GROUP BY col2
----
-70
-70
-70

query I rowsort
SELECT - 22 AS col2 FROM tab1 GROUP BY tab1.col0
----
-22
-22
-22

query I rowsort
SELECT 89 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
89
89
89

query I rowsort
SELECT ALL - col0 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT ALL col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + cor0.col0 + 19 * - 54 FROM tab2 cor0 GROUP BY cor0.col0
----
-1011
-934
-935

query I rowsort
SELECT ALL cor0.col0 + + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT ALL + COALESCE ( 60, col1 ) AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
60
60
60

query I rowsort
SELECT ALL - 99 AS col1 FROM tab2 GROUP BY tab2.col1
----
-99
-99
-99

query I rowsort
SELECT + ( col2 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 + tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT DISTINCT - 63 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-3654
-4977
-5481

query I rowsort
SELECT ALL + 70 FROM tab0 GROUP BY col2
----
70
70
70

query I rowsort
SELECT - ( + tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 44 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
44
44

query I rowsort
SELECT DISTINCT + cor0.col2 * + 44 + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1080
1710
3555

query I rowsort
SELECT DISTINCT + 13 FROM tab1 GROUP BY tab1.col1
----
13

query I rowsort
SELECT - - 67 * - 95 FROM tab1 GROUP BY tab1.col2
----
-6365
-6365
-6365

query I rowsort
SELECT + tab2.col2 + + tab2.col2 * col2 FROM tab2 GROUP BY tab2.col2
----
3422
6320
7656

query I rowsort
SELECT DISTINCT - + 47 FROM tab0 GROUP BY tab0.col2
----
-47

query I rowsort
SELECT ALL - tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT + 29 AS col1 FROM tab2 GROUP BY tab2.col1
----
29
29
29

query I rowsort
SELECT DISTINCT + 82 AS col1 FROM tab1 GROUP BY tab1.col0
----
82

query I rowsort
SELECT ALL + col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL - 72 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-72
-72
-72

query I rowsort
SELECT DISTINCT - 64 + 40 AS col1 FROM tab1 GROUP BY tab1.col1
----
-24

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 72, col2 + 98 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
-72
-72

query I rowsort
SELECT - 54 * 58 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3132
-3132
-3132

query I rowsort
SELECT 70 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 84 col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-84
-84

query I rowsort
SELECT 95 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
95
95
95

query I rowsort
SELECT DISTINCT - col2 - - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0

query I rowsort
SELECT DISTINCT 86 FROM tab0 GROUP BY tab0.col2
----
86

query I rowsort
SELECT + ( tab0.col0 ) * - 79 FROM tab0 GROUP BY tab0.col0
----
-2054
-3397
-6557

query I rowsort
SELECT col1 FROM tab1 GROUP BY tab1.col1 HAVING ( NULL ) IS NULL
----
44
57
6

query I rowsort
SELECT ALL + tab1.col0 + + 19 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1476
-396
-504

query I rowsort
SELECT ALL - 59 FROM tab1 GROUP BY tab1.col0
----
-59
-59
-59

query I rowsort
SELECT + tab1.col0 - col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3187
SELECT DISTINCT cor0.col2 DIV cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-3187
SELECT DISTINCT cor0.col2 / cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1

query I rowsort
SELECT ALL col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2, cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-3189
SELECT + - tab0.col2 - tab0.col2 DIV + 71 AS col2 FROM tab0 GROUP BY col2
----
-24
-38
-80

skipif mysql # not compatible
query I rowsort label-3189
SELECT + - tab0.col2 - tab0.col2 / + 71 AS col2 FROM tab0 GROUP BY col2
----
-24
-38
-80

query I rowsort
SELECT + 36 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
36
36
36

query I rowsort
SELECT DISTINCT 14 FROM tab2 AS cor0 GROUP BY cor0.col2
----
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab2.col0 * - 63 col2 FROM tab2 GROUP BY tab2.col0
----
-5733
-5796
-945

query I rowsort
SELECT 56 AS col0 FROM tab0 GROUP BY tab0.col1
----
56
56

onlyif mysql # DIV for integer division: 
query I rowsort label-3194
SELECT DISTINCT - 18 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-3194
SELECT DISTINCT - 18 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

query I rowsort
SELECT + - 97 FROM tab2 GROUP BY col2
----
-97
-97
-97

query I rowsort
SELECT DISTINCT 75 FROM tab0 AS cor0 GROUP BY cor0.col0
----
75

query I rowsort
SELECT + 36 FROM tab0 GROUP BY tab0.col1
----
36
36

query I rowsort
SELECT - 0 + - tab2.col0 * + col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT - 11 AS col2 FROM tab1 GROUP BY tab1.col0
----
-11
-11
-11

query I rowsort
SELECT DISTINCT + tab0.col1 * + tab0.col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6642

query I rowsort
SELECT ALL + 6 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
28
34
88

query I rowsort
SELECT ALL + 68 FROM tab0 AS cor0 GROUP BY cor0.col2
----
68
68
68

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3203
SELECT + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3203
SELECT + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 44 FROM tab0 AS cor0 GROUP BY col0, col0
----
44

query I rowsort
SELECT - col0 AS col2 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT - 12 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-38
-55
-95

query I rowsort
SELECT ALL tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING ( - col2 ) BETWEEN ( col2 ) AND NULL
----

query I rowsort
SELECT 29 FROM tab0 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT cor0.col0 + + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - 75 FROM tab2 cor0 GROUP BY cor0.col2
----
-75

query I rowsort
SELECT + + col1 * + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 65 col2 FROM tab2 GROUP BY tab2.col1
----
65
65
65

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3213
SELECT - - CAST( NULL AS SIGNED ) - - 9 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3213
SELECT - - CAST ( NULL AS INTEGER ) - - 9 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col2 + 29 FROM tab1 AS cor0 GROUP BY cor0.col2
----
100
37
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 21 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT DISTINCT - 38 AS col2 FROM tab1 GROUP BY col1
----
-38

query I rowsort
SELECT DISTINCT 85 AS col0 FROM tab2 GROUP BY tab2.col2
----
85

query I rowsort
SELECT DISTINCT - + tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT + 15 FROM tab0 GROUP BY tab0.col2
----
15

query I rowsort
SELECT ALL col0 + - cor0.col0 * - col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1892
6972
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 57 col2 FROM tab0 GROUP BY tab0.col2
----
-57

query I rowsort
SELECT ALL - 85 + - col1 * + tab1.col1 FROM tab1 GROUP BY col1
----
-121
-2021
-3334

query I rowsort
SELECT DISTINCT + - 60 FROM tab2 GROUP BY tab2.col0
----
-60

onlyif mysql # DIV for integer division: 
query I rowsort label-3224
SELECT ALL col0 + - tab0.col0 DIV + ( tab0.col0 DIV tab0.col0 ) AS col2 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3224
SELECT ALL col0 + - tab0.col0 / + ( tab0.col0 / tab0.col0 ) AS col2 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT ALL 8 + tab0.col0 * 46 FROM tab0 GROUP BY tab0.col0
----
1204
1986
3826

query I rowsort
SELECT + 1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - 13 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-13

query I rowsort
SELECT + 13 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
13
13
13

query I rowsort
SELECT DISTINCT + 58 * + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2378
3422
3538

query I rowsort
SELECT DISTINCT - ( - 30 ) + tab0.col2 FROM tab0 GROUP BY col2
----
109
54
68

query I rowsort
SELECT 86 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
86
86
86

query I rowsort
SELECT DISTINCT + 61 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
61

query I rowsort
SELECT ALL - cor0.col0 * + 98 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-1470
-8918
-9016

query I rowsort
SELECT ALL tab1.col0 * - 9 AS col1 FROM tab1 GROUP BY tab1.col0
----
-198
-252
-738

query I rowsort
SELECT cor0.col0 * + ( - cor0.col1 ) + cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-690
2912
4692

query I rowsort
SELECT 34 * + cor0.col0 + cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
3185
3220
525

query I rowsort
SELECT + cor0.col2 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
102
150
170

query I rowsort
SELECT ALL + - tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT 45 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL cor0.col0 - cor0.col0 * col0 FROM tab2 cor0 GROUP BY cor0.col0, col0, cor0.col2
----
-210
-8190
-8372

onlyif mysql # DIV for integer division: 
query I rowsort label-3242
SELECT 50 DIV - 91 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3242
SELECT 50 / - 91 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0
0

query I rowsort
SELECT + cor0.col1 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL - + 42 AS col0 FROM tab0 GROUP BY tab0.col0
----
-42
-42
-42

query I rowsort
SELECT ALL - - tab0.col0 * - col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL + 92 FROM tab1 GROUP BY tab1.col0
----
92
92
92

query I rowsort
SELECT ALL + - tab0.col0 - + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

query I rowsort
SELECT ALL - 31 FROM tab1 GROUP BY tab1.col0
----
-31
-31
-31

query I rowsort
SELECT 91 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
91
91
91

query I rowsort
SELECT + 69 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT DISTINCT + tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - 83 AS col2 FROM tab2 GROUP BY tab2.col0
----
-83
-83
-83

query I rowsort
SELECT - cor0.col2 * ( + cor0.col2 ) AS col2 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
-1444
-576
-6241

query I rowsort
SELECT ALL + 12 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
12
12
12

query I rowsort
SELECT DISTINCT 62 FROM tab1 AS cor0 GROUP BY col2
----
62

query I rowsort
SELECT DISTINCT - cor0.col2 * + col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT 38 AS col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab0.col1 * + col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT + + tab2.col2 + + 0 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + cor0.col1 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3261
SELECT + cor0.col1 DIV + 4 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
11
14

skipif mysql # not compatible
query I rowsort label-3261
SELECT + cor0.col1 / + 4 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
11
14

onlyif mysql # DIV for integer division: 
query I rowsort label-3262
SELECT ALL cor0.col2 DIV cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3262
SELECT ALL cor0.col2 / cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
1
1
1

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT + 76 * + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
4408
6004
6612

query I rowsort
SELECT - + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT - cor0.col1 + - 82 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-126
-139
-88

query I rowsort
SELECT ALL - + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT - + 26 FROM tab1 GROUP BY tab1.col0
----
-26
-26
-26

query I rowsort
SELECT - ( tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + 1 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT - + 29 AS col1 FROM tab1 GROUP BY tab1.col2
----
-29
-29
-29

query I rowsort
SELECT + 46 * col2 + + col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1147
1831
3660

query I rowsort
SELECT DISTINCT cor0.col2 + + ( - 76 ) FROM tab1 AS cor0 GROUP BY col2
----
-31
-5
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 col2 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + tab1.col0 * col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT ALL 12 FROM tab0 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT ALL tab1.col2 * 70 FROM tab1 GROUP BY tab1.col2
----
3150
4970
560

query I rowsort
SELECT ALL + tab1.col2 * + 60 FROM tab1 GROUP BY tab1.col2
----
2700
4260
480

query I rowsort
SELECT ALL 56 * 17 FROM tab2 GROUP BY tab2.col1
----
952
952
952

query I rowsort
SELECT 62 FROM tab0 GROUP BY tab0.col1
----
62
62

query I rowsort
SELECT ALL 93 AS col1 FROM tab1 GROUP BY col2
----
93
93
93

query I rowsort
SELECT 22 * 17 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
374
374
374

query I rowsort
SELECT DISTINCT + + 48 FROM tab1 GROUP BY tab1.col1
----
48

query I rowsort
SELECT + 34 AS col2 FROM tab0 GROUP BY tab0.col2
----
34
34
34

query I rowsort
SELECT DISTINCT - 34 - - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
-34
47

query I rowsort
SELECT + 52 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT - tab2.col0 * 63 FROM tab2 GROUP BY col0
----
-5733
-5796
-945

query I rowsort
SELECT - + 61 AS col2 FROM tab2 GROUP BY tab2.col0
----
-61
-61
-61

query I rowsort
SELECT + 49 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
49
49

query I rowsort
SELECT - 60 FROM tab1 GROUP BY tab1.col1
----
-60
-60
-60

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
15
91
92

query I rowsort
SELECT + cor0.col0 * 19 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1729
1748
285

onlyif mysql # DIV for integer division: 
query I rowsort label-3293
SELECT ALL cor0.col2 DIV cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3293
SELECT ALL cor0.col2 / cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
1
1
1

query I rowsort
SELECT + 30 AS col0 FROM tab1 GROUP BY col2
----
30
30
30

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
-44
-57
-6

query I rowsort
SELECT - + tab0.col2 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL + col1 + + 19 AS col2 FROM tab2 GROUP BY tab2.col1
----
60
78
80

query I rowsort
SELECT - tab0.col2 - - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * - ( 56 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-2520
-3976
-448

query I rowsort
SELECT DISTINCT + 66 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
66

query I rowsort
SELECT - 34 - + 43 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-77
-77

query I rowsort
SELECT - - 38 FROM tab1 GROUP BY col1
----
38
38
38

query I rowsort
SELECT ALL - + tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT - 88 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-88

query I rowsort
SELECT DISTINCT 25 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
25

query I rowsort
SELECT 93 * - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-3813
-5487
-5673

query I rowsort
SELECT - cor0.col2 * 7 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-406
-553
-609

query I rowsort
SELECT - 10 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-10
-10
-10

query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT + col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - + 74 FROM tab0 GROUP BY tab0.col0
----
-74
-74
-74

onlyif mysql # DIV for integer division: 
query I rowsort label-3312
SELECT + col2 DIV + tab0.col2 FROM tab0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3312
SELECT + col2 / + tab0.col2 FROM tab0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT - - ( 64 ) * - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-5824
-5888
-960

query I rowsort
SELECT tab1.col0 * 74 FROM tab1 GROUP BY tab1.col0
----
1628
2072
6068

query I rowsort
SELECT + cor0.col2 * - 26 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1170
-1846
-208

query I rowsort
SELECT ALL - 38 FROM tab1 GROUP BY tab1.col0
----
-38
-38
-38

query I rowsort
SELECT - - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL - 34 * - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1394
2006
2074

query I rowsort
SELECT ALL + 77 AS col2 FROM tab1 GROUP BY tab1.col1
----
77
77
77

query I rowsort
SELECT ALL - 24 AS col1 FROM tab0 GROUP BY tab0.col1
----
-24
-24

query I rowsort
SELECT DISTINCT cor0.col0 + + 89 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
115
132
172

query I rowsort
SELECT + tab0.col2 + tab0.col2 FROM tab0 GROUP BY col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col1 * 56 col1 FROM tab1 GROUP BY tab1.col1
----
-2464
-3192
-336

query I rowsort
SELECT ALL - 57 AS col1 FROM tab0 GROUP BY tab0.col0
----
-57
-57
-57

query I rowsort
SELECT DISTINCT - + tab0.col2 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
0

query I rowsort
SELECT 91 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor0.col1
----
91
91

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3327
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-3327
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col2
----
NULL

query I rowsort
SELECT 13 FROM tab0 cor0 GROUP BY cor0.col0
----
13
13
13

query I rowsort
SELECT ALL 32 FROM tab0 GROUP BY tab0.col2
----
32
32
32

query I rowsort
SELECT + 61 + + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
106
132
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + - 97 FROM tab2 GROUP BY tab2.col0
----
-97
-97
-97

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 49 - - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
120
57
94

query I rowsort
SELECT 1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
1

query I rowsort
SELECT ALL 37 FROM tab1 GROUP BY tab1.col1
----
37
37
37

query I rowsort
SELECT ALL 10 AS col0 FROM tab2 GROUP BY tab2.col1
----
10
10
10

query I rowsort
SELECT 68 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
68
68
68

query I rowsort
SELECT ALL 6 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT + 92 FROM tab0 cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT ALL col0 * + 46 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
1196
1978
3818

query I rowsort
SELECT DISTINCT - 99 AS col1 FROM tab1 GROUP BY tab1.col0
----
-99

query I rowsort
SELECT 47 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
47
47
47

query I rowsort
SELECT + + 45 FROM tab2 GROUP BY tab2.col2
----
45
45
45

query I rowsort
SELECT ALL 31 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
31
31
31

query I rowsort
SELECT - 40 FROM tab1 GROUP BY tab1.col0
----
-40
-40
-40

query I rowsort
SELECT 76 + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
120
133
82

query I rowsort
SELECT - 76 AS col2 FROM tab0 GROUP BY tab0.col1
----
-76
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( 37 ) col2 FROM tab2 GROUP BY tab2.col1
----
37

query I rowsort
SELECT DISTINCT + tab1.col1 + 96 FROM tab1 GROUP BY tab1.col1
----
102
140
153

query I rowsort
SELECT ALL - 63 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-63
-63
-63

query I rowsort
SELECT ALL 22 FROM tab1 GROUP BY tab1.col0
----
22
22
22

query I rowsort
SELECT DISTINCT tab1.col0 - + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT ALL ( 19 ) - 54 AS col1 FROM tab0 GROUP BY tab0.col0
----
-35
-35
-35

query I rowsort
SELECT - - 43 AS col1 FROM tab2 GROUP BY tab2.col1
----
43
43
43

query I rowsort
SELECT - - ( 97 ) FROM tab1 GROUP BY tab1.col1
----
97
97
97

query I rowsort
SELECT DISTINCT ( - col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-3360
SELECT ALL + 11 - - col0 DIV - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
10
10
10

skipif mysql # not compatible
query I rowsort label-3360
SELECT ALL + 11 - - col0 / - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
10
10
10

query I rowsort
SELECT cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
225
8281
8464

query I rowsort
SELECT - tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL <> NULL
----

query I rowsort
SELECT + tab1.col0 AS col1 FROM tab1 WHERE NULL <> NULL GROUP BY tab1.col0
----

onlyif mysql # DIV for integer division: 
query I rowsort label-3364
SELECT - tab1.col1 + tab1.col1 DIV - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-45
-58
-7

skipif mysql # not compatible
query I rowsort label-3364
SELECT - tab1.col1 + tab1.col1 / - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-45
-58
-7

onlyif mysql # DIV for integer division: 
query I rowsort label-3365
SELECT - cor0.col2 DIV + col2 + - col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-25
-39
-80

skipif mysql # not compatible
query I rowsort label-3365
SELECT - cor0.col2 / + col2 + - col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-25
-39
-80

query I rowsort
SELECT ALL 95 + + 28 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
123
123
123

query I rowsort
SELECT ALL + col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 14 AS col2 FROM tab0 GROUP BY tab0.col2
----
14

query I rowsort
SELECT ALL - 59 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2655
-4189
-472

query I rowsort
SELECT DISTINCT - - tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY col1, cor0.col1
----
44
57
6

query I rowsort
SELECT - 16 AS col1 FROM tab2 cor0 GROUP BY col0
----
-16
-16
-16

query I rowsort
SELECT 64 FROM tab1 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2, col0
----
22
28
82

query I rowsort
SELECT DISTINCT 31 FROM tab0 GROUP BY col2
----
31

query I rowsort
SELECT ALL + cor0.col1 + 6 FROM tab1 AS cor0 GROUP BY col1
----
12
50
63

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 22 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
22

query I rowsort
SELECT DISTINCT - 71 + + tab0.col2 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1373
505
6170

query I rowsort
SELECT DISTINCT - + 31 * 13 FROM tab1 GROUP BY tab1.col0
----
-403

query I rowsort
SELECT 32 FROM tab1 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT ALL - tab2.col2 - - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - + tab0.col1 - + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-162
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col0 + + tab2.col0 col0 FROM tab2 GROUP BY tab2.col0 HAVING ( NULL ) IS NULL
----
0

query I rowsort
SELECT ALL + cor0.col1 * ( - cor0.col0 ) + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-126
-1539
-3564

query I rowsort
SELECT DISTINCT + 78 FROM tab2 GROUP BY tab2.col1
----
78

query I rowsort
SELECT + 52 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
52
52
52

query I rowsort
SELECT 86 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
86
86
86

query I rowsort
SELECT - 66 FROM tab2 GROUP BY tab2.col1
----
-66
-66
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 27 col1 FROM tab2 GROUP BY tab2.col0
----
-27
-27
-27

onlyif mysql # DIV for integer division: 
query I rowsort label-3392
SELECT ALL + 17 DIV - 24 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3392
SELECT ALL + 17 / - 24 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + 80 FROM tab0 GROUP BY col2
----
80
80
80

query I rowsort
SELECT ALL + 68 AS col0 FROM tab2 GROUP BY tab2.col0
----
68
68
68

query I rowsort
SELECT DISTINCT - 15 FROM tab1 GROUP BY tab1.col0
----
-15

query I rowsort
SELECT - 79 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-79
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 54 + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
137
80
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col0 * tab2.col0 col0 FROM tab2 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT ALL + tab1.col1 + 81 AS col0 FROM tab1 GROUP BY tab1.col1
----
125
138
87

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT DISTINCT 56 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
56

query I rowsort
SELECT 36 FROM tab0 AS cor0 GROUP BY cor0.col1
----
36
36

query I rowsort
SELECT col1 - - 44 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
101
50
88

query I rowsort
SELECT - cor0.col1 + - 51 FROM tab0 AS cor0 GROUP BY col2, col1
----
-132
-51
-51

query I rowsort
SELECT ALL col1 + COALESCE ( - 9, cor0.col1 + col1, 23 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-9
72

query I rowsort
SELECT 99 * + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col2, cor0.col2, cor0.col0
----
2574
4257
8217

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col0 - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - + 74 AS col1 FROM tab2 GROUP BY tab2.col2
----
-74
-74
-74

query I rowsort
SELECT ALL - cor0.col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - 40 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-40
-40
-40

query I rowsort
SELECT + + 3 AS col1 FROM tab1 GROUP BY tab1.col2
----
3
3
3

query I rowsort
SELECT 53 FROM tab0 AS cor0 GROUP BY cor0.col1
----
53
53

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1681
-3481
-3721

query I rowsort
SELECT ALL ( cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT 3 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
3
3

query I rowsort
SELECT col2 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - - tab2.col0 AS col2 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT + ( - cor0.col1 ) + - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-162
0

query I rowsort
SELECT DISTINCT - + tab2.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 tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col0 * + 16 - - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1547
1564
255

query I rowsort
SELECT ALL NULLIF ( 60, - col1 + cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
60
60
60

onlyif mysql # DIV for integer division: 
query I rowsort label-3425
SELECT + col1 DIV + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3425
SELECT + col1 / + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 82 col0 FROM tab1 GROUP BY tab1.col1
----
82
82
82

query I rowsort
SELECT DISTINCT 1 FROM tab0 GROUP BY tab0.col0
----
1

onlyif mysql # DIV for integer division: 
query I rowsort label-3428
SELECT ALL - tab0.col1 DIV 29 FROM tab0 GROUP BY tab0.col1
----
-2
0

skipif mysql # not compatible
query I rowsort label-3428
SELECT ALL - tab0.col1 / 29 FROM tab0 GROUP BY tab0.col1
----
-2
0

query I rowsort
SELECT 80 * 28 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2240
2240
2240

query I rowsort
SELECT DISTINCT 27 * + 83 FROM tab1 GROUP BY col2
----
2241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 18 + tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
40
61
69

query I rowsort
SELECT + + ( 14 ) AS col0 FROM tab2 GROUP BY col1
----
14
14
14

query I rowsort
SELECT - 99 * COALESCE ( + tab0.col0, 61 ) FROM tab0 GROUP BY tab0.col0
----
-2574
-4257
-8217

query I rowsort
SELECT DISTINCT - 69 - + 72 AS col0 FROM tab1 GROUP BY tab1.col0
----
-141

onlyif mysql # DIV for integer division: 
query I rowsort label-3435
SELECT DISTINCT 44 DIV tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
0
5

skipif mysql # not compatible
query I rowsort label-3435
SELECT DISTINCT 44 / tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
0
5

query I rowsort
SELECT - col2 * 85 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4930
-6715
-7395

query I rowsort
SELECT cor0.col1 - + cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - - 23 * - 12 AS col0 FROM tab0 GROUP BY tab0.col2
----
-276
-276
-276

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT - + 13 AS col2 FROM tab2 GROUP BY tab2.col1
----
-13
-13
-13

query I rowsort
SELECT + + 23 AS col0 FROM tab1 GROUP BY tab1.col1
----
23
23
23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3442
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-3442
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
NULL

query I rowsort
SELECT ALL - 14 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-14
-14
-14

onlyif mysql # DIV for integer division: 
query I rowsort label-3444
SELECT + cor0.col0 DIV - 8 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-10
-2
-3

skipif mysql # not compatible
query I rowsort label-3444
SELECT + cor0.col0 / - 8 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-10
-2
-3

query I rowsort
SELECT - tab1.col2 AS col0 FROM tab1, tab1 AS cor0 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + 83 AS col1 FROM tab0 GROUP BY col0
----
83
83
83

query I rowsort
SELECT 62 + + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
153
154
77

query I rowsort
SELECT col2 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT ALL cor0.col1 + col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6480
0

query I rowsort
SELECT ALL + 38 FROM tab1 GROUP BY tab1.col0
----
38
38
38

query I rowsort
SELECT + 76 FROM tab0 AS cor0 GROUP BY cor0.col0
----
76
76
76

query I rowsort
SELECT DISTINCT + + tab2.col2 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT ALL - + ( 87 ) AS col1 FROM tab2 GROUP BY col2
----
-87
-87
-87

query I rowsort
SELECT + tab2.col0 * + col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT - - cor0.col2 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + + 44 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
44
44

query I rowsort
SELECT - cor0.col2 FROM tab0 cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT - tab2.col0 * 91 FROM tab2 GROUP BY tab2.col0
----
-1365
-8281
-8372

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
15
91
92

query I rowsort
SELECT - 10 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-410
-590
-610

query I rowsort
SELECT tab0.col1 * + 85 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
6885

query I rowsort
SELECT ALL + col1 * - 0 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT - cor0.col0 * 53 + - 41 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1378
-4399
-5600

query I rowsort
SELECT ALL + 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 ALL + + 33 + tab2.col0 col0 FROM tab2 GROUP BY col0
----
124
125
48

query I rowsort
SELECT DISTINCT + ( + cor0.col2 ) * 36 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
2180
2935
3147

query I rowsort
SELECT ALL + + 72 FROM tab1 GROUP BY tab1.col1
----
72
72
72

query I rowsort
SELECT 96 + + 54 AS col1 FROM tab0 GROUP BY tab0.col1
----
150
150

query I rowsort
SELECT DISTINCT - cor0.col2 * - col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT - 25 + 12 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-13
-13
-13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT 50 FROM tab0 AS cor0 GROUP BY col0
----
50
50
50

onlyif mysql # DIV for integer division: 
query I rowsort label-3473
SELECT col0 DIV tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3473
SELECT col0 / tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0
0
81

query I rowsort
SELECT ALL - + col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-58
-79
-87

query I rowsort
SELECT - 21 AS col0 FROM tab1 GROUP BY col1
----
-21
-21
-21

query I rowsort
SELECT ALL 40 * - 29 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1160
-1160
-1160

query I rowsort
SELECT DISTINCT + 96 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
96

query I rowsort
SELECT - cor0.col1 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3481
SELECT - ( + cor0.col0 ) DIV cor0.col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-3481
SELECT - ( + cor0.col0 ) / cor0.col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-1
-2
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - cor0.col0 - + 45 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-128
-71
-88

query I rowsort
SELECT + 20 FROM tab0 GROUP BY col0
----
20
20
20

query I rowsort
SELECT - 77 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-77
-77
-77

query I rowsort
SELECT col2 + - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 77 * + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1848
2926
6083

query I rowsort
SELECT DISTINCT + - 69 + - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-160
-161
-84

query I rowsort
SELECT 41 + + cor0.col0 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1346
5377
7230

query I rowsort
SELECT - cor0.col0 * 75 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1650
-2100
-6150

query I rowsort
SELECT DISTINCT tab0.col0 + 77 FROM tab0 GROUP BY tab0.col0
----
103
120
160

query I rowsort
SELECT - + 32 AS col1 FROM tab1 GROUP BY tab1.col2
----
-32
-32
-32

query I rowsort
SELECT ALL - ( - tab1.col2 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT - 61 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-61
-61
-61

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-3496
SELECT + col1 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3496
SELECT + col1 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1
1
1

query I rowsort
SELECT + 18 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT DISTINCT NULLIF ( + cor0.col0, cor0.col0 ) + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT - 67 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-67

query I rowsort
SELECT DISTINCT - 21 * cor0.col0 + - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1804
-484
-616

query I rowsort
SELECT ALL 87 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
87
87

query I rowsort
SELECT ALL tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT 73 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
73
73
73

query I rowsort
SELECT - 62 AS col0 FROM tab2 GROUP BY tab2.col1
----
-62
-62
-62

query I rowsort
SELECT + cor0.col1 - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-32
-51
46

query I rowsort
SELECT DISTINCT - - 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 + - col0 col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT - 33 FROM tab1 GROUP BY tab1.col2
----
-33
-33
-33

query I rowsort
SELECT - 32 * col2 + - 36 AS col1 FROM tab2 GROUP BY tab2.col2
----
-1892
-2564
-2820

query I rowsort
SELECT 55 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
137
77
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 72 col2 FROM tab2 GROUP BY tab2.col1
----
72
72
72

query I rowsort
SELECT - - col0 - + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL - 39 + - 73 FROM tab1 GROUP BY tab1.col1
----
-112
-112
-112

query I rowsort
SELECT + 54 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
54
54
54

query I rowsort
SELECT ALL 51 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
51
51
51

query I rowsort
SELECT ALL - 78 FROM tab0 cor0 GROUP BY cor0.col1
----
-78
-78

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT - 25 AS col0 FROM tab1 GROUP BY tab1.col1
----
-25
-25
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 3 + tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
11
48
74

query I rowsort
SELECT DISTINCT + tab0.col2 * 18 FROM tab0 GROUP BY tab0.col2
----
1422
432
684

query I rowsort
SELECT ALL + - 14 + tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
-14
67

query I rowsort
SELECT DISTINCT - cor0.col1 * - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
1681
3481
3721

query I rowsort
SELECT 88 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
88
88

query I rowsort
SELECT tab1.col2 * col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT tab2.col0 AS col2 FROM tab2 GROUP BY col0 HAVING tab2.col0 IS NULL
----

query I rowsort
SELECT + 29 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
29
29
29

query I rowsort
SELECT DISTINCT - - 32 FROM tab0 GROUP BY tab0.col2
----
32

query I rowsort
SELECT + 98 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT - 23 FROM tab1 GROUP BY tab1.col2
----
-23
-23
-23

query I rowsort
SELECT DISTINCT + 36 * + tab2.col0 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
3367
3404
555

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3532
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3532
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT + col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, col1
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3535
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3535
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + 90 * - tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-1980
-2520
-7380

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT + 98 * 91 FROM tab0 GROUP BY tab0.col2
----
8918
8918
8918

query I rowsort
SELECT - + tab1.col2 - + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-142
-16
-90

query I rowsort
SELECT + + 20 FROM tab1 GROUP BY tab1.col2
----
20
20
20

query I rowsort
SELECT DISTINCT - cor0.col1 * 94 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3854
-5546
-5734

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT - cor0.col0 * col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1032
-2054
-3154

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING ( NULL ) > NULL
----

query I rowsort
SELECT + 29 AS col0 FROM tab0 GROUP BY tab0.col2
----
29
29
29

query I rowsort
SELECT DISTINCT - ( + tab0.col0 ) FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL tab2.col2 + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT + 74 * - cor0.col1 - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-6075
0
0

query I rowsort
SELECT ALL 77 FROM tab2 GROUP BY tab2.col1
----
77
77
77

query I rowsort
SELECT DISTINCT - + col2 + + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT DISTINCT - + 18 AS col0 FROM tab1 GROUP BY tab1.col0
----
-18

query I rowsort
SELECT DISTINCT 68 FROM tab2 AS cor0 GROUP BY cor0.col0
----
68

query I rowsort
SELECT DISTINCT + tab2.col1 * + 73 FROM tab2 GROUP BY tab2.col1
----
2993
4307
4453

query I rowsort
SELECT + + 71 + + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
116
142
79

query I rowsort
SELECT + 12 FROM tab2 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT + + tab1.col2 + 18 FROM tab1 GROUP BY tab1.col2
----
26
63
89

query I rowsort
SELECT + + col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - + tab1.col2 + - NULLIF ( tab1.col2, - tab1.col2 ) AS col0 FROM tab1 GROUP BY tab1.col2
----
-142
-16
-90

query I rowsort
SELECT ALL 63 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
63
63
63

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 + col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, col1, cor0.col0
----
44
57
6

query I rowsort
SELECT ALL + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - + tab0.col2 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT cor0.col0 + - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-72
12
34

onlyif mysql # DIV for integer division: 
query I rowsort label-3565
SELECT col2 DIV 94 + 76 FROM tab0 cor0 GROUP BY col2
----
76
76
76

skipif mysql # not compatible
query I rowsort label-3565
SELECT col2 / 94 + 76 FROM tab0 cor0 GROUP BY col2
----
76
76
76

query I rowsort
SELECT DISTINCT - 75 AS col0 FROM tab2 GROUP BY col2
----
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 26 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
26
26

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + cor0.col2 * 66 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1584
2508
5214

query I rowsort
SELECT ALL col2 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col0 * + 35 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2870
770
980

query I rowsort
SELECT + + 16 - + 54 FROM tab2 GROUP BY tab2.col1
----
-38
-38
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 - cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL + tab0.col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT 14 AS col1 FROM tab0 GROUP BY tab0.col2
----
14
14
14

query I rowsort
SELECT ALL - 85 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-85
-85
-85

query I rowsort
SELECT ALL - tab2.col0 + - 30 * 24 FROM tab2 GROUP BY tab2.col0
----
-735
-811
-812

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT ALL 95 AS col0 FROM tab0 GROUP BY tab0.col1
----
95
95

onlyif mysql # DIV for integer division: 
query I rowsort label-3582
SELECT ALL + - tab2.col0 DIV tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3582
SELECT ALL + - tab2.col0 / tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 60 + 95 FROM tab2 cor0 GROUP BY cor0.col0
----
155

query I rowsort
SELECT ALL - 71 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-71
-71

query I rowsort
SELECT col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, col1
----
26
43
83

query I rowsort
SELECT DISTINCT - 49 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 4 col0 FROM tab0 GROUP BY tab0.col1
----
-4
-4

query I rowsort
SELECT 51 FROM tab1 AS cor0 GROUP BY col1
----
51
51
51

query I rowsort
SELECT DISTINCT - + 85 FROM tab0 GROUP BY tab0.col0
----
-85

query I rowsort
SELECT + + 67 FROM tab2 GROUP BY tab2.col0
----
67
67
67

query I rowsort
SELECT 19 FROM tab2 GROUP BY tab2.col0
----
19
19
19

query I rowsort
SELECT ALL 40 * - 48 FROM tab0 GROUP BY tab0.col2
----
-1920
-1920
-1920

query I rowsort
SELECT 11 FROM tab0 AS cor0 GROUP BY col1
----
11
11

onlyif mysql # DIV for integer division: 
query I rowsort label-3594
SELECT ALL + cor0.col0 DIV - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3594
SELECT ALL + cor0.col0 / - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL + + 88 AS col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
88
88

query I rowsort
SELECT ALL + + col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL - + 1 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + col2 + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT - 32 FROM tab0 GROUP BY col1
----
-32

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3600
SELECT - CAST( - col1 AS SIGNED ) FROM tab0 GROUP BY col1
----
0
81

skipif mysql # not compatible
query I rowsort label-3600
SELECT - CAST ( - col1 AS INTEGER ) FROM tab0 GROUP BY col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-3601
SELECT 17 DIV col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3601
SELECT 17 / col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + 14 FROM tab1 AS cor0 GROUP BY cor0.col1
----
14

query I rowsort
SELECT - cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT + + 63 AS col1 FROM tab0 GROUP BY col2
----
63
63
63

query I rowsort
SELECT cor0.col0 + + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
164
44
56

onlyif mysql # DIV for integer division: 
query I rowsort label-3606
SELECT - 13 DIV ( + cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3606
SELECT - 13 / ( + cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL 77 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT 97 FROM tab1 AS cor0 GROUP BY col2
----
97

query I rowsort
SELECT - 65 * col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1690
-2795
-5395

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 55 col2 FROM tab2 GROUP BY tab2.col2
----
-55
-55
-55

query I rowsort
SELECT DISTINCT 51 FROM tab1 GROUP BY tab1.col2
----
51

query I rowsort
SELECT DISTINCT + 71 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
71

onlyif mysql # DIV for integer division: 
query I rowsort label-3614
SELECT ALL - 14 * cor0.col1 + + 41 DIV - 2 FROM tab1 cor0 GROUP BY cor0.col1
----
-104
-636
-818

skipif mysql # not compatible
query I rowsort label-3614
SELECT ALL - 14 * cor0.col1 + + 41 / - 2 FROM tab1 cor0 GROUP BY cor0.col1
----
-104
-636
-818

query I rowsort
SELECT DISTINCT - 92 FROM tab2 GROUP BY col0
----
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 - 45 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
13
34
42

query I rowsort
SELECT + ( - tab0.col0 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT 29 FROM tab2 GROUP BY tab2.col1
----
29
29
29

query I rowsort
SELECT + + 24 FROM tab1 GROUP BY tab1.col1
----
24
24
24

query I rowsort
SELECT 10 FROM tab2 AS cor0 GROUP BY cor0.col2
----
10
10
10

query I rowsort
SELECT 91 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
91
91
91

query I rowsort
SELECT ALL + ( + 96 ) FROM tab1 GROUP BY col1
----
96
96
96

query I rowsort
SELECT ALL - 49 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2205
-3479
-392

query I rowsort
SELECT 35 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
35
35
35

onlyif mysql # DIV for integer division: 
query I rowsort label-3625
SELECT ALL col1 DIV 49 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3625
SELECT ALL col1 / 49 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
0
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-3626
SELECT DISTINCT cor0.col1 DIV 32 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-3626
SELECT DISTINCT cor0.col1 / 32 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col1 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
-15
-91
-92

query I rowsort
SELECT tab1.col2 * + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT ( NULL ) IS NOT NULL
----
26
43
83

query I rowsort
SELECT - + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT cor0.col2 + - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 4 col0 FROM tab0 GROUP BY tab0.col0
----
4
4
4

query I rowsort
SELECT ALL + 75 AS col2 FROM tab1 GROUP BY tab1.col0
----
75
75
75

query I rowsort
SELECT + ( cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 58 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
4698

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT - 74 + col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-13
-15
-33

query I rowsort
SELECT ALL + tab0.col1 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

onlyif mysql # DIV for integer division: 
query I rowsort label-3641
SELECT col2 DIV + 90 FROM tab1 GROUP BY col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3641
SELECT col2 / + 90 FROM tab1 GROUP BY col2
----
0
0
0

query I rowsort
SELECT DISTINCT - 20 FROM tab0 GROUP BY tab0.col2
----
-20

query I rowsort
SELECT - 67 AS col1 FROM tab0 GROUP BY tab0.col0
----
-67
-67
-67

query I rowsort
SELECT ALL + cor0.col0 + + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
166
52
86

query I rowsort
SELECT - - col0 + 36 FROM tab1 GROUP BY tab1.col0
----
118
58
64

query I rowsort
SELECT DISTINCT ( 26 ) AS col0 FROM tab0 GROUP BY tab0.col0
----
26

query I rowsort
SELECT ALL col0 * cor0.col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1806
650
6806

query I rowsort
SELECT - cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1 HAVING NOT NULL IS NOT NULL
----
-81
0

query I rowsort
SELECT ALL 15 FROM tab2 AS cor0 GROUP BY cor0.col2
----
15
15
15

query I rowsort
SELECT 23 FROM tab2 AS cor0 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT ALL - - 53 AS col2 FROM tab2 GROUP BY tab2.col0
----
53
53
53

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col2 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
1968
4997
58

query I rowsort
SELECT ALL cor0.col1 + + 78 * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-6237
0
0

query I rowsort
SELECT DISTINCT + 62 * + 16 FROM tab0 GROUP BY tab0.col1
----
992

onlyif mysql # DIV for integer division: 
query I rowsort label-3656
SELECT - 7 DIV cor0.col1 + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-15
-91
-92

skipif mysql # not compatible
query I rowsort label-3656
SELECT - 7 / cor0.col1 + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT DISTINCT tab0.col1 + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 79 col1 FROM tab1 GROUP BY tab1.col1
----
-79

query I rowsort
SELECT - 52 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-52
-52
-52

query I rowsort
SELECT DISTINCT - + 66 AS col0 FROM tab1 GROUP BY tab1.col2
----
-66

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( + 64, tab0.col0 * + tab0.col0 - NULLIF ( tab0.col1 + tab0.col1 * tab0.col0, tab0.col1 + + col1 * tab0.col2 ) ) FROM tab0 GROUP BY tab0.col2
----
64

query I rowsort
SELECT DISTINCT tab0.col0 - 50 FROM tab0 GROUP BY tab0.col0
----
-24
-7
33

query I rowsort
SELECT DISTINCT + 24 AS col1 FROM tab1 GROUP BY tab1.col2
----
24

onlyif mysql # DIV for integer division: 
query I rowsort label-3664
SELECT ALL cor0.col1 DIV + 9 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
9

skipif mysql # not compatible
query I rowsort label-3664
SELECT ALL cor0.col1 / + 9 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
9

query I rowsort
SELECT + 50 + - 51 FROM tab1 GROUP BY col1
----
-1
-1
-1

query I rowsort
SELECT ALL col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL - 3 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3
-3
-3

query I rowsort
SELECT ALL 34 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
34
34
34

query I rowsort
SELECT - 13 * 12 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
-156
-156
-156

query I rowsort
SELECT - 45 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-45
-45
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 26 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-26
-26
-26

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - cor0.col1 - cor0.col1 * + 90 FROM tab0 AS cor0 GROUP BY col1, cor0.col2, cor0.col0
----
-7371
0
0

query I rowsort
SELECT + - tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT + ( - 47 ) - 93 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-140
-140
-140

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3676
SELECT cor0.col1 * + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3676
SELECT cor0.col1 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-3677
SELECT + cor0.col0 DIV 53 FROM tab0 AS cor0 GROUP BY cor0.col0, col0, col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3677
SELECT + cor0.col0 / 53 FROM tab0 AS cor0 GROUP BY cor0.col0, col0, col0
----
0
0
1

query I rowsort
SELECT DISTINCT 81 FROM tab1 AS cor0 GROUP BY cor0.col1
----
81

query I rowsort
SELECT + cor0.col1 AS col0 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 cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-3681
SELECT + 73 DIV + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
3

skipif mysql # not compatible
query I rowsort label-3681
SELECT + 73 / + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
3

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

query I rowsort
SELECT - 16 + + 73 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
57
57
57

onlyif mysql # DIV for integer division: 
query I rowsort label-3684
SELECT DISTINCT 51 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-3684
SELECT DISTINCT 51 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0

query I rowsort
SELECT DISTINCT + cor0.col1 * 56 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
4536

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3686
SELECT + COALESCE ( tab2.col1, CAST( NULL AS SIGNED ) ) FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif mysql # not compatible
query I rowsort label-3686
SELECT + COALESCE ( tab2.col1, CAST ( NULL AS INTEGER ) ) FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + - tab0.col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL - + tab1.col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1, cor0.col1
----
58
79
87

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 ( - 6 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-6
-6
-6

query I rowsort
SELECT ALL 40 * - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1040
-1720
-3320

query I rowsort
SELECT 93 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
93
93
93

query I rowsort
SELECT ALL 11 FROM tab2 GROUP BY tab2.col0
----
11
11
11

query I rowsort
SELECT ALL - tab0.col0 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

query I rowsort
SELECT DISTINCT tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT ( 53 ) FROM tab0 GROUP BY tab0.col0
----
53

query I rowsort
SELECT DISTINCT + tab2.col0 * 60 FROM tab2 GROUP BY tab2.col0
----
5460
5520
900

query I rowsort
SELECT - cor0.col2 * - col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT + 16 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
16
16
16

query I rowsort
SELECT 4 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
4
4
4

query I rowsort
SELECT - 12 FROM tab2 AS cor0 GROUP BY col2
----
-12
-12
-12

query I rowsort
SELECT DISTINCT - 25 + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-33
-70
-96

query I rowsort
SELECT ALL + 72 * col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
3240
5112
576

query I rowsort
SELECT ( 61 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
61
61
61

query I rowsort
SELECT ALL - cor0.col2 - col2 FROM tab2 cor0 GROUP BY col1, cor0.col2, cor0.col0
----
-116
-158
-174

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + 12 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT ALL + 91 FROM tab2 GROUP BY tab2.col0
----
91
91
91

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 - - 15 FROM tab0 GROUP BY tab0.col1
----
15
15

query I rowsort
SELECT tab2.col1 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT ( tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-3714
SELECT DISTINCT + NULLIF ( 43, - tab1.col1 ) DIV col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
7

skipif mysql # not compatible
query I rowsort label-3714
SELECT DISTINCT + NULLIF ( 43, - tab1.col1 ) / col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 28 + + col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
109
28

onlyif mysql # DIV for integer division: 
query I rowsort label-3717
SELECT ALL - cor0.col0 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3717
SELECT ALL - cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + COALESCE ( 83, - cor0.col0 - cor0.col1 ) + - cor0.col0 * - 98 col2 FROM tab2 cor0 GROUP BY cor0.col0
----
1553
9001
9099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 col2 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NOT NULL
----
22
28
82

query I rowsort
SELECT ALL + - tab0.col1 + 42 FROM tab0 GROUP BY col1
----
-39
42

query I rowsort
SELECT ALL - tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-3723
SELECT + tab2.col2 DIV col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3723
SELECT + tab2.col2 / col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-3724
SELECT + cor0.col1 DIV col0 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-3724
SELECT + cor0.col1 / col0 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
0
0
2

query I rowsort
SELECT ALL 76 FROM tab1 GROUP BY tab1.col1
----
76
76
76

query I rowsort
SELECT ALL + - 77 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-158
-77

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT ALL + 14 FROM tab1 cor0 GROUP BY cor0.col0
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 + 50 col1 FROM tab1 GROUP BY tab1.col2
----
-21
42
5

query I rowsort
SELECT + - tab2.col2 + 28 AS col1 FROM tab2 GROUP BY tab2.col2
----
-30
-51
-59

query I rowsort
SELECT ALL 92 FROM tab2 AS cor0 GROUP BY col2
----
92
92
92

query I rowsort
SELECT - - 86 FROM tab2 GROUP BY tab2.col0
----
86
86
86

query I rowsort
SELECT + 96 AS col1 FROM tab0 GROUP BY tab0.col0
----
96
96
96

query I rowsort
SELECT - 78 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-17
-19
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab0.col2 col1 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT 97 AS col2 FROM tab2 GROUP BY tab2.col1
----
97
97
97

query I rowsort
SELECT ALL - tab2.col1 * 95 FROM tab2 GROUP BY tab2.col1
----
-3895
-5605
-5795

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3738
SELECT DISTINCT + + CAST( NULL AS SIGNED ) * 26 AS col2 FROM tab1 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-3738
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) * 26 AS col2 FROM tab1 GROUP BY col1
----
NULL

query I rowsort
SELECT DISTINCT ( - 79 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
-79

query I rowsort
SELECT DISTINCT 53 + - tab2.col2 * 67 AS col0 FROM tab2 GROUP BY tab2.col2
----
-3833
-5240
-5776

query I rowsort
SELECT - - tab2.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 + col0 col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT - cor0.col0 + 6 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-20
-37
-77

query I rowsort
SELECT - tab1.col2 + + 50 AS col1 FROM tab1 GROUP BY col2
----
-21
42
5

query I rowsort
SELECT cor0.col0 + + 53 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
144
145
68

query I rowsort
SELECT ( + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - 79 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1, cor0.col1
----
-79
-79
-79

query I rowsort
SELECT ALL + 86 AS col2 FROM tab2 GROUP BY tab2.col2
----
86
86
86

query I rowsort
SELECT - + 53 FROM tab2 GROUP BY tab2.col1
----
-53
-53
-53

query I rowsort
SELECT ALL - cor0.col2 + 31 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-14
-40
23

query I rowsort
SELECT DISTINCT cor0.col2 - COALESCE ( 97, cor0.col2 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
-18
-59
-73

query I rowsort
SELECT 18 FROM tab1 AS cor0 GROUP BY cor0.col1
----
18
18
18

onlyif mysql # DIV for integer division: 
query I rowsort label-3754
SELECT - cor0.col0 DIV + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3754
SELECT - cor0.col0 / + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL - 35 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-35
-35
-35

query I rowsort
SELECT - 4 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4
-4
-4

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + 65 FROM tab0 GROUP BY col0
----
65
65
65

query I rowsort
SELECT + + tab2.col0 + tab2.col0 FROM tab2 GROUP BY col0
----
182
184
30

query I rowsort
SELECT DISTINCT - 29 - + cor0.col1 * - 56 FROM tab0 AS cor0 GROUP BY cor0.col1, col1, cor0.col2
----
-29
4507

query I rowsort
SELECT DISTINCT + 24 * 42 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1008

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 98 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2352
-3724
-7742

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT cor0.col0 + + cor0.col0 * + 74 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1125
6825
6900

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * - 31 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1395
-2201
-248

query I rowsort
SELECT + tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT - + tab2.col0 + 85 FROM tab2 GROUP BY tab2.col0
----
-6
-7
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 56 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
56

query I rowsort
SELECT col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
114
12
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 16 col0 FROM tab2 GROUP BY col1
----
-16
-16
-16

query I rowsort
SELECT DISTINCT + + tab1.col1 * tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
1936
3249
36

onlyif mysql # DIV for integer division: 
query I rowsort label-3773
SELECT ALL - cor0.col2 DIV + col2 - - 11 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
10
10
10

skipif mysql # not compatible
query I rowsort label-3773
SELECT ALL - cor0.col2 / + col2 - - 11 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
10
10
10

query I rowsort
SELECT DISTINCT + 40 FROM tab2 GROUP BY tab2.col0
----
40

query I rowsort
SELECT 59 - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-32
-33
44

query I rowsort
SELECT ALL 67 FROM tab0 GROUP BY tab0.col0
----
67
67
67

query I rowsort
SELECT DISTINCT + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT + 72 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
72
72
72

query I rowsort
SELECT - tab0.col1 * - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT DISTINCT + 53 AS col1 FROM tab0 GROUP BY tab0.col1
----
53

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + + 27 FROM tab1 GROUP BY tab1.col1
----
27
27
27

query I rowsort
SELECT DISTINCT + 35 FROM tab1 GROUP BY col2
----
35

query I rowsort
SELECT DISTINCT - - 75 AS col0 FROM tab0 GROUP BY tab0.col1
----
75

query I rowsort
SELECT ALL 26 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
26
26

query I rowsort
SELECT ALL - tab1.col0 FROM tab1 WHERE NOT tab1.col1 IS NULL GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT - tab2.col0 / + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0 HAVING col0 BETWEEN ( NULL ) AND ( NULL )
----

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 AS cor0 WHERE NULL = NULL GROUP BY cor0.col0
----

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT cor1.col0 * cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
1849
676
6889

query I rowsort
SELECT ALL ( + col2 ) FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT 12 FROM tab2 cor0 GROUP BY col0
----
12

query I rowsort
SELECT DISTINCT - 25 + cor1.col2 * - 34 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-1317
-2711
-841

query I rowsort
SELECT DISTINCT - - 76 FROM tab0 GROUP BY tab0.col2
----
76

query I rowsort
SELECT - cor0.col2 AS col0 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-3798
SELECT cor0.col2 DIV + 96 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3798
SELECT cor0.col2 / + 96 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT 9 - + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-49
-70
-78

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col2, - 46 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + 84 FROM tab0 AS cor0 GROUP BY cor0.col2
----
84
84
84

query I rowsort
SELECT + col0 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + tab0.col1 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT - 18 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1026
-108
-792

query I rowsort
SELECT ALL - cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1936
3249
36

query I rowsort
SELECT ALL cor0.col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT tab2.col0 * + 31 AS col2 FROM tab2 GROUP BY tab2.col0
----
2821
2852
465

query I rowsort
SELECT ALL + 84 AS col2 FROM tab1 GROUP BY tab1.col2
----
84
84
84

query I rowsort
SELECT DISTINCT + 46 AS col1 FROM tab2 GROUP BY col2
----
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 1 + cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
45
58
7

query I rowsort
SELECT ALL 60 - - 3 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
63
63
63

query I rowsort
SELECT tab1.col2 + col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT DISTINCT tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT + tab1.col2 - col2 AS col0 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NULL
----
0
0
0

query I rowsort
SELECT DISTINCT + tab0.col2 + col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT 14 AS col2 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
44
57
6

query I rowsort
SELECT - cor0.col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
225
8281
8464

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL - cor0.col2 * - 52 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1248
1976
4108

query I rowsort
SELECT ALL + 28 FROM tab1 GROUP BY tab1.col1
----
28
28
28

query I rowsort
SELECT + 23 FROM tab1 GROUP BY tab1.col0
----
23
23
23

query I rowsort
SELECT - ( cor0.col0 ) AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL 28 FROM tab1 AS cor0 GROUP BY cor0.col0
----
28
28
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 21 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
21

query I rowsort
SELECT cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor0.col1
----
9 values hashing to a7fc3d55de9b3e11322658ec587831cf

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 68 - + tab1.col2 col1 FROM tab1 GROUP BY col2
----
-3
23
60

query I rowsort
SELECT + + 61 FROM tab2 GROUP BY tab2.col2
----
61
61
61

query I rowsort
SELECT DISTINCT + - col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - + COALESCE ( - 15, tab2.col0 - + tab2.col0 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
15
15
15

query I rowsort
SELECT ALL - NULLIF ( tab2.col2, 66 ) FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT - 29 + tab1.col0 * + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
455
6695
755

query I rowsort
SELECT - 44 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-44
-44
-44

query I rowsort
SELECT 51 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
51
51

query I rowsort
SELECT 61 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
61
61
61

query I rowsort
SELECT DISTINCT + + tab0.col0 * ( + tab0.col0 * + tab0.col0 ) FROM tab0 GROUP BY col0
----
17576
571787
79507

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 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 cor0.col1 col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT + 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 70 col1 FROM tab1 GROUP BY tab1.col1
----
70
70
70

query I rowsort
SELECT 28 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
28
28
28

query I rowsort
SELECT ALL - cor0.col2 * - ( cor0.col2 * 55 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
31680
343255
79420

query I rowsort
SELECT 98 FROM tab0 AS cor0 GROUP BY cor0.col0
----
98
98
98

onlyif mysql # DIV for integer division: 
query I rowsort label-3844
SELECT ALL - cor0.col1 DIV 47 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1
0

skipif mysql # not compatible
query I rowsort label-3844
SELECT ALL - cor0.col1 / 47 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1
0

query I rowsort
SELECT ALL - cor0.col1 * ( + 17 ) AS col2 FROM tab2 cor0 GROUP BY col1
----
-1003
-1037
-697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 61 col2 FROM tab1 GROUP BY tab1.col2
----
61
61
61

query I rowsort
SELECT - 82 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-82
-82
-82

query I rowsort
SELECT col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 76 * NULLIF ( + tab0.col0, tab0.col0 ) col2 FROM tab0 GROUP BY tab0.col0
----
NULL

query I rowsort
SELECT DISTINCT + 21 + 9 FROM tab0 GROUP BY tab0.col0
----
30

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 AS cor0 GROUP BY col1, col0
----
22
28
82

query I rowsort
SELECT - cor0.col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - tab1.col1 - 45 AS col1 FROM tab1 GROUP BY col1
----
-102
-51
-89

query I rowsort
SELECT 62 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
62
62
62

query I rowsort
SELECT + 32 FROM tab2 GROUP BY tab2.col2
----
32
32
32

query I rowsort
SELECT cor0.col1 - - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1, cor0.col2
----
133
150
76

query I rowsort
SELECT 88 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
88
88
88

query I rowsort
SELECT cor0.col0 + + 87 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
113
130
170

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 + + 70 FROM tab2 GROUP BY tab2.col0
----
70
70
70

query I rowsort
SELECT - 96 AS col0 FROM tab0 GROUP BY tab0.col0
----
-96
-96
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 31 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-31
-31

query I rowsort
SELECT 89 FROM tab2 GROUP BY tab2.col2
----
89
89
89

query I rowsort
SELECT + 70 AS col1 FROM tab1 GROUP BY tab1.col1
----
70
70
70

query I rowsort
SELECT ALL + col2 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT + 9 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 col1 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3869
SELECT ALL + cor0.col2 DIV 26 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
3
3

skipif mysql # not compatible
query I rowsort label-3869
SELECT ALL + cor0.col2 / 26 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
3
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 84 col0 FROM tab1, tab2 cor0 GROUP BY tab1.col2
----
84

query I rowsort
SELECT + tab2.col0 + 85 AS col1 FROM tab2 GROUP BY tab2.col0
----
100
176
177

query I rowsort
SELECT + 81 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1944
3078
6399

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 92, cor0.col0, + NULLIF ( + 30, 58 + + cor0.col0 ) * 77 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT ALL 19 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT DISTINCT 33 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
33

query I rowsort
SELECT DISTINCT + 12 * col2 FROM tab2 GROUP BY tab2.col2
----
1044
696
948

onlyif mysql # DIV for integer division: 
query I rowsort label-3877
SELECT ALL + tab2.col1 DIV tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3877
SELECT ALL + tab2.col1 / tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT 92 AS col1 FROM tab0 GROUP BY tab0.col2
----
92
92
92

query I rowsort
SELECT - 90 FROM tab2 GROUP BY tab2.col2
----
-90
-90
-90

query I rowsort
SELECT DISTINCT + col0 * col0 - + 12 * col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-507
7573
7972

query I rowsort
SELECT ALL + 86 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3784
-4902
-516

onlyif mysql # DIV for integer division: 
query I rowsort label-3882
SELECT DISTINCT tab1.col1 DIV - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1

skipif mysql # not compatible
query I rowsort label-3882
SELECT DISTINCT tab1.col1 / - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1

query I rowsort
SELECT DISTINCT col2 * + col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT - tab2.col2 / tab2.col2 FROM tab2 WHERE NULL IS NULL GROUP BY tab2.col2 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 - + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL < NULL
----

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT col0 FROM tab0 GROUP BY tab0.col0 HAVING ( NULL ) BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1444
576
6241

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT DISTINCT + - tab2.col0 + tab2.col0 FROM tab2 GROUP BY col0
----
0

query I rowsort
SELECT 79 FROM tab0 GROUP BY tab0.col2
----
79
79
79

query I rowsort
SELECT + ( - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1260
176
5822

query I rowsort
SELECT + 85 * col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
1848
2352
6888

query I rowsort
SELECT DISTINCT + 12 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
70
91
99

query I rowsort
SELECT 71 FROM tab2 GROUP BY tab2.col0
----
71
71
71

query I rowsort
SELECT cor0.col2 * + cor0.col2 + 4 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
2029
5045
68

query I rowsort
SELECT 88 * + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
7128

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 62 col0 FROM tab1 GROUP BY tab1.col0
----
-62
-62
-62

query I rowsort
SELECT DISTINCT - - 25 FROM tab2 GROUP BY col2
----
25

query I rowsort
SELECT - - 50 AS col0 FROM tab2 GROUP BY tab2.col1
----
50
50
50

query I rowsort
SELECT 21 * + 76 FROM tab2 GROUP BY tab2.col2
----
1596
1596
1596

query I rowsort
SELECT - 42 + - 58 FROM tab1 GROUP BY tab1.col2
----
-100
-100
-100

query I rowsort
SELECT cor0.col1 - - col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT DISTINCT - tab2.col1 * - 47 + + tab2.col1 * tab2.col1 FROM tab2 GROUP BY col1
----
3608
6254
6588

query I rowsort
SELECT ALL + col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL tab2.col2 + + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IS NOT NULL
----
116
158
174

query I rowsort
SELECT tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-3910
SELECT - tab1.col2 DIV + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3910
SELECT - tab1.col2 / + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

query I rowsort
SELECT + tab2.col0 FROM tab2 AS cor0 CROSS JOIN tab2 GROUP BY tab2.col0 HAVING NULL IS NULL
----
15
91
92

query I rowsort
SELECT ALL + - 4 FROM tab1 GROUP BY tab1.col0
----
-4
-4
-4

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT ALL + ( 2 ) FROM tab1 cor0 GROUP BY cor0.col2
----
2
2
2

query I rowsort
SELECT - cor0.col2 * + 30 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-1140
-2370
-720

onlyif mysql # DIV for integer division: 
query I rowsort label-3916
SELECT - COALESCE ( 27, col1 * 71, cor0.col0 DIV cor0.col1 ) AS col0 FROM tab1 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-3916
SELECT - COALESCE ( 27, col1 * 71, cor0.col0 / cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-27
-27
-27

query I rowsort
SELECT DISTINCT + 97 AS col0 FROM tab2 GROUP BY tab2.col2
----
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 65 col2 FROM tab2 GROUP BY tab2.col1
----
65
65
65

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3919
SELECT - CAST( NULL AS SIGNED ) col1 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3919
SELECT - CAST ( NULL AS INTEGER ) col1 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT tab2.col2 * 54 FROM tab2 GROUP BY tab2.col2
----
3132
4266
4698

query I rowsort
SELECT ALL cor0.col2 + + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

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 tab1.col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT ALL + cor0.col2 + 34 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
113
121
92

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT tab1.col1 * COALESCE ( 99, + tab1.col2 * tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
4356
5643
594

onlyif mysql # DIV for integer division: 
query I rowsort label-3927
SELECT col0 DIV + 90 FROM tab0 cor0 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3927
SELECT col0 / + 90 FROM tab0 cor0 GROUP BY col0
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3928
SELECT + CAST( NULL AS SIGNED ) col2 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3928
SELECT + CAST ( NULL AS INTEGER ) col2 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 9 FROM tab0 cor0 GROUP BY cor0.col1
----
9
9

query I rowsort
SELECT ALL 29 AS col1 FROM tab1 GROUP BY tab1.col2
----
29
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 82 col0 FROM tab1 GROUP BY tab1.col2
----
82

query I rowsort
SELECT DISTINCT 72 FROM tab2 AS cor0 GROUP BY cor0.col1
----
72

query I rowsort
SELECT ALL - 39 FROM tab0 cor0 GROUP BY cor0.col1
----
-39
-39

query I rowsort
SELECT - 2 FROM tab1 cor0 GROUP BY cor0.col2
----
-2
-2
-2

query I rowsort
SELECT ALL + + 11 FROM tab2 GROUP BY tab2.col0
----
11
11
11

query I rowsort
SELECT DISTINCT + tab1.col0 * tab1.col0 - - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
506
6806
812

onlyif mysql # DIV for integer division: 
query I rowsort label-3937
SELECT + + 64 DIV tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-3937
SELECT + + 64 / tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
1
2

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
44
57
6

query I rowsort
SELECT - - tab1.col2 + + 65 FROM tab1 GROUP BY tab1.col2
----
110
136
73

query I rowsort
SELECT - COALESCE ( cor0.col1, 88 * - cor0.col0 + ( - 16 + cor0.col1 ) ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + 94 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
94
94
94

onlyif mysql # DIV for integer division: 
query I rowsort label-3942
SELECT CASE tab2.col1 WHEN tab2.col1 THEN tab2.col1 DIV - 67 ELSE NULL END FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3942
SELECT CASE tab2.col1 WHEN tab2.col1 THEN tab2.col1 / - 67 ELSE NULL END FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + + 42 * col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1848
2394
252

query I rowsort
SELECT + col2 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT + 15 FROM tab1 GROUP BY col1
----
15
15
15

query I rowsort
SELECT col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-3947
SELECT cor0.col2 DIV cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3947
SELECT cor0.col2 / cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
1
1
1

query I rowsort
SELECT ALL cor0.col0 * col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL col0 + - 78 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-63
13
14

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 ALL - tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + + tab0.col1 + - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT 36 FROM tab2 AS cor0 GROUP BY col0
----
36
36
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT ALL - 28 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-28
-28
-28

onlyif mysql # DIV for integer division: 
query I rowsort label-3958
SELECT DISTINCT tab2.col2 DIV tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1

skipif mysql # not compatible
query I rowsort label-3958
SELECT DISTINCT tab2.col2 / tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1

query I rowsort
SELECT DISTINCT - 56 AS col0 FROM tab1 GROUP BY tab1.col0
----
-56

query I rowsort
SELECT - 60 FROM tab2 GROUP BY tab2.col0
----
-60
-60
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 92 col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
92

query I rowsort
SELECT ALL + 94 AS col0 FROM tab0 GROUP BY tab0.col1
----
94
94

query I rowsort
SELECT 96 AS col1 FROM tab0 GROUP BY tab0.col1
----
96
96

query I rowsort
SELECT COALESCE ( 49, tab1.col0 ) + + 1 * 68 AS col1 FROM tab1 GROUP BY col0
----
117
117
117

query I rowsort
SELECT 53 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor1.col2
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT DISTINCT - tab2.col0 + tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
210
8190
8372

query I rowsort
SELECT ALL - tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NOT NULL
----
-45
-71
-8

query I rowsort
SELECT - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, col1
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 1 col0 FROM tab0 GROUP BY tab0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1032
-2054
-3154

query I rowsort
SELECT ALL - 28 FROM tab2 GROUP BY tab2.col0
----
-28
-28
-28

query I rowsort
SELECT ALL + 25 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT ALL 4 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
4
4

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 12 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-12
-12
-12

query I rowsort
SELECT ALL cor0.col1 * + col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
6561

query I rowsort
SELECT ALL 12 FROM tab2 GROUP BY tab2.col2
----
12
12
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 54 col1 FROM tab0 GROUP BY tab0.col2
----
54
54
54

query I rowsort
SELECT - - 77 AS col0 FROM tab0 GROUP BY col1
----
77
77

query I rowsort
SELECT - 82 AS col0 FROM tab1 GROUP BY tab1.col0
----
-82
-82
-82

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, col2
----
2025
5041
64

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + 4 - - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
30
47
87

onlyif mysql # DIV for integer division: 
query I rowsort label-3985
SELECT DISTINCT + cor0.col0 DIV - 35 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-3985
SELECT DISTINCT + cor0.col0 / - 35 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-2
0

query I rowsort
SELECT DISTINCT - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT cor0.col0 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
132
1596
3608

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 47, - cor0.col1, ( cor0.col2 ) ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-47
-47
-47

query I rowsort
SELECT ALL col2 * 33 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
1485
2343
264

query I rowsort
SELECT tab1.col0 * 38 AS col2 FROM tab1 GROUP BY tab1.col0
----
1064
3116
836

query I rowsort
SELECT DISTINCT cor0.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 cor0.col2 - - col2 col0 FROM tab1 cor0 GROUP BY col2
----
142
16
90

query I rowsort
SELECT ALL - 48 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-48
-48
-48

query I rowsort
SELECT 21 * 87 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1827
1827
1827

query I rowsort
SELECT DISTINCT + 87 + - 39 * cor1.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-1590
-3150
-927

query I rowsort
SELECT DISTINCT 31 - 12 AS col1 FROM tab0 GROUP BY tab0.col2
----
19

query I rowsort
SELECT + 63 AS col1 FROM tab2 GROUP BY tab2.col2
----
63
63
63

query I rowsort
SELECT + 62 + - tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
-20
34
40

query I rowsort
SELECT ALL 19 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1349
152
855

query I rowsort
SELECT + - 32 + + tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
-17
59
60

query I rowsort
SELECT DISTINCT + 89 * - 89 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-7921

query I rowsort
SELECT ALL 97 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
97
97
97

onlyif mysql # DIV for integer division: 
query I rowsort label-4003
SELECT - 1 DIV + 4 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4003
SELECT - 1 / + 4 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT 0 * 89 FROM tab2 GROUP BY col1
----
0
0
0

query I rowsort
SELECT + - 39 FROM tab2 GROUP BY tab2.col0
----
-39
-39
-39

query I rowsort
SELECT ALL - col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + 96 FROM tab1 GROUP BY tab1.col0
----
96

query I rowsort
SELECT - 40 AS col2 FROM tab2 GROUP BY tab2.col2
----
-40
-40
-40

query I rowsort
SELECT ALL + 83 FROM tab0 AS cor0 GROUP BY cor0.col0
----
83
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab2 cor0 GROUP BY col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-4012
SELECT ALL cor0.col1 DIV - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4012
SELECT ALL cor0.col1 / - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
-1
-1
-1

query I rowsort
SELECT + 10 AS col2 FROM tab1 GROUP BY tab1.col1
----
10
10
10

query I rowsort
SELECT ALL 98 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT cor0.col2 * 4 FROM tab0 AS cor0 GROUP BY cor0.col2
----
152
316
96

query I rowsort
SELECT + 84 FROM tab2 GROUP BY col2
----
84
84
84

onlyif mysql # DIV for integer division: 
query I rowsort label-4017
SELECT + + tab2.col2 DIV + tab2.col2 + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
59
80
88

skipif mysql # not compatible
query I rowsort label-4017
SELECT + + tab2.col2 / + tab2.col2 + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
59
80
88

query I rowsort
SELECT ALL - 11 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-11
-11
-11

query I rowsort
SELECT ALL 93 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
93
93
93

query I rowsort
SELECT ALL 61 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
61
61
61

query I rowsort
SELECT ALL 0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor1.col0, cor0.col2
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL - - tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT ( cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT 5 FROM tab1 AS cor0 GROUP BY cor0.col1
----
5
5
5

query I rowsort
SELECT DISTINCT 52 FROM tab2 AS cor0 GROUP BY cor0.col2
----
52

onlyif mysql # DIV for integer division: 
query I rowsort label-4026
SELECT - 24 DIV + cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4026
SELECT - 24 / + cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
0
0

query I rowsort
SELECT 74 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
74
74
74

query I rowsort
SELECT ALL - col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL - tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT 79 FROM tab2 cor0 GROUP BY col0
----
79
79
79

query I rowsort
SELECT DISTINCT cor0.col1 + + 80 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
161
80

query I rowsort
SELECT DISTINCT + cor0.col2 + + 41 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
120
65
79

query I rowsort
SELECT ( 1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 19 col2 FROM tab1 AS cor0 GROUP BY col1
----
19
19
19

query I rowsort
SELECT ALL - 65 AS col1 FROM tab0 GROUP BY tab0.col1
----
-65
-65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * 1 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 45 AS col1 FROM tab0 GROUP BY tab0.col0
----
45
45
45

query I rowsort
SELECT + 93 FROM tab0 AS cor0 GROUP BY col2
----
93
93
93

query I rowsort
SELECT DISTINCT + 96 FROM tab2 GROUP BY tab2.col2
----
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 * 83 col0 FROM tab2 GROUP BY col2
----
4814
6557
7221

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 74 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
74
74
74

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
15
91
92

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NULL
----
58
79
87

query I rowsort
SELECT + 81 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT ALL - tab1.col2 * col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-4047
SELECT + ( 79 ) DIV - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4047
SELECT + ( 79 ) / - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-1
-1

query I rowsort
SELECT 76 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
76
76

onlyif mysql # DIV for integer division: 
query I rowsort label-4049
SELECT ALL - 49 DIV - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-4049
SELECT ALL - 49 / - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
3

query I rowsort
SELECT DISTINCT + col0 * 85 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
1870
2380
6970

query I rowsort
SELECT + col0 + 91 AS col2 FROM tab0 GROUP BY tab0.col0
----
117
134
174

query I rowsort
SELECT 80 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
80
80
80

query I rowsort
SELECT ALL 46 * + cor0.col0 - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
1117
1954
3780

query I rowsort
SELECT DISTINCT + 24 AS col2 FROM tab0 GROUP BY tab0.col0
----
24

query I rowsort
SELECT 79 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
79
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - cor0.col0 * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + col0 - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT 37 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
37

query I rowsort
SELECT DISTINCT - 42 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
17
19

query I rowsort
SELECT ( col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
41
59
61

query I rowsort
SELECT - 31 FROM tab0 GROUP BY tab0.col2
----
-31
-31
-31

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 - ( cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col1
----
-1980
-3306
-42

query I rowsort
SELECT + 98 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
98
98
98

query I rowsort
SELECT cor0.col2 * - col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-1305
-5336
-7189

query I rowsort
SELECT ALL + - 0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT - + ( 72 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
-72
-72
-72

query I rowsort
SELECT 85 AS col2 FROM tab2 GROUP BY tab2.col0
----
85
85
85

query I rowsort
SELECT - 7 AS col2 FROM tab2 GROUP BY tab2.col0
----
-7
-7
-7

query I rowsort
SELECT - 35 FROM tab1 GROUP BY tab1.col1
----
-35
-35
-35

onlyif mysql # DIV for integer division: 
query I rowsort label-4073
SELECT + cor0.col1 DIV cor0.col1 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4073
SELECT + cor0.col1 / cor0.col1 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
1
1
1

query I rowsort
SELECT - 29 AS col0 FROM tab2 GROUP BY tab2.col2
----
-29
-29
-29

query I rowsort
SELECT 41 * - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1804
-2337
-246

query I rowsort
SELECT COALESCE ( cor0.col0, - col0 ) AS col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL col0 * 99 - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
1470
8918
9016

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 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 - 95 col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-95

query I rowsort
SELECT DISTINCT - + tab0.col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT cor0.col1 * + 89 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3649
5251
5429

query I rowsort
SELECT 63 FROM tab0 AS cor0 GROUP BY cor0.col1
----
63
63

query I rowsort
SELECT DISTINCT + 10 FROM tab2 GROUP BY tab2.col1
----
10

query I rowsort
SELECT ALL cor0.col1 * 63 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
2583
3717
3843

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4085
SELECT - COALESCE ( + 99, tab0.col1 + tab0.col0 ) / CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4085
SELECT - COALESCE ( + 99, tab0.col1 + tab0.col0 ) / 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.col2 ) col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL + 84 FROM tab1 GROUP BY tab1.col0
----
84
84
84

query I rowsort
SELECT ALL - + tab1.col1 * - NULLIF ( tab1.col1 + - tab1.col1, col1 ) FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT DISTINCT col1 * col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

onlyif mysql # DIV for integer division: 
query I rowsort label-4090
SELECT - cor0.col0 DIV - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4090
SELECT - cor0.col0 / - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-4091
SELECT tab0.col2 DIV - col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4091
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 col0 col1 FROM tab2 AS cor0 WHERE NOT ( NULL ) NOT IN ( col1 ) GROUP BY cor0.col0
----

query I rowsort
SELECT DISTINCT + col2 AS col1 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL - col2 FROM tab1 WHERE NULL IS NOT NULL GROUP BY tab1.col2
----

query I rowsort
SELECT DISTINCT + + col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT cor0.col2 - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4097
SELECT DISTINCT COALESCE ( 65, + tab0.col1, + col2 DIV - 35 ) FROM tab0 GROUP BY col2
----
65

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4097
SELECT DISTINCT COALESCE ( 65, + tab0.col1, + col2 / - 35 ) FROM tab0 GROUP BY col2
----
65

query I rowsort
SELECT DISTINCT - + tab0.col0 * NULLIF ( + tab0.col0, - tab0.col0 ) FROM tab0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL - tab0.col1 + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT 38 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
38

onlyif mysql # DIV for integer division: 
query I rowsort label-4101
SELECT 73 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-4101
SELECT 73 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
2
3

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT 60 FROM tab2 GROUP BY tab2.col1
----
60

query I rowsort
SELECT ALL tab0.col0 - - 5 FROM tab0 GROUP BY tab0.col0
----
31
48
88

query I rowsort
SELECT ALL - - 17 - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-64
17

query I rowsort
SELECT - 91 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2002
-2548
-7462

query I rowsort
SELECT DISTINCT 57 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4617

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col0 col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL 83 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1245
-7553
-7636

query I rowsort
SELECT 40 AS col1 FROM tab2 GROUP BY col0
----
40
40
40

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
15
91
92

query I rowsort
SELECT ALL 51 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
51
51
51

query I rowsort
SELECT ALL - cor0.col0 * - col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1260
176
5822

query I rowsort
SELECT 80 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT ALL - 22 FROM tab2 GROUP BY tab2.col0
----
-22
-22
-22

query I rowsort
SELECT ALL tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT ALL + cor0.col0 + - cor0.col0 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1892
6972
702

onlyif mysql # DIV for integer division: 
query I rowsort label-4118
SELECT DISTINCT cor0.col0 DIV - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-1

skipif mysql # not compatible
query I rowsort label-4118
SELECT DISTINCT cor0.col0 / - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col1 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4120
SELECT + CAST( + 90 AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
90
90
90

skipif mysql # not compatible
query I rowsort label-4120
SELECT + CAST ( + 90 AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT 94 * tab1.col1 FROM tab1, tab1 cor0 GROUP BY tab1.col1
----
4136
5358
564

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - + tab2.col1 + 96 FROM tab2 GROUP BY tab2.col1
----
35
37
55

query I rowsort
SELECT ALL col1 * - ( 73 ) AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-5913
0

query I rowsort
SELECT DISTINCT 0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT ALL - 62 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-62
-62

query I rowsort
SELECT DISTINCT - 80 FROM tab1 GROUP BY tab1.col1
----
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 8 col1 FROM tab1 GROUP BY tab1.col2
----
8
8
8

query I rowsort
SELECT + 6 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
6
6
6

query I rowsort
SELECT ALL - + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL 7 FROM tab1 GROUP BY tab1.col2
----
7
7
7

query I rowsort
SELECT ALL - 49 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-49
-49
-49

query I rowsort
SELECT 35 FROM tab1 cor0 GROUP BY cor0.col1
----
35
35
35

query I rowsort
SELECT ALL 46 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - 74 + + 84 AS col1 FROM tab1 GROUP BY tab1.col1
----
10

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 11 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1, cor0.col2
----
638
869
957

query I rowsort
SELECT DISTINCT + tab0.col1 * - 24 AS col2 FROM tab0 GROUP BY tab0.col1
----
-1944
0

query I rowsort
SELECT DISTINCT + + col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + 62 * 42 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
2662
2683
2691

query I rowsort
SELECT DISTINCT - NULLIF ( + tab1.col2, tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT DISTINCT 33 * - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
-1353
-1947
-2013

query I rowsort
SELECT DISTINCT + 43 FROM tab1 AS cor0 GROUP BY cor0.col0
----
43

query I rowsort
SELECT ALL - 83 * + 67 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-5561
-5561
-5561

query I rowsort
SELECT DISTINCT + 67 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
2948
3819
402

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 43 col2 FROM tab0 AS cor0 GROUP BY col1
----
43

query I rowsort
SELECT DISTINCT - 4 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
2
40
53

query I rowsort
SELECT 73 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
73
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 25 col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
25
25
25

query I rowsort
SELECT ALL + 84 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col1
----
84
84
84

query I rowsort
SELECT 92 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT 10 FROM tab1 cor0 GROUP BY cor0.col0, col2, col2
----
10
10
10

onlyif mysql # DIV for integer division: 
query I rowsort label-4154
SELECT ALL - 0 DIV 63 col1 FROM tab0 AS 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-4154
SELECT ALL - 0 / 63 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - 67 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-67

query I rowsort
SELECT DISTINCT + tab2.col2 * - tab2.col2 + col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-3306
-6162
-7482

query I rowsort
SELECT DISTINCT - + tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 95 + col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
119
133
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT + ( - tab1.col1 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT - ( 69 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-69
-69
-69

query I rowsort
SELECT DISTINCT + 86 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
86

query I rowsort
SELECT ALL + tab2.col2 - + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT 7 + 94 FROM tab0 GROUP BY tab0.col2
----
101
101
101

query I rowsort
SELECT ALL 70 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-13
27
44

query I rowsort
SELECT + ( 79 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
79
79
79

query I rowsort
SELECT cor0.col2 * 18 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
1044
1422
1566

query I rowsort
SELECT ALL + tab2.col1 - tab2.col1 * 47 AS col2 FROM tab2 GROUP BY col1
----
-1886
-2714
-2806

query I rowsort
SELECT ALL - - 39 AS col1 FROM tab0 GROUP BY tab0.col1
----
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT COALESCE ( + 64, col1 ) + - tab0.col0 col1 FROM tab0 GROUP BY tab0.col0
----
-19
21
38

query I rowsort
SELECT - 26 AS col2 FROM tab2 GROUP BY tab2.col0
----
-26
-26
-26

query I rowsort
SELECT - col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
45
71
8

query I rowsort
SELECT - 28 AS col1 FROM tab2 GROUP BY tab2.col1
----
-28
-28
-28

query I rowsort
SELECT + tab2.col0 + 61 FROM tab2 GROUP BY tab2.col0
----
152
153
76

onlyif mysql # DIV for integer division: 
query I rowsort label-4176
SELECT DISTINCT + 96 DIV - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-4176
SELECT DISTINCT + 96 / - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1
-2
-3

query I rowsort
SELECT DISTINCT - + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - + tab0.col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0, col1
----
-26
-43
-83

query I rowsort
SELECT cor0.col2 * 38 + + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
1755
2769
312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 59 col1 FROM tab0 GROUP BY tab0.col1
----
59
59

query I rowsort
SELECT DISTINCT 1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT + - 21 AS col1 FROM tab1 GROUP BY tab1.col1
----
-21
-21
-21

onlyif mysql # DIV for integer division: 
query I rowsort label-4185
SELECT DISTINCT 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-4185
SELECT DISTINCT cor0.col0 / + cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
29
83

onlyif mysql # DIV for integer division: 
query I rowsort label-4186
SELECT 93 DIV cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
1
15
2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4186
SELECT 93 / cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
1
15
2

query I rowsort
SELECT ALL + col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT + 41 FROM tab0 GROUP BY tab0.col1
----
41
41

query I rowsort
SELECT DISTINCT + 63 * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5103
0

query I rowsort
SELECT DISTINCT - ( - cor0.col1 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + tab0.col0 - 19 AS col1 FROM tab0 GROUP BY tab0.col0
----
24
64
7

query I rowsort
SELECT ALL cor0.col2 + + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
116
158
174

query I rowsort
SELECT ALL + col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT col1 * - 70 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3080
-3990
-420

query I rowsort
SELECT DISTINCT + 96 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
96

query I rowsort
SELECT DISTINCT - 99 * - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4059
5841
6039

onlyif mysql # DIV for integer division: 
query I rowsort label-4198
SELECT DISTINCT - tab0.col2 DIV tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-4198
SELECT DISTINCT - tab0.col2 / tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1

query I rowsort
SELECT DISTINCT - 0 FROM tab2 GROUP BY col0
----
0

query I rowsort
SELECT ALL + 17 FROM tab1 GROUP BY tab1.col0
----
17
17
17

onlyif mysql # DIV for integer division: 
query I rowsort label-4201
SELECT cor0.col1 DIV + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4201
SELECT cor0.col1 / + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT 67 * - 94 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-6298

query I rowsort
SELECT DISTINCT + cor0.col0 - cor0.col2 * - 22 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
1368
1829
1929

query I rowsort
SELECT 64 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
64
64
64

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
41
59
61

query I rowsort
SELECT DISTINCT + 93 FROM tab1 GROUP BY col0
----
93

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + - tab2.col0 * - ( - 77 ) FROM tab2 GROUP BY tab2.col0
----
-1155
-7007
-7084

query I rowsort
SELECT ALL - tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL 66 FROM tab1 cor0 GROUP BY cor0.col0
----
66
66
66

query I rowsort
SELECT DISTINCT 86 FROM tab0 AS cor0 GROUP BY cor0.col1
----
86

query I rowsort
SELECT ALL 10 FROM tab0 AS cor0 GROUP BY col0
----
10
10
10

query I rowsort
SELECT tab2.col0 AS col2 FROM tab2 GROUP BY col0 HAVING NULL < NULL
----

query I rowsort
SELECT DISTINCT - tab0.col2 * tab0.col2 + tab0.col2 AS col0 FROM tab0 WHERE NULL IN ( + tab0.col0 * tab0.col1 ) GROUP BY tab0.col2
----

query I rowsort
SELECT ALL col0 + 7 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
343
579
78

query I rowsort
SELECT DISTINCT 50 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
50

query I rowsort
SELECT 60 + + col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
105
131
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + - cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT cor0.col0 + 22 FROM tab1 AS cor0 GROUP BY cor0.col0
----
104
44
50

query I rowsort
SELECT ALL - 66 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col0, cor1.col1
----
9 values hashing to a408108d423d7784b7d610cb779e515a

query I rowsort
SELECT DISTINCT cor0.col0 + - col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT ALL - + tab1.col2 * - 92 FROM tab1 GROUP BY tab1.col2
----
4140
6532
736

query I rowsort
SELECT cor0.col2 * 37 - 26 FROM tab1 AS cor0 GROUP BY col2
----
1639
2601
270

onlyif mysql # DIV for integer division: 
query I rowsort label-4225
SELECT DISTINCT - tab0.col0 DIV col0 - 24 FROM tab0 GROUP BY tab0.col0
----
-25

skipif mysql # not compatible
query I rowsort label-4225
SELECT DISTINCT - tab0.col0 / col0 - 24 FROM tab0 GROUP BY tab0.col0
----
-25

query I rowsort
SELECT ( - 22 ) * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1826
-572
-946

query I rowsort
SELECT ALL + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT ALL - - 44 * col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1056
1672
3476

query I rowsort
SELECT + - 78 * - tab2.col1 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
3157
4543
4697

onlyif mysql # DIV for integer division: 
query I rowsort label-4230
SELECT ALL - tab1.col1 DIV + col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4230
SELECT ALL - tab1.col1 / + col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT ALL 16 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
16
16
16

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + - 54 FROM tab0 GROUP BY tab0.col0
----
-54
-54
-54

query I rowsort
SELECT DISTINCT 19 * + tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
1102
1501
1653

query I rowsort
SELECT DISTINCT - 66 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
-66

query I rowsort
SELECT + col0 * + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT 57 FROM tab0 GROUP BY col0
----
57

query I rowsort
SELECT ALL + 39 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
39
39
39

query I rowsort
SELECT ALL + 24 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
24
24
24

query I rowsort
SELECT 79 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
79
79
79

query I rowsort
SELECT ALL 64 * + 67 FROM tab1 AS cor0 GROUP BY cor0.col0
----
4288
4288
4288

query I rowsort
SELECT 22 FROM tab0 cor0 GROUP BY cor0.col1
----
22
22

query I rowsort
SELECT ALL 95 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
3
4
80

onlyif mysql # DIV for integer division: 
query I rowsort label-4244
SELECT DISTINCT COALESCE ( 24, cor0.col0 + + cor0.col0 DIV + cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
24

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4244
SELECT DISTINCT COALESCE ( 24, cor0.col0 + + cor0.col0 / + cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
24

query I rowsort
SELECT DISTINCT + 34 + 20 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
54

query I rowsort
SELECT 25 * + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
1450
1975
2175

query I rowsort
SELECT - 1 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + col1 * 1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * 62 col1 FROM tab0 cor0 GROUP BY cor0.col2
----
1488
2356
4898

query I rowsort
SELECT ( + 59 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
59
59
59

query I rowsort
SELECT DISTINCT - ( tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT 45 AS col2 FROM tab0 GROUP BY tab0.col0
----
45
45
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 82 col1 FROM tab2 GROUP BY tab2.col1
----
82
82
82

query I rowsort
SELECT DISTINCT - 48 AS col0 FROM tab2 GROUP BY tab2.col1
----
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
22
28
82

query I rowsort
SELECT DISTINCT 54 FROM tab1 AS cor0 GROUP BY cor0.col0
----
54

query I rowsort
SELECT DISTINCT - 22 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-22

query I rowsort
SELECT DISTINCT + ( tab2.col1 ) + - 48 AS col1 FROM tab2 GROUP BY tab2.col1
----
-7
11
13

query I rowsort
SELECT ALL - col2 * cor0.col1 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2320
-4582
-5220

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-7
-7
-7

onlyif mysql # DIV for integer division: 
query I rowsort label-4261
SELECT DISTINCT tab0.col2 DIV 75 FROM tab0 GROUP BY tab0.col2
----
0
1

skipif mysql # not compatible
query I rowsort label-4261
SELECT DISTINCT tab0.col2 / 75 FROM tab0 GROUP BY tab0.col2
----
0
1

query I rowsort
SELECT ALL cor0.col0 * 31 FROM tab1 AS cor0 GROUP BY col0, col1
----
2542
682
868

query I rowsort
SELECT + col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT NULL NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL + tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT col0 + - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab2.col0 + - tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + 44 * + 72 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3168

query I rowsort
SELECT + col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

onlyif mysql # DIV for integer division: 
query I rowsort label-4271
SELECT ALL - tab2.col0 - 69 DIV col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-19
-91
-92

skipif mysql # not compatible
query I rowsort label-4271
SELECT ALL - tab2.col0 - 69 / col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-19
-91
-92

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * - cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT - cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col2
----
9 values hashing to bda869d038eeb58e7cc0eec369c174f5

query I rowsort
SELECT + + 15 AS col0 FROM tab1 GROUP BY tab1.col0
----
15
15
15

onlyif mysql # DIV for integer division: 
query I rowsort label-4277
SELECT - 46 DIV - tab0.col0 + + 70 AS col1 FROM tab0 GROUP BY tab0.col0
----
70
71
71

skipif mysql # not compatible
query I rowsort label-4277
SELECT - 46 / - tab0.col0 + + 70 AS col1 FROM tab0 GROUP BY tab0.col0
----
70
71
71

query I rowsort
SELECT + 89 AS col1 FROM tab2 GROUP BY tab2.col2
----
89
89
89

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT 34 FROM tab2 AS cor0 GROUP BY col1
----
34

query I rowsort
SELECT ALL cor0.col2 * - 18 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1278
-144
-810

query I rowsort
SELECT ALL cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL + + tab1.col1 + 25 AS col1 FROM tab1 GROUP BY col1
----
31
69
82

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + 13 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 28 col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
28
28
28

query I rowsort
SELECT DISTINCT 49 * + col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1274
2107
4067

query I rowsort
SELECT - tab2.col1 * + 87 FROM tab2 GROUP BY tab2.col1
----
-3567
-5133
-5307

query I rowsort
SELECT ALL tab1.col1 * + 80 AS col1 FROM tab1 GROUP BY tab1.col1
----
3520
4560
480

query I rowsort
SELECT ALL - cor0.col0 + - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-164
-44
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 39 + + 46 FROM tab1 AS cor0 GROUP BY cor0.col0
----
85
85
85

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4293
SELECT ALL + + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4293
SELECT ALL + + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor1.col0 + 75 * + cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
1976
3268
6308

query I rowsort
SELECT + 55 * + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
3190
4345
4785

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab2.col2 col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL - 99 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-16
-56
-73

query I rowsort
SELECT CASE + cor0.col1 WHEN cor0.col2 THEN - 57 * + cor0.col2 + cor0.col2 WHEN - cor0.col2 THEN NULL END / - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 41 FROM tab1 AS cor0 GROUP BY col1
----
41
41
41

query I rowsort
SELECT cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT - col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT 56 FROM tab2 GROUP BY tab2.col1
----
56
56
56

query I rowsort
SELECT DISTINCT - - 42 FROM tab0 GROUP BY tab0.col0
----
42

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT DISTINCT - 76 AS col0 FROM tab2 GROUP BY col0
----
-76

onlyif mysql # DIV for integer division: 
query I rowsort label-4308
SELECT ALL + 14 DIV tab2.col1 col2 FROM tab2 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4308
SELECT ALL + 14 / tab2.col1 col2 FROM tab2 GROUP BY col1
----
0
0
0

query I rowsort
SELECT col2 * + 9 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
450
710
80

query I rowsort
SELECT + 56 FROM tab1 GROUP BY tab1.col0
----
56
56
56

query I rowsort
SELECT 30 * + cor0.col1 + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1271
1829
1891

query I rowsort
SELECT 39 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 37 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
37

query I rowsort
SELECT ALL + + 2 FROM tab2 GROUP BY tab2.col0
----
2
2
2

query I rowsort
SELECT DISTINCT tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT - - 26 + 64 AS col0 FROM tab0 GROUP BY tab0.col2
----
90
90
90

query I rowsort
SELECT tab1.col2 + 79 FROM tab1 GROUP BY tab1.col2
----
124
150
87

query I rowsort
SELECT - 19 FROM tab1 GROUP BY tab1.col2
----
-19
-19
-19

query I rowsort
SELECT DISTINCT ( + 83 ) FROM tab1 GROUP BY col1
----
83

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 col1 FROM tab2 AS cor0 GROUP BY col0, col2
----
3364
6241
7569

query I rowsort
SELECT ALL 19 + + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
106
77
98

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-4323
SELECT + COALESCE ( - 49, cor0.col0 + - CAST( NULL AS SIGNED ) DIV cor0.col2, cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-49
-49
-49

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4323
SELECT + COALESCE ( - 49, cor0.col0 + - CAST ( NULL AS INTEGER ) / cor0.col2, cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-49
-49
-49

onlyif mysql # DIV for integer division: 
query I rowsort label-4324
SELECT DISTINCT - ( col1 ) + + cor0.col1 * COALESCE ( 29, cor0.col1 DIV cor0.col1, CASE + col2 WHEN + cor0.col1 + + col0 THEN - cor0.col0 + - cor0.col1 WHEN cor0.col0 - - cor0.col2 THEN + cor0.col0 DIV cor0.col1 + - cor0.col0 ELSE - cor0.col2 END * cor0.col2 ) FROM tab2 AS cor0 GROUP BY col1
----
1148
1652
1708

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4324
SELECT DISTINCT - ( col1 ) + + cor0.col1 * COALESCE ( 29, cor0.col1 / cor0.col1, CASE + col2 WHEN + cor0.col1 + + col0 THEN - cor0.col0 + - cor0.col1 WHEN cor0.col0 - - cor0.col2 THEN + cor0.col0 / cor0.col1 + - cor0.col0 ELSE - cor0.col2 END * cor0.col2 ) FROM tab2 AS cor0 GROUP BY col1
----
1148
1652
1708

query I rowsort
SELECT - + 41 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1681
-2419
-2501

query I rowsort
SELECT ALL - cor0.col1 + + 39 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2
-20
-22

query I rowsort
SELECT - - 98 FROM tab2 GROUP BY tab2.col0
----
98
98
98

query I rowsort
SELECT ALL - tab2.col2 + + 70 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
-17
-9
12

query I rowsort
SELECT - 56 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-15
3
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + - 46 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-128
-68
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + COALESCE ( cor0.col0, cor0.col0, cor0.col0 ) * + 6 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
156
258
498

query I rowsort
SELECT DISTINCT 98 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
98

query I rowsort
SELECT - cor0.col2 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
6561

query I rowsort
SELECT ALL - + col0 * 88 + 39 AS col2 FROM tab2 GROUP BY col0
----
-1281
-7969
-8057

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + cor0.col1 col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
105
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4337
SELECT DISTINCT - CAST( - tab2.col0 AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif mysql # not compatible
query I rowsort label-4337
SELECT DISTINCT - CAST ( - tab2.col0 AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col0 + + tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT 68 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
106
147
92

query I rowsort
SELECT DISTINCT + 64 * 84 FROM tab1 AS cor0 GROUP BY cor0.col1
----
5376

query I rowsort
SELECT DISTINCT 34 FROM tab2 AS cor0 GROUP BY col0
----
34

query I rowsort
SELECT - 84 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-84
-84
-84

query I rowsort
SELECT ALL 49 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-41
-59
-61

query I rowsort
SELECT + 21 FROM tab1 GROUP BY tab1.col2
----
21
21
21

query I rowsort
SELECT ALL - - tab1.col2 * + 88 FROM tab1 GROUP BY tab1.col2
----
3960
6248
704

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 72 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 60 * + cor0.col2 col2 FROM tab2 cor0 GROUP BY cor0.col2
----
3480
4740
5220

query I rowsort
SELECT DISTINCT - 71 AS col1 FROM tab2 GROUP BY col2
----
-71

query I rowsort
SELECT - - 19 FROM tab1 GROUP BY tab1.col2
----
19
19
19

query I rowsort
SELECT DISTINCT col1 + + tab1.col1 * - 29 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1232
-1596
-168

query I rowsort
SELECT 36 FROM tab2 AS cor0 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT + 65 FROM tab0 AS cor0 GROUP BY cor0.col1
----
65
65

query I rowsort
SELECT ALL tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT DISTINCT + tab0.col1 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT + tab0.col1 - tab0.col1 * tab0.col1 FROM tab0 WHERE NOT ( NULL ) NOT IN ( + tab0.col0 + tab0.col1 * tab0.col2 ) AND NOT NULL NOT IN ( + tab0.col2 ) GROUP BY tab0.col1 HAVING NOT NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT - + col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 40 FROM tab0 GROUP BY tab0.col2
----
40

query I rowsort
SELECT ALL 13 AS col2 FROM tab1 GROUP BY tab1.col2
----
13
13
13

query I rowsort
SELECT COALESCE ( col0, cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
15
91
92

query I rowsort
SELECT + + 9 * - 85 FROM tab2 GROUP BY col1
----
-765
-765
-765

query I rowsort
SELECT ALL 85 AS col0 FROM tab2 GROUP BY tab2.col0
----
85
85
85

query I rowsort
SELECT DISTINCT + 99 AS col2 FROM tab1 GROUP BY tab1.col0
----
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4366
SELECT DISTINCT CAST( - 38 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-38

skipif mysql # not compatible
query I rowsort label-4366
SELECT DISTINCT CAST ( - 38 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 57 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
57
57
57

query I rowsort
SELECT + 57 FROM tab2 cor0 GROUP BY col2
----
57
57
57

query I rowsort
SELECT DISTINCT - ( + cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - + tab2.col0 - + tab2.col0 FROM tab2 GROUP BY col0
----
-182
-184
-30

query I rowsort
SELECT DISTINCT + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT tab0.col0 + 19 FROM tab0 GROUP BY tab0.col0
----
102
45
62

query I rowsort
SELECT - 39 + + 22 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-17
-17
-17

query I rowsort
SELECT DISTINCT - tab0.col1 + - 23 * - 65 FROM tab0 GROUP BY tab0.col1
----
1414
1495

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT ALL + 91 AS col0 FROM tab1 GROUP BY tab1.col2
----
91
91
91

query I rowsort
SELECT ALL - 65 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-2860
-3705
-390

query I rowsort
SELECT tab2.col2 * tab2.col2 AS col0 FROM tab2 WHERE ( - tab2.col1 + tab2.col0 ) IS NULL GROUP BY tab2.col2
----

query I rowsort
SELECT DISTINCT tab2.col2 FROM tab1 AS cor0 CROSS JOIN tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab1 GROUP BY tab1.col0 HAVING NULL <= tab1.col0
----

query I rowsort
SELECT + cor0.col1 * + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + 88 FROM tab2 AS cor0 GROUP BY col0
----
88
88
88

query I rowsort
SELECT DISTINCT - 48 FROM tab1 GROUP BY tab1.col1
----
-48

query I rowsort
SELECT + 26 AS col2 FROM tab1 GROUP BY tab1.col0
----
26
26
26

query I rowsort
SELECT DISTINCT + 1 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT ALL - 13 FROM tab2 GROUP BY tab2.col2
----
-13
-13
-13

query I rowsort
SELECT DISTINCT 52 FROM tab1 AS cor0 GROUP BY col1
----
52

query I rowsort
SELECT + col2 * + cor0.col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
2070
5112
72

query I rowsort
SELECT + 71 FROM tab0 AS cor0 GROUP BY cor0.col0
----
71
71
71

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4392
SELECT - CAST( ( + 39 ) AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-39
-39
-39

skipif mysql # not compatible
query I rowsort label-4392
SELECT - CAST ( ( + 39 ) AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-39
-39
-39

query I rowsort
SELECT + 35 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT + 89 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
89
89
89

query I rowsort
SELECT ALL + tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT 89 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
5162
7031
7743

query I rowsort
SELECT - 25 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-25
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 91 col1 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
-91
-91
-91

query I rowsort
SELECT DISTINCT + 25 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
25

query I rowsort
SELECT - + 17 AS col0 FROM tab0 GROUP BY tab0.col2
----
-17
-17
-17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 35 col2 FROM tab1 GROUP BY tab1.col2
----
-35
-35
-35

query I rowsort
SELECT DISTINCT 75 * + 71 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
5242
5282
5299

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT col2 - - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT ALL - 57 FROM tab0 GROUP BY tab0.col0
----
-57
-57
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + cor0.col0 * + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
484
6724
784

onlyif mysql # DIV for integer division: 
query I rowsort label-4409
SELECT ALL + 46 DIV col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4409
SELECT ALL + 46 / col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 22 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22

query I rowsort
SELECT DISTINCT - tab0.col1 + ( - tab0.col1 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
-162
0

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT 98 * cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
1470
8918
9016

query I rowsort
SELECT DISTINCT cor0.col1 * col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT - col2 + 73 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
2
28
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + ( 79 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
105
122
162

query I rowsort
SELECT ALL 36 * cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col0
----
9 values hashing to 3b03f53dde2fad6eee8c23e6a1dd4c51

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab1 WHERE NULL > NULL GROUP BY tab1.col2
----

query I rowsort
SELECT + - col0 + 52 * + 40 AS col2 FROM tab0 GROUP BY tab0.col0
----
1997
2037
2054

query I rowsort
SELECT + tab0.col0 * + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

onlyif mysql # DIV for integer division: 
query I rowsort label-4421
SELECT ALL tab0.col1 DIV 20 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
4

skipif mysql # not compatible
query I rowsort label-4421
SELECT ALL tab0.col1 / 20 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
4

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1892
30
3192

onlyif mysql # DIV for integer division: 
query I rowsort label-4423
SELECT + col0 DIV ( tab0.col0 ) - - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
27
44
84

skipif mysql # not compatible
query I rowsort label-4423
SELECT + col0 / ( tab0.col0 ) - - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
27
44
84

query I rowsort
SELECT - cor0.col0 * 84 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-2184
-3612
-6972

query I rowsort
SELECT ALL cor0.col2 * 77 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
1848
2926
6083

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - 46 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-31
45
46

query I rowsort
SELECT + cor0.col2 * + cor0.col1 FROM tab2 cor0 GROUP BY col0, cor0.col2, cor0.col1
----
2378
4661
5307

query I rowsort
SELECT ALL cor0.col1 + - 12 * + 40 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-419
-421
-439

query I rowsort
SELECT DISTINCT - - 58 FROM tab1 GROUP BY tab1.col1
----
58

query I rowsort
SELECT + tab2.col2 + 30 AS col0 FROM tab2 GROUP BY tab2.col2
----
109
117
88

query I rowsort
SELECT ALL col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT + + 54 AS col0 FROM tab2 GROUP BY tab2.col2
----
54
54
54

query I rowsort
SELECT 98 FROM tab0 cor0 GROUP BY cor0.col1
----
98
98

query I rowsort
SELECT DISTINCT - 74 AS col1 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
-74

query I rowsort
SELECT - cor0.col2 FROM tab0 AS cor0 WHERE NULL IS NOT NULL OR NOT ( NULL ) IS NULL GROUP BY col2
----

query I rowsort
SELECT col0 AS col1 FROM tab2 WHERE NULL NOT IN ( tab2.col2 ) GROUP BY tab2.col0
----

query I rowsort
SELECT DISTINCT + tab2.col1 * col1 AS col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 col1 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NOT NULL OR NOT NULL < ( NULL )
----

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 35, - cor0.col0 - + cor0.col0 * cor0.col0, + cor0.col1 + cor0.col0 * - cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
35
35

query I rowsort
SELECT - + 28 AS col0 FROM tab2 GROUP BY col2
----
-28
-28
-28

onlyif mysql # DIV for integer division: 
query I rowsort label-4444
SELECT DISTINCT + + tab0.col2 - 66 DIV 56 col2 FROM tab0 GROUP BY tab0.col2
----
23
37
78

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4444
SELECT DISTINCT + + tab0.col2 - 66 / 56 col2 FROM tab0 GROUP BY tab0.col2
----
23
37
78

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4445
SELECT tab0.col2 * + CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4445
SELECT tab0.col2 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col1 * 64 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
5184

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 36, tab2.col2 ) + - ( tab2.col0 ) AS col0 FROM tab2 GROUP BY tab2.col0
----
-55
-56
21

query I rowsort
SELECT cor0.col1 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
3772
5369
915

query I rowsort
SELECT + 35 FROM tab0 GROUP BY tab0.col2
----
35
35
35

query I rowsort
SELECT DISTINCT - tab0.col1 * - NULLIF ( - 23, col1 ) FROM tab0 GROUP BY tab0.col1
----
-1863
0

query I rowsort
SELECT + 67 FROM tab0 GROUP BY tab0.col2
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 40 col2 FROM tab1 GROUP BY tab1.col2
----
40
40
40

query I rowsort
SELECT - 92 AS col1 FROM tab1 GROUP BY tab1.col0
----
-92
-92
-92

query I rowsort
SELECT col2 * - 87 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2088
-3306
-6873

query I rowsort
SELECT DISTINCT + 17 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
17

onlyif mysql # DIV for integer division: 
query I rowsort label-4456
SELECT ALL + tab1.col1 DIV - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4456
SELECT ALL + tab1.col1 / - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT ALL + ( - 66 ) FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-66
-66
-66

query I rowsort
SELECT ALL 58 FROM tab1 GROUP BY tab1.col0
----
58
58
58

query I rowsort
SELECT DISTINCT + 26 FROM tab2 GROUP BY tab2.col2
----
26

query I rowsort
SELECT ALL - 90 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-90
-90
-90

query I rowsort
SELECT ALL cor0.col1 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
2378
4661
5307

query I rowsort
SELECT ALL - 94 AS col1 FROM tab0 GROUP BY tab0.col0
----
-94
-94
-94

query I rowsort
SELECT DISTINCT 21 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
62
80
82

query I rowsort
SELECT - cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor1.col2
----
-26
-43
-83

query I rowsort
SELECT 53 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
53
53
53

query I rowsort
SELECT + 10 AS col1 FROM tab2 GROUP BY tab2.col1
----
10
10
10

query I rowsort
SELECT ALL - 27 * - col2 FROM tab2 GROUP BY tab2.col2
----
1566
2133
2349

query I rowsort
SELECT ALL 71 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1704
2698
5609

onlyif mysql # DIV for integer division: 
query I rowsort label-4469
SELECT ALL + - 31 DIV - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
5

skipif mysql # not compatible
query I rowsort label-4469
SELECT ALL + - 31 / - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
5

query I rowsort
SELECT + 85 AS col1 FROM tab2 GROUP BY tab2.col2
----
85
85
85

query I rowsort
SELECT 73 * 41 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
2993
2993
2993

query I rowsort
SELECT DISTINCT + COALESCE ( tab2.col0, tab2.col0 * + col0 ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL - 98 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-98
-98
-98

query I rowsort
SELECT + 58 AS col2 FROM tab0 GROUP BY tab0.col1
----
58
58

query I rowsort
SELECT DISTINCT - 0 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT + + 94 FROM tab1 GROUP BY tab1.col2
----
94
94
94

query I rowsort
SELECT - + 13 - + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-100
-71
-92

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col1 col0 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NULL
----
-41
-59
-61

query I rowsort
SELECT DISTINCT tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL + tab0.col1 * + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

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 - 28 * 78 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2184
-2184
-2184

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4484
SELECT + CAST( NULL AS SIGNED ) AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4484
SELECT + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 20 FROM tab2 GROUP BY tab2.col0
----
-20
-20
-20

query I rowsort
SELECT + col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL + 16 * 29 AS col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
464
464
464

query I rowsort
SELECT 76 FROM tab0 AS cor0 GROUP BY cor0.col0
----
76
76
76

query I rowsort
SELECT 59 + 49 AS col0 FROM tab1 GROUP BY tab1.col2
----
108
108
108

query I rowsort
SELECT DISTINCT + 25 FROM tab0 GROUP BY tab0.col2
----
25

query I rowsort
SELECT ALL - 72 AS col2 FROM tab2 GROUP BY tab2.col1
----
-72
-72
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 37 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-37
-37
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 10 col0 FROM tab1 GROUP BY tab1.col0
----
10
10
10

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4494
SELECT DISTINCT + - CAST( 14 AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
-14

skipif mysql # not compatible
query I rowsort label-4494
SELECT DISTINCT + - CAST ( 14 AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
-14

query I rowsort
SELECT + 29 + 61 FROM tab1 GROUP BY tab1.col1
----
90
90
90

query I rowsort
SELECT DISTINCT 16 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1328
416
688

query I rowsort
SELECT + - 41 FROM tab0 GROUP BY col0
----
-41
-41
-41

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 65, + tab1.col1 ) FROM tab1 GROUP BY col0
----
65
65
65

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( 4, cor0.col2, cor0.col1 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
4

query I rowsort
SELECT 0 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + 85 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
85

query I rowsort
SELECT ALL + 35 FROM tab2 AS cor0 GROUP BY cor0.col1
----
35
35
35

query I rowsort
SELECT - 76 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1672
-2128
-6232

query I rowsort
SELECT ALL 59 AS col0 FROM tab2 GROUP BY tab2.col0
----
59
59
59

query I rowsort
SELECT - + tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT + cor0.col1 * 26 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1144
1482
156

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col2 FROM tab1 GROUP BY col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT - 48 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-48
-48
-48

query I rowsort
SELECT DISTINCT + 61 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
61

query I rowsort
SELECT + cor0.col0 + + NULLIF ( col0, - cor0.col0 + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
164
44
56

query I rowsort
SELECT tab1.col1 * tab1.col1 + tab1.col1 * tab1.col1 FROM tab1 GROUP BY col1
----
3872
6498
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 - tab0.col0 col1 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT - tab1.col0 + - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

query I rowsort
SELECT - 50 * 86 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4300
-4300
-4300

query I rowsort
SELECT col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT + 33 FROM tab1 cor0 GROUP BY cor0.col0
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab2.col2 - col2 col0 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 + - 91 col0 FROM tab2 GROUP BY tab2.col2
----
-12
-33
-4

query I rowsort
SELECT - cor0.col2 * - cor0.col2 + - 57 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
3307
6184
7512

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT cor1.col2 AS col1 FROM tab1 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 + - tab0.col1 col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT + 80 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
80
80
80

query I rowsort
SELECT ALL + tab1.col2 + 32 FROM tab1 GROUP BY tab1.col2
----
103
40
77

onlyif mysql # DIV for integer division: 
query I rowsort label-4526
SELECT DISTINCT cor0.col2 DIV + col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-4526
SELECT DISTINCT cor0.col2 / + col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4527
SELECT - col2 - CAST( NULL AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4527
SELECT - col2 - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + cor0.col0 + - COALESCE ( 62, col1 * - cor0.col0, + cor0.col1 * + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-34
-40
20

query I rowsort
SELECT - col0 + 71 FROM tab0 GROUP BY tab0.col0
----
-12
28
45

query I rowsort
SELECT ALL tab1.col1 * - tab1.col1 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT 39 FROM tab0 GROUP BY col0
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - 28 * + 25 - cor0.col2 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4064
-6941
-8269

query I rowsort
SELECT + col1 * cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
0

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 - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-81
0
0

query I rowsort
SELECT - 96 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-96
-96
-96

query I rowsort
SELECT + ( + cor0.col0 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

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 ALL - - 99 AS col1 FROM tab1 GROUP BY tab1.col2
----
99
99
99

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL tab0.col1 + COALESCE ( 83, col1, tab0.col1 * + tab0.col2 ) FROM tab0 GROUP BY tab0.col1
----
164
83

query I rowsort
SELECT ALL + 55 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
55
55
55

query I rowsort
SELECT ALL 61 FROM tab0 AS cor0 GROUP BY cor0.col2
----
61
61
61

query I rowsort
SELECT col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT 14 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
14
14
14

query I rowsort
SELECT DISTINCT 18 FROM tab2 GROUP BY col1
----
18

query I rowsort
SELECT DISTINCT - 92 AS col1 FROM tab1 GROUP BY tab1.col2
----
-92

query I rowsort
SELECT ALL cor0.col0 * col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

onlyif mysql # DIV for integer division: 
query I rowsort label-4551
SELECT + tab1.col0 DIV tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4551
SELECT + tab1.col0 / tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT 87 FROM tab2 GROUP BY tab2.col0
----
87
87
87

query I rowsort
SELECT ALL col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL - - 70 FROM tab0 GROUP BY tab0.col1
----
70
70

query I rowsort
SELECT + ( - 91 ) FROM tab1 GROUP BY tab1.col2
----
-91
-91
-91

query I rowsort
SELECT DISTINCT - + 28 AS col1 FROM tab1 GROUP BY col2
----
-28

query I rowsort
SELECT + 26 * 73 FROM tab0 GROUP BY tab0.col2
----
1898
1898
1898

query I rowsort
SELECT DISTINCT - 18 + - tab0.col0 FROM tab0 GROUP BY col0
----
-101
-44
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-4559
SELECT + cor0.col0 DIV + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4559
SELECT + cor0.col0 / + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT 7 + - 17 * tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
-1370
7

query I rowsort
SELECT DISTINCT - 20 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-20

query I rowsort
SELECT ALL 83 FROM tab2 GROUP BY tab2.col2
----
83
83
83

query I rowsort
SELECT DISTINCT - col2 + 76 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-3
38
52

query I rowsort
SELECT DISTINCT NULLIF ( + 88, cor0.col2 ) FROM tab2 AS cor0 GROUP BY col2
----
88

query I rowsort
SELECT - cor0.col1 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2378
-4661
-5307

onlyif mysql # DIV for integer division: 
query I rowsort label-4566
SELECT cor0.col2 * - cor0.col2 + 9 DIV cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-63

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4566
SELECT cor0.col2 * - cor0.col2 + 9 / cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-63

query I rowsort
SELECT - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1 HAVING NULL IN ( tab0.col1 )
----

query I rowsort
SELECT - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1 HAVING ( NULL ) > NULL
----

query I rowsort
SELECT tab1.col0 - + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0
0
0

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 - 73 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-73
-73
-73

onlyif mysql # DIV for integer division: 
query I rowsort label-4572
SELECT - tab1.col2 DIV + 21 AS col1 FROM tab1 GROUP BY col2
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-4572
SELECT - tab1.col2 / + 21 AS col1 FROM tab1 GROUP BY col2
----
-2
-3
0

query I rowsort
SELECT ALL 53 - + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-26
-34
-5

query I rowsort
SELECT + NULLIF ( 80, cor0.col1 ) * 27 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2160
2160
2160

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4575
SELECT DISTINCT - - CAST( 56 AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
56

skipif mysql # not compatible
query I rowsort label-4575
SELECT DISTINCT - - CAST ( 56 AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
56

query I rowsort
SELECT - col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 96 FROM tab0 cor0 GROUP BY cor0.col2
----
96
96
96

query I rowsort
SELECT - - 36 FROM tab1 GROUP BY tab1.col0
----
36
36
36

query I rowsort
SELECT + + 94 FROM tab0 GROUP BY tab0.col1
----
94
94

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4580
SELECT cor0.col1 / CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4580
SELECT cor0.col1 / CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT - ( cor0.col1 ) + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-38
26
83

query I rowsort
SELECT DISTINCT - 69 AS col1 FROM tab0 GROUP BY tab0.col2
----
-69

query I rowsort
SELECT 58 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
58
58
58

query I rowsort
SELECT DISTINCT 24 + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
32
69
95

query I rowsort
SELECT DISTINCT ( 81 ) + + 64 FROM tab0 cor0 GROUP BY col1
----
145

query I rowsort
SELECT ALL 20 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT DISTINCT + cor0.col1 * 19 FROM tab0 AS cor0 GROUP BY col1
----
0
1539

query I rowsort
SELECT DISTINCT - - col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT cor0.col1 * cor0.col0 + - ( - col1 ) FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
138
1653
3652

query I rowsort
SELECT tab0.col2 - tab0.col2 FROM tab0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT - 12 FROM tab1 GROUP BY tab1.col0
----
-12
-12
-12

query I rowsort
SELECT - 32 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-32
-32
-32

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( + 63, - tab0.col2 - tab0.col1 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
63

onlyif mysql # DIV for integer division: 
query I rowsort label-4594
SELECT DISTINCT - 60 DIV - 14 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
4

skipif mysql # not compatible
query I rowsort label-4594
SELECT DISTINCT - 60 / - 14 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
4

query I rowsort
SELECT cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT - 69 FROM tab2 GROUP BY col0
----
-69
-69
-69

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL - + 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.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT 96 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col0
----
96

query I rowsort
SELECT ALL - 84 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col2
----
-84
-84
-84

onlyif mysql # DIV for integer division: 
query I rowsort label-4602
SELECT DISTINCT - cor0.col0 DIV cor0.col0 + - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-42
-60
-62

skipif mysql # not compatible
query I rowsort label-4602
SELECT DISTINCT - cor0.col0 / cor0.col0 + - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-42
-60
-62

query I rowsort
SELECT - 97 * + 25 + - cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-2461
-4361
-5674

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 99 * - cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4455
-7029
-792

query I rowsort
SELECT ALL 68 AS col1 FROM tab2 GROUP BY tab2.col2
----
68
68
68

query I rowsort
SELECT 77 AS col2 FROM tab0 GROUP BY tab0.col2
----
77
77
77

onlyif mysql # DIV for integer division: 
query I rowsort label-4608
SELECT + cor0.col1 DIV - cor0.col1 + 92 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
91
91
91

skipif mysql # not compatible
query I rowsort label-4608
SELECT + cor0.col1 / - cor0.col1 + 92 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
91
91
91

query I rowsort
SELECT - cor0.col1 * - 42 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1848
2394
252

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

query I rowsort
SELECT + cor0.col1 * + col1 + 40 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
1721
3521
3761

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 DISTINCT - + 77 FROM tab1 GROUP BY tab1.col0
----
-77

query I rowsort
SELECT DISTINCT ( + 6 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
6

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + 84 FROM tab1 AS cor0 GROUP BY cor0.col2
----
84

query I rowsort
SELECT DISTINCT + tab2.col2 * - 49 FROM tab2 GROUP BY col2
----
-2842
-3871
-4263

query I rowsort
SELECT - ( + cor0.col2 ) - - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-72
12
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4621
SELECT + cor0.col2 * CAST( NULL AS DECIMAL ) + + 53 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4621
SELECT + cor0.col2 * CAST ( NULL AS REAL ) + + 53 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - tab1.col0 * + 19 FROM tab1 GROUP BY tab1.col0
----
-1558
-418
-532

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT DISTINCT 23 FROM tab1 GROUP BY tab1.col2
----
23

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + 67 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
5427

query I rowsort
SELECT ALL - 86 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-86
-86
-86

query I rowsort
SELECT ALL ( + 65 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
65
65
65

query I rowsort
SELECT DISTINCT - + 67 AS col1 FROM tab2 GROUP BY tab2.col2
----
-67

query I rowsort
SELECT ALL 80 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
80
80
80

onlyif mysql # DIV for integer division: 
query I rowsort label-4631
SELECT - cor0.col0 DIV col2 + - cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-92
-93

skipif mysql # not compatible
query I rowsort label-4631
SELECT - cor0.col0 / col2 + - cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-92
-93

query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT - - 64 AS col1 FROM tab0 GROUP BY tab0.col0
----
64
64
64

query I rowsort
SELECT ALL - 11 FROM tab2 GROUP BY tab2.col0
----
-11
-11
-11

query I rowsort
SELECT cor0.col1 + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT 73 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
73

query I rowsort
SELECT ALL cor0.col1 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2378
4661
5307

query I rowsort
SELECT DISTINCT - 0 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT ALL tab0.col0 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT 61 + col0 FROM tab0 GROUP BY tab0.col0
----
104
144
87

query I rowsort
SELECT ALL + 73 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
16
29
67

query I rowsort
SELECT DISTINCT - 3 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-3

query I rowsort
SELECT 2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2
2
2

query I rowsort
SELECT DISTINCT 46 FROM tab1 GROUP BY col0
----
46

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( + 43, col2 * + 58, + 29 * - cor0.col2 ) FROM tab2 AS cor0 GROUP BY col0
----
-43

onlyif mysql # DIV for integer division: 
query I rowsort label-4646
SELECT ALL - tab0.col0 DIV col0 + - 28 * 89 FROM tab0 GROUP BY tab0.col0
----
-2493
-2493
-2493

skipif mysql # not compatible
query I rowsort label-4646
SELECT ALL - tab0.col0 / col0 + - 28 * 89 FROM tab0 GROUP BY tab0.col0
----
-2493
-2493
-2493

query I rowsort
SELECT - 32 AS col2 FROM tab0 GROUP BY tab0.col0
----
-32
-32
-32

query I rowsort
SELECT - 52 FROM tab0 GROUP BY tab0.col1
----
-52
-52

query I rowsort
SELECT + 18 AS col0 FROM tab1 GROUP BY tab1.col1
----
18
18
18

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - tab1.col1 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 60 FROM tab2 GROUP BY tab2.col1
----
60
60
60

query I rowsort
SELECT 80 FROM tab0 AS cor0 GROUP BY col0
----
80
80
80

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 89, cor0.col2, - cor0.col1 * + cor0.col2 + - cor0.col2 * - col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
89
89
89

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - 44, cor0.col0 + - cor0.col0 * cor0.col0, cor0.col0 * cor0.col1 + cor0.col0, cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT DISTINCT col0 * 80 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
2080
3440
6640

query I rowsort
SELECT + cor0.col0 + - 20 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2
62
8

query I rowsort
SELECT ALL 14 FROM tab1 GROUP BY tab1.col1
----
14
14
14

query I rowsort
SELECT ALL - 22 + 61 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
39
39
39

query I rowsort
SELECT + 88 * 90 FROM tab1 GROUP BY tab1.col2
----
7920
7920
7920

query I rowsort
SELECT DISTINCT 52 + 71 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
123

query I rowsort
SELECT ALL - tab2.col2 * - 74 AS col1 FROM tab2 GROUP BY tab2.col2
----
4292
5846
6438

onlyif mysql # DIV for integer division: 
query I rowsort label-4664
SELECT - - tab0.col1 DIV 71 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-4664
SELECT - - tab0.col1 / 71 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
1

query I rowsort
SELECT ALL cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2, col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 75 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-75

query I rowsort
SELECT ALL + 4 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-164
-236
-244

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4668
SELECT - CAST( 9 AS SIGNED ) * cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-198
-252
-738

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4668
SELECT - CAST ( 9 AS INTEGER ) * cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-198
-252
-738

query I rowsort
SELECT - 18 AS col1 FROM tab0 GROUP BY tab0.col2
----
-18
-18
-18

query I rowsort
SELECT + 94 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
94
94
94

query I rowsort
SELECT + col1 * 49 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
3969

query I rowsort
SELECT - 12 * - 66 FROM tab2 GROUP BY tab2.col2
----
792
792
792

query I rowsort
SELECT + 39 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
39
39
39

query I rowsort
SELECT - + 6 + 80 * col0 FROM tab0 GROUP BY tab0.col0
----
2074
3434
6634

query I rowsort
SELECT + - ( - tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + - 27 * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1161
-2241
-702

query I rowsort
SELECT - cor0.col2 + - 10 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-34
-48
-89

query I rowsort
SELECT + 18 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
18
18
18

query I rowsort
SELECT - tab2.col0 * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( 6, cor0.col1 ) + 89 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 92 col1 FROM tab0 GROUP BY tab0.col1
----
92

query I rowsort
SELECT 51 + 65 AS col1 FROM tab2 GROUP BY col0
----
116
116
116

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - tab1.col2 + col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT ALL - tab2.col0 + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4686
SELECT ALL + - tab0.col0 DIV + col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4686
SELECT ALL + - tab0.col0 / + col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 46 FROM tab1 GROUP BY tab1.col0
----
46

query I rowsort
SELECT - cor0.col1 * + cor0.col1 + + 27 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
-1909
-3222
-9

query I rowsort
SELECT 75 + col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
156
75

query I rowsort
SELECT tab0.col2 AS col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - + 65 - - 93 FROM tab2 GROUP BY tab2.col1
----
28
28
28

query I rowsort
SELECT 97 + - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
15
69
75

query I rowsort
SELECT + + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - + tab1.col0 + - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

query I rowsort
SELECT ALL - 78 FROM tab0 GROUP BY tab0.col2
----
-78
-78
-78

query I rowsort
SELECT ALL - 85 AS col0 FROM tab2 GROUP BY col2
----
-85
-85
-85

query I rowsort
SELECT + - 28 * + tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
-2548
-2576
-420

query I rowsort
SELECT - + 62 FROM tab1 GROUP BY tab1.col0
----
-62
-62
-62

query I rowsort
SELECT tab2.col2 - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ( - col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + cor0.col2 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
0
1944

onlyif mysql # DIV for integer division: 
query I rowsort label-4703
SELECT + COALESCE ( - 50, tab2.col2 + tab2.col2 DIV + tab2.col0 ) * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
2900
3950
4350

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4703
SELECT + COALESCE ( - 50, tab2.col2 + tab2.col2 / + tab2.col0 ) * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
2900
3950
4350

query I rowsort
SELECT - - 76 AS col1 FROM tab2 GROUP BY tab2.col2
----
76
76
76

query I rowsort
SELECT tab0.col2 + + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT tab0.col1 * + col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT 53 FROM tab1 cor0 GROUP BY cor0.col1
----
53
53
53

onlyif mysql # DIV for integer division: 
query I rowsort label-4708
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-4708
SELECT - cor0.col0 / cor0.col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-23
-29
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab1.col2 + + tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT + - 86 FROM tab2 GROUP BY tab2.col1
----
-86
-86
-86

query I rowsort
SELECT - 32 AS col0 FROM tab2 GROUP BY tab2.col1
----
-32
-32
-32

query I rowsort
SELECT - + 55 + - tab0.col1 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-55
-6616

query I rowsort
SELECT DISTINCT col0 - + col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0

query I rowsort
SELECT DISTINCT + 0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT ALL 73 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
73
73

query I rowsort
SELECT - 38 AS col2 FROM tab2 GROUP BY tab2.col0
----
-38
-38
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 4 col1 FROM tab1 GROUP BY tab1.col2
----
4
4
4

onlyif mysql # DIV for integer division: 
query I rowsort label-4718
SELECT + tab1.col1 DIV - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4718
SELECT + tab1.col1 / - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + + 31 FROM tab0 GROUP BY tab0.col2
----
31
31
31

query I rowsort
SELECT + 47 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
2726
3713
4089

query I rowsort
SELECT 99 FROM tab1 AS cor0 GROUP BY cor0.col0
----
99
99
99

query I rowsort
SELECT ( - col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT 27 FROM tab1 GROUP BY tab1.col0
----
27
27
27

query I rowsort
SELECT + - 32 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-73
-91
-93

query I rowsort
SELECT + 53 FROM tab2 GROUP BY tab2.col1
----
53
53
53

query I rowsort
SELECT + 11 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
11
11
11

query I rowsort
SELECT DISTINCT - - col1 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4730
SELECT DISTINCT tab2.col1 / - tab2.col1 + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-4730
SELECT DISTINCT tab2.col1 / - tab2.col1 + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
NULL

query I rowsort
SELECT DISTINCT - - 80 FROM tab2 GROUP BY tab2.col1
----
80

query I rowsort
SELECT ALL - + ( - 66 ) FROM tab2 GROUP BY tab2.col1
----
66
66
66

query I rowsort
SELECT - - 69 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
3105
4899
552

onlyif mysql # DIV for integer division: 
query I rowsort label-4734
SELECT cor0.col0 DIV col0 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
16
92
93

skipif mysql # not compatible
query I rowsort label-4734
SELECT cor0.col0 / col0 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
16
92
93

query I rowsort
SELECT cor0.col0 - - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT 68 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
27
7
9

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4737
SELECT ALL CAST( NULL AS DECIMAL ) AS col1 FROM tab2 cor0 GROUP BY col0, col0, cor0.col1, col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4737
SELECT ALL CAST ( NULL AS REAL ) AS col1 FROM tab2 cor0 GROUP BY col0, col0, cor0.col1, col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 16 FROM tab2 GROUP BY tab2.col0
----
-16
-16
-16

query I rowsort
SELECT ALL - col0 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL - 74 + + 73 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL 13 AS col0 FROM tab2 GROUP BY tab2.col1
----
13
13
13

query I rowsort
SELECT ALL ( - col0 ) FROM tab0 cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - - COALESCE ( 81, - 92 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT + cor0.col0 + - cor0.col2 * 23 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1007
-1551
-162

query I rowsort
SELECT DISTINCT + 63 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
2772
3591
378

query I rowsort
SELECT - 98 FROM tab0 GROUP BY tab0.col0
----
-98
-98
-98

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4750
SELECT + CAST( 92 AS SIGNED ) * - col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2392
-3956
-7636

skipif mysql # not compatible
query I rowsort label-4750
SELECT + CAST ( 92 AS INTEGER ) * - col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2392
-3956
-7636

query I rowsort
SELECT DISTINCT 2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2

query I rowsort
SELECT + tab1.col1 * - 51 AS col2 FROM tab1 GROUP BY tab1.col1
----
-2244
-2907
-306

query I rowsort
SELECT + col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT tab1.col0 FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT - ( cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + 48 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
127
72
86

query I rowsort
SELECT cor0.col1 + NULLIF ( + cor0.col0, + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
126
28
85

onlyif mysql # DIV for integer division: 
query I rowsort label-4758
SELECT cor1.col1 DIV cor1.col2 col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col2
----
0
0
3

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4758
SELECT cor1.col1 / cor1.col2 col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col2
----
0
0
3

query I rowsort
SELECT ALL ( 59 ) FROM tab2 AS cor0 GROUP BY col1
----
59
59
59

query I rowsort
SELECT DISTINCT - 21 FROM tab0 AS cor0 GROUP BY col1
----
-21

query I rowsort
SELECT ALL 64 AS col1 FROM tab0 GROUP BY tab0.col1
----
64
64

query I rowsort
SELECT + 55 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
136
55

query I rowsort
SELECT + cor0.col0 - 29 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-7
53

query I rowsort
SELECT - tab2.col1 * 56 FROM tab2 GROUP BY tab2.col1
----
-2296
-3304
-3416

query I rowsort
SELECT - col1 * + ( cor0.col1 * 78 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-131118
-271518
-290238

query I rowsort
SELECT 2 + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
60
81
89

query I rowsort
SELECT DISTINCT - tab1.col0 + tab1.col0 * + tab1.col0 FROM tab1 GROUP BY col0
----
462
6642
756

query I rowsort
SELECT + 23 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
23
23
23

onlyif mysql # DIV for integer division: 
query I rowsort label-4769
SELECT DISTINCT + 53 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
1
8

skipif mysql # not compatible
query I rowsort label-4769
SELECT DISTINCT + 53 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
1
8

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
484
6724
784

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
225
8281
8464

query I rowsort
SELECT tab1.col2 * + tab1.col2 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT ALL - tab2.col1 * 9 - tab2.col1 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-2050
-4012
-4270

query I rowsort
SELECT - + 15 AS col0 FROM tab2 GROUP BY col1
----
-15
-15
-15

query I rowsort
SELECT 89 FROM tab2 GROUP BY col0
----
89
89
89

query I rowsort
SELECT - 7 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-7
-7
-7

query I rowsort
SELECT DISTINCT + 94 FROM tab0 AS cor0 GROUP BY cor0.col0
----
94

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT 38 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
38
38
38

query I rowsort
SELECT 81 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT DISTINCT + - 52 * - 31 AS col1 FROM tab0 GROUP BY tab0.col1
----
1612

query I rowsort
SELECT DISTINCT + 79 FROM tab0 GROUP BY tab0.col2
----
79

query I rowsort
SELECT + col1 + 54 AS col2 FROM tab0 GROUP BY tab0.col1
----
135
54

query I rowsort
SELECT - tab2.col1 + + col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT 77 * cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor1.col2
----
3465
3465
5467
5467
616
616

query I rowsort
SELECT 13 AS col2 FROM tab0 GROUP BY col0
----
13
13
13

query I rowsort
SELECT ALL - cor0.col2 + + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * 80 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3280
4720
4880

query I rowsort
SELECT DISTINCT - 26 * col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1026
-2133
-648

query I rowsort
SELECT tab2.col2 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

onlyif mysql # DIV for integer division: 
query I rowsort label-4792
SELECT tab0.col2 DIV + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4792
SELECT tab0.col2 / + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT ALL - 75 FROM tab1 GROUP BY tab1.col2
----
-75
-75
-75

query I rowsort
SELECT + tab2.col0 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4795
SELECT DISTINCT - tab2.col0 DIV + 21 FROM tab2 GROUP BY tab2.col0
----
-4
0

skipif mysql # not compatible
query I rowsort label-4795
SELECT DISTINCT - tab2.col0 / + 21 FROM tab2 GROUP BY tab2.col0
----
-4
0

query I rowsort
SELECT ALL 78 * + 12 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
936
936
936

query I rowsort
SELECT + + 73 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
73
73
73

query I rowsort
SELECT ALL 65 + 80 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
145
145
145

query I rowsort
SELECT DISTINCT 85 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
85

query I rowsort
SELECT - 74 FROM tab0 GROUP BY tab0.col2
----
-74
-74
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col1 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT 17 * 62 + 90 FROM tab1 cor0 GROUP BY cor0.col2
----
1144
1144
1144

query I rowsort
SELECT ALL col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-4804
SELECT - cor0.col2 DIV 19 FROM tab0 cor0 GROUP BY cor0.col2
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-4804
SELECT - cor0.col2 / 19 FROM tab0 cor0 GROUP BY cor0.col2
----
-1
-2
-4

query I rowsort
SELECT DISTINCT - 14 FROM tab0 GROUP BY col0
----
-14

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 + + cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
2053
5123
86

query I rowsort
SELECT 16 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
1296

onlyif mysql # DIV for integer division: 
query I rowsort label-4808
SELECT DISTINCT cor0.col1 DIV cor0.col1 + + 73 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
74

skipif mysql # not compatible
query I rowsort label-4808
SELECT DISTINCT cor0.col1 / cor0.col1 + + 73 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
74

query I rowsort
SELECT DISTINCT + 69 FROM tab0 GROUP BY tab0.col0
----
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - + 23 AS col2 FROM tab2 GROUP BY tab2.col0
----
-23

query I rowsort
SELECT - + col0 * col0 - + 68 AS col1 FROM tab2 GROUP BY tab2.col0
----
-293
-8349
-8532

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 82 col1 FROM tab1 AS cor0 GROUP BY col2
----
82

query I rowsort
SELECT DISTINCT 94 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
94

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4815
SELECT CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4815
SELECT CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 48 + + col2 FROM tab0 GROUP BY col2
----
-10
-24
31

query I rowsort
SELECT ALL 73 FROM tab2 GROUP BY tab2.col0
----
73
73
73

query I rowsort
SELECT DISTINCT - 31 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-31

query I rowsort
SELECT DISTINCT - 75 AS col2 FROM tab0 GROUP BY tab0.col0
----
-75

onlyif mysql # DIV for integer division: 
query I rowsort label-4820
SELECT ALL 62 DIV 78 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4820
SELECT ALL 62 / 78 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - - 30 AS col2 FROM tab0 GROUP BY tab0.col2
----
30

query I rowsort
SELECT DISTINCT + + 23 FROM tab2 GROUP BY tab2.col1
----
23

query I rowsort
SELECT 97 AS col1 FROM tab1 GROUP BY tab1.col1
----
97
97
97

query I rowsort
SELECT - + 92 FROM tab2 GROUP BY tab2.col2
----
-92
-92
-92

query I rowsort
SELECT ALL - tab2.col2 * + tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT - - col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 87 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
87

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
58
79
87

query I rowsort
SELECT - 24 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-24
-24

query I rowsort
SELECT ALL - ( 98 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
-98
-98
-98

query I rowsort
SELECT ALL tab2.col1 + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL + + 56 FROM tab0 GROUP BY tab0.col1
----
56
56

query I rowsort
SELECT ALL + + 56 FROM tab2 GROUP BY tab2.col1
----
56
56
56

query I rowsort
SELECT DISTINCT 30 FROM tab1 GROUP BY tab1.col2
----
30

query I rowsort
SELECT tab0.col1 + - col1 AS col0 FROM tab0 GROUP BY col1
----
0
0

query I rowsort
SELECT ALL + 58 FROM tab0 AS cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT DISTINCT + - tab0.col0 + - col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL - - 89 FROM tab2 GROUP BY tab2.col2
----
89
89
89

query I rowsort
SELECT + col0 AS col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL 28 AS col1 FROM tab2 GROUP BY tab2.col0
----
28
28
28

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4842
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4842
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
44
57
6

query I rowsort
SELECT + tab0.col0 * - tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT - 68 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-68
-68
-68

query I rowsort
SELECT ALL CASE 60 WHEN - cor0.col2 THEN NULL ELSE 12 END FROM tab1 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 * + cor0.col2 AS col2 FROM tab1 cor0 GROUP BY col2, cor0.col0, col1
----
2070
5112
72

query I rowsort
SELECT ALL - tab2.col0 + col0 * + 24 FROM tab2 GROUP BY tab2.col0
----
2093
2116
345

query I rowsort
SELECT - cor0.col1 * + col1 FROM tab1 AS cor0 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT cor0.col1 * + cor0.col0 + + cor0.col1 FROM tab2 AS cor0 GROUP BY col0, col1
----
3813
5428
976

query I rowsort
SELECT - col2 + col2 AS col0 FROM tab2 GROUP BY tab2.col2 HAVING NOT ( tab2.col2 ) IS NOT NULL
----

query I rowsort
SELECT DISTINCT + + 83 AS col0 FROM tab2 GROUP BY tab2.col1
----
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 58 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
58
58
58

onlyif mysql # DIV for integer division: 
query I rowsort label-4856
SELECT ALL - 66 + cor0.col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-65
-65
-65

skipif mysql # not compatible
query I rowsort label-4856
SELECT ALL - 66 + cor0.col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-65
-65
-65

query I rowsort
SELECT cor0.col1 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
6561

query I rowsort
SELECT 78 FROM tab2 GROUP BY tab2.col2
----
78
78
78

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( + 95, - cor1.col2, 35 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
95

query I rowsort
SELECT ALL 30 FROM tab1 GROUP BY tab1.col1
----
30
30
30

query I rowsort
SELECT cor0.col0 * col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT 90 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
90
90

query I rowsort
SELECT ALL + cor0.col1 + + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT 18 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT DISTINCT 11 FROM tab2 AS cor0 GROUP BY cor0.col0
----
11

query I rowsort
SELECT ALL - tab0.col2 * 82 FROM tab0 GROUP BY tab0.col2
----
-1968
-3116
-6478

query I rowsort
SELECT ALL - col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + 50 FROM tab2 GROUP BY col0
----
50
50
50

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 50 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
50
50
50

query I rowsort
SELECT 12 FROM tab0 GROUP BY tab0.col2
----
12
12
12

query I rowsort
SELECT DISTINCT - 17 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-17

query I rowsort
SELECT + - tab0.col0 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT - col2 + + 19 AS col2 FROM tab2 GROUP BY tab2.col2
----
-39
-60
-68

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 ALL - 21 FROM tab2 GROUP BY tab2.col0
----
-21
-21
-21

query I rowsort
SELECT - + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT + 31 AS col0 FROM tab1 GROUP BY tab1.col2
----
31
31
31

query I rowsort
SELECT ALL 24 AS col0 FROM tab2 GROUP BY col1
----
24
24
24

query I rowsort
SELECT + col2 FROM tab2 cor0 GROUP BY col2
----
58
79
87

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 ALL - col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT + + 44 FROM tab0 GROUP BY tab0.col1
----
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 + 30 * - cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2821
-2852
-465

onlyif mysql # DIV for integer division: 
query I rowsort label-4885
SELECT DISTINCT + 35 DIV 84 FROM tab2 AS cor0 GROUP BY col1
----
0

skipif mysql # not compatible
query I rowsort label-4885
SELECT DISTINCT + 35 / 84 FROM tab2 AS cor0 GROUP BY col1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT + 19 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
19
19

query I rowsort
SELECT ALL - 54 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
-54
-54
-54

query I rowsort
SELECT + tab1.col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT ALL - cor0.col2 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-17
-20
-26

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
58
79
87

query I rowsort
SELECT + 96 + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
102
140
153

query I rowsort
SELECT ALL - + ( 48 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
-48
-48

query I rowsort
SELECT 7 FROM tab1 GROUP BY col1
----
7
7
7

query I rowsort
SELECT DISTINCT 73 AS col1 FROM tab0 GROUP BY col0
----
73

query I rowsort
SELECT 86 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
86
86
86

query I rowsort
SELECT ALL + 17 FROM tab0 GROUP BY tab0.col0
----
17
17
17

query I rowsort
SELECT DISTINCT + 60 + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
105
131
68

query I rowsort
SELECT + cor0.col0 + col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2018
3277
58

query I rowsort
SELECT + 63 * 75 FROM tab1 GROUP BY tab1.col0
----
4725
4725
4725

onlyif mysql # DIV for integer division: 
query I rowsort label-4901
SELECT ALL cor0.col0 + - cor0.col0 DIV cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
21
27
81

skipif mysql # not compatible
query I rowsort label-4901
SELECT ALL cor0.col0 + - cor0.col0 / cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
21
27
81

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - - tab2.col1 * - 38 FROM tab2 GROUP BY col1
----
-1558
-2242
-2318

query I rowsort
SELECT - NULLIF ( col1, cor0.col0 ) + + cor0.col0 * col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
3731
5310
854

query I rowsort
SELECT DISTINCT - 16 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-1
75
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
21
21
21

query I rowsort
SELECT DISTINCT - - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-4908
SELECT DISTINCT 37 DIV + 88 AS col1 FROM tab2 GROUP BY tab2.col2
----
0

skipif mysql # not compatible
query I rowsort label-4908
SELECT DISTINCT 37 / + 88 AS col1 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col1 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
1739
3560
3808

query I rowsort
SELECT + 31 * + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
2542
682
868

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 99, tab0.col2 * tab0.col2, - tab0.col2 * col0 ) * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-2574
-4257
-8217

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4912
SELECT DISTINCT cor0.col2 * CAST( 55 AS SIGNED ) FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
3190
4345
4785

skipif mysql # not compatible
query I rowsort label-4912
SELECT DISTINCT cor0.col2 * CAST ( 55 AS INTEGER ) FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
3190
4345
4785

query I rowsort
SELECT + 12 AS col2 FROM tab2 GROUP BY tab2.col1
----
12
12
12

onlyif mysql # DIV for integer division: 
query I rowsort label-4914
SELECT ALL tab2.col1 DIV tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4914
SELECT ALL tab2.col1 / tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT - - tab0.col2 + - 16 FROM tab0 GROUP BY tab0.col2
----
22
63
8

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4917
SELECT ALL CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4917
SELECT ALL CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + cor0.col1 * + 60 FROM tab1 AS cor0 GROUP BY col1
----
2640
3420
360

query I rowsort
SELECT - tab2.col0 * + col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT + cor0.col1 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
114
12
88

query I rowsort
SELECT col0 * + 27 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2214
594
756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 77 col0 FROM tab1 GROUP BY tab1.col2
----
-77
-77
-77

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 23 FROM tab0 GROUP BY tab0.col1
----
-23
-23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col1 + + tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT + 60 FROM tab0 cor0 GROUP BY cor0.col2
----
60

query I rowsort
SELECT DISTINCT + tab0.col0 * 24 AS col2 FROM tab0 GROUP BY tab0.col0
----
1032
1992
624

query I rowsort
SELECT cor0.col0 + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT 78 AS col1 FROM tab0 GROUP BY tab0.col1
----
78

query I rowsort
SELECT DISTINCT 24 AS col2 FROM tab2 GROUP BY tab2.col1
----
24

onlyif mysql # DIV for integer division: 
query I rowsort label-4933
SELECT DISTINCT - + 15 DIV tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1
0

skipif mysql # not compatible
query I rowsort label-4933
SELECT DISTINCT - + 15 / tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1
0

query I rowsort
SELECT DISTINCT - 56 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-56

query I rowsort
SELECT + cor0.col1 - 37 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-37
-37
44

query I rowsort
SELECT - - tab0.col1 + 3 FROM tab0 GROUP BY tab0.col1
----
3
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 27 col1 FROM tab0 GROUP BY tab0.col2
----
-27
-27
-27

query I rowsort
SELECT 19 + 42 AS col1 FROM tab1 GROUP BY tab1.col2
----
61
61
61

query I rowsort
SELECT DISTINCT + + 45 AS col0 FROM tab0 GROUP BY tab0.col2
----
45

query I rowsort
SELECT ALL 38 AS col2 FROM tab2 GROUP BY tab2.col2
----
38
38
38

query I rowsort
SELECT ALL + + 24 FROM tab2 GROUP BY tab2.col0
----
24
24
24

query I rowsort
SELECT - tab1.col1 * 68 + 24 FROM tab1 GROUP BY tab1.col1
----
-2968
-384
-3852

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, col0
----
22
28
82

query I rowsort
SELECT + 53 AS col0 FROM tab0 GROUP BY col1
----
53
53

query I rowsort
SELECT cor0.col0 * 87 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2262
3741
7221

query I rowsort
SELECT ALL + ( - 78 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-78
-78
-78

query I rowsort
SELECT - 39 + 43 FROM tab0 AS cor0 GROUP BY cor0.col2
----
4
4
4

query I rowsort
SELECT ALL - 85 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-85
-85
-85

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4949
SELECT ALL + CAST( + 84 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
84
84
84

skipif mysql # not compatible
query I rowsort label-4949
SELECT ALL + CAST ( + 84 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT - 88 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-88
-88
-88

query I rowsort
SELECT - + 63 + - 44 AS col1 FROM tab1 GROUP BY tab1.col1
----
-107
-107
-107

query I rowsort
SELECT + col0 + col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
133
150
76

query I rowsort
SELECT - + col1 + 47 FROM tab2 GROUP BY tab2.col1
----
-12
-14
6

query I rowsort
SELECT + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
44
57
6

query I rowsort
SELECT ALL - col2 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT - cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT ALL 33 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
33
33
33

query I rowsort
SELECT 35 * + 14 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
490
490
490

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, col1
----
1681
3481
3721

onlyif mysql # DIV for integer division: 
query I rowsort label-4960
SELECT ALL tab0.col2 * + tab0.col2 + + 63 DIV + 99 col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4960
SELECT ALL tab0.col2 * + tab0.col2 + + 63 / + 99 col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - - 30 FROM tab0 GROUP BY tab0.col1
----
30

query I rowsort
SELECT - 20 + cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, col1, cor0.col1
----
21
39
41

query I rowsort
SELECT ALL 22 * + cor0.col1 + - 27 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-27
-27
1755

query I rowsort
SELECT cor0.col0 + + cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1892
6972
702

query I rowsort
SELECT ALL tab1.col1 + ( 52 ) * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
2332
3021
318

query I rowsort
SELECT ALL + tab0.col1 * 36 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
2916

query I rowsort
SELECT DISTINCT + + tab1.col2 * + tab1.col2 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT - tab0.col2 + 0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT 52 FROM tab1 AS cor0 GROUP BY col2
----
52
52
52

query I rowsort
SELECT - 84 * 7 FROM tab2 GROUP BY col1
----
-588
-588
-588

query I rowsort
SELECT - + 95 FROM tab1 GROUP BY col1
----
-95
-95
-95

query I rowsort
SELECT DISTINCT 42 FROM tab1 cor0 GROUP BY col0, cor0.col0
----
42

query I rowsort
SELECT DISTINCT + 96 AS col0 FROM tab1 GROUP BY tab1.col1
----
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col2 * 49 col0 FROM tab1 GROUP BY tab1.col2
----
2205
3479
392

query I rowsort
SELECT 42 FROM tab0 AS cor0 GROUP BY col2
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 86 col0 FROM tab0 GROUP BY tab0.col1
----
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col0 col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT tab2.col0 FROM tab2 GROUP BY col0 HAVING NOT ( NULL ) IS NOT NULL
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-4979
SELECT + - tab2.col2 * - tab2.col2 - - tab2.col2 DIV - tab2.col2 FROM tab2 GROUP BY col2
----
3363
6240
7568

skipif mysql # not compatible
query I rowsort label-4979
SELECT + - tab2.col2 * - tab2.col2 - - tab2.col2 / - tab2.col2 FROM tab2 GROUP BY col2
----
3363
6240
7568

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 24 * cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
-1392
-1896
-2088

query I rowsort
SELECT ALL + + 92 AS col0 FROM tab0 GROUP BY tab0.col0
----
92
92
92

query I rowsort
SELECT 8 FROM tab2 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT ALL + 98 AS col2 FROM tab1 GROUP BY tab1.col1
----
98
98
98

query I rowsort
SELECT 23 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
23
23
23

query I rowsort
SELECT DISTINCT + 54 AS col0 FROM tab0 GROUP BY tab0.col2
----
54

onlyif mysql # DIV for integer division: 
query I rowsort label-4986
SELECT ALL - - tab0.col2 DIV 8 FROM tab0 GROUP BY tab0.col2
----
3
4
9

skipif mysql # not compatible
query I rowsort label-4986
SELECT ALL - - tab0.col2 / 8 FROM tab0 GROUP BY tab0.col2
----
3
4
9

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4988
SELECT ALL - CAST( NULL AS SIGNED ) + - 14 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4988
SELECT ALL - CAST ( NULL AS INTEGER ) + - 14 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 85 AS col0 FROM tab2 GROUP BY col0
----
85

query I rowsort
SELECT ALL + tab0.col0 + 40 FROM tab0 GROUP BY col0
----
123
66
83

query I rowsort
SELECT 58 AS col2 FROM tab2 GROUP BY tab2.col1
----
58
58
58

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4992
SELECT ALL + CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4992
SELECT ALL + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-4993
SELECT DISTINCT - + COALESCE ( 30, tab1.col1, + tab1.col0 * COALESCE ( tab1.col0, ( + tab1.col1 ) + - tab1.col0 ) ) DIV tab1.col0 + + 56 FROM tab1 GROUP BY tab1.col0
----
55
56

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4993
SELECT DISTINCT - + COALESCE ( 30, tab1.col1, + tab1.col0 * COALESCE ( tab1.col0, ( + tab1.col1 ) + - tab1.col0 ) ) / tab1.col0 + + 56 FROM tab1 GROUP BY tab1.col0
----
55
56

query I rowsort
SELECT ALL - tab1.col1 * - 73 FROM tab1 GROUP BY tab1.col1
----
3212
4161
438

query I rowsort
SELECT ALL tab1.col1 + - 63 FROM tab1 GROUP BY col1
----
-19
-57
-6

query I rowsort
SELECT ALL - 98 FROM tab0 GROUP BY tab0.col1
----
-98
-98

query I rowsort
SELECT 20 FROM tab0 GROUP BY tab0.col2
----
20
20
20

query I rowsort
SELECT 3 AS col1 FROM tab1 GROUP BY tab1.col2
----
3
3
3

query I rowsort
SELECT + + ( tab0.col2 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - 43 FROM tab0 GROUP BY tab0.col2
----
-43
-43
-43

query I rowsort
SELECT - 58 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-30
-36
24

onlyif mysql # DIV for integer division: 
query I rowsort label-5002
SELECT 21 DIV cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5002
SELECT 21 / cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - 99 FROM tab1 GROUP BY tab1.col0
----
-99
-99
-99

query I rowsort
SELECT ALL 57 AS col1 FROM tab1 GROUP BY tab1.col0
----
57
57
57

query I rowsort
SELECT DISTINCT 88 FROM tab1 cor0 GROUP BY col2
----
88

query I rowsort
SELECT DISTINCT 25 FROM tab2 GROUP BY tab2.col1
----
25

query I rowsort
SELECT DISTINCT - + ( 99 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-99

query I rowsort
SELECT DISTINCT + - 72 AS col1 FROM tab2 GROUP BY tab2.col1
----
-72

query I rowsort
SELECT ALL 23 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT + 90 FROM tab1 GROUP BY tab1.col2
----
90
90
90

query I rowsort
SELECT ALL cor0.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 - 73 col1 FROM tab2 GROUP BY tab2.col2
----
-73
-73
-73

query I rowsort
SELECT ALL 76 FROM tab0 AS cor0 GROUP BY cor0.col1
----
76
76

query I rowsort
SELECT ALL - tab0.col2 + 20 * 32 FROM tab0 GROUP BY col2
----
561
602
616

query I rowsort
SELECT - 7 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-7
-7
-7

query I rowsort
SELECT col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - - 32 AS col2 FROM tab0 GROUP BY tab0.col0
----
32
32
32

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
1444
576
6241

query I rowsort
SELECT - 2 AS col0 FROM tab0 GROUP BY tab0.col0
----
-2
-2
-2

query I rowsort
SELECT - 76 AS col2 FROM tab1 GROUP BY tab1.col0
----
-76
-76
-76

query I rowsort
SELECT cor0.col1 + col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
105
38
79

query I rowsort
SELECT DISTINCT + 65 AS col0 FROM tab2 GROUP BY tab2.col2
----
65

query I rowsort
SELECT DISTINCT 82 FROM tab1 AS cor0 GROUP BY cor0.col1
----
82

query I rowsort
SELECT - - COALESCE ( + 46, - tab1.col0 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
46
46
46

query I rowsort
SELECT - 6 FROM tab0 GROUP BY tab0.col2
----
-6
-6
-6

query I rowsort
SELECT + - ( + 68 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
-68
-68
-68

query I rowsort
SELECT ALL + 58 + 92 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3714
-5370
-5554

query I rowsort
SELECT - 60 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-60
-60
-60

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, col0
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 27 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
27
27
27

query I rowsort
SELECT DISTINCT - cor0.col1 * 90 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3960
-5130
-540

query I rowsort
SELECT 58 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
4582
5046

query I rowsort
SELECT 34 FROM tab0 cor0 GROUP BY cor0.col0
----
34
34
34

query I rowsort
SELECT + cor0.col1 * cor0.col1 + - col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + NULLIF ( 57, + tab2.col2 ) col2 FROM tab2 GROUP BY tab2.col2
----
-57
-57
-57

query I rowsort
SELECT DISTINCT - + 50 AS col2 FROM tab0 GROUP BY col2
----
-50

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 45 * cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4095
4140
675

query I rowsort
SELECT DISTINCT - ( - 2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT cor0.col0 + + 37 FROM tab1 AS cor0 GROUP BY cor0.col0
----
119
59
65

query I rowsort
SELECT DISTINCT 29 + + 89 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
118

query I rowsort
SELECT + + 32 AS col0 FROM tab0 GROUP BY tab0.col2
----
32
32
32

query I rowsort
SELECT DISTINCT + 69 FROM tab0 GROUP BY col0
----
69

query I rowsort
SELECT ALL - - 56 AS col2 FROM tab2 GROUP BY col0
----
56
56
56

query I rowsort
SELECT DISTINCT 96 FROM tab1 AS cor0 GROUP BY col1, col2, cor0.col2
----
96

query I rowsort
SELECT DISTINCT - 47 FROM tab2 AS cor0 GROUP BY col0
----
-47

query I rowsort
SELECT 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 - col0 * - tab0.col0 - tab0.col0 col1 FROM tab0 WHERE NULL IS NOT NULL GROUP BY tab0.col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL - tab1.col1 * + col1 AS col2 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0 HAVING NOT NULL > NULL
----

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-5055
SELECT + - tab0.col2 DIV - tab0.col2 + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
25
39
80

skipif mysql # not compatible
query I rowsort label-5055
SELECT + - tab0.col2 / - tab0.col2 + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
25
39
80

query I rowsort
SELECT - 21 * + 12 FROM tab1 AS cor0 GROUP BY col1
----
-252
-252
-252

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5057
SELECT - CAST( NULL AS DECIMAL ) FROM tab1 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5057
SELECT - CAST ( NULL AS REAL ) FROM tab1 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 52 AS col1 FROM tab2 GROUP BY tab2.col0
----
-52

query I rowsort
SELECT - cor0.col0 - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-166
-52
-86

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT 50 AS col0 FROM tab2 GROUP BY tab2.col0
----
50

onlyif mysql # DIV for integer division: 
query I rowsort label-5063
SELECT 7 DIV + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY col2
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5063
SELECT 7 / + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT DISTINCT col1 * - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL 62 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
62
62
62

query I rowsort
SELECT DISTINCT + 37 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
37

query I rowsort
SELECT ALL ( 37 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
37
37
37

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5068
SELECT CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5068
SELECT CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 56 FROM tab1 AS cor0 GROUP BY cor0.col2
----
56

query I rowsort
SELECT + - 50 FROM tab1 GROUP BY tab1.col0
----
-50
-50
-50

query I rowsort
SELECT ALL - 27 + + col0 FROM tab0 GROUP BY tab0.col0
----
-1
16
56

query I rowsort
SELECT - cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT + 61 FROM tab0 AS cor0 GROUP BY col1
----
61
61

query I rowsort
SELECT 23 + - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-20
-3
-60

query I rowsort
SELECT 15 * cor0.col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
1185
360
570

query I rowsort
SELECT - - tab1.col2 + 88 AS col0 FROM tab1 GROUP BY tab1.col2
----
133
159
96

query I rowsort
SELECT DISTINCT + cor0.col1 * + 80 FROM tab1 AS cor0 GROUP BY col1
----
3520
4560
480

query I rowsort
SELECT ALL - cor0.col0 + NULLIF ( - cor0.col1, cor0.col1 ) * - 92 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3680
5337
5597

query I rowsort
SELECT DISTINCT - + 47 - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-118
-55
-92

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT + 36 FROM tab1 AS cor0 GROUP BY cor0.col1
----
36

query I rowsort
SELECT DISTINCT - 38 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-38

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL = ( NULL )
----

query I rowsort
SELECT DISTINCT + 34 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-10
-23
28

query I rowsort
SELECT DISTINCT 50 FROM tab1 AS cor0 GROUP BY col2
----
50

query I rowsort
SELECT ALL NULLIF ( tab0.col2, tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 34 FROM tab1 GROUP BY col2
----
-34
-34
-34

query I rowsort
SELECT + - 25 FROM tab0 GROUP BY tab0.col2
----
-25
-25
-25

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-15
-91
-92

query I rowsort
SELECT + cor0.col2 * + cor0.col2 + 78 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3442
6319
7647

onlyif mysql # DIV for integer division: 
query I rowsort label-5091
SELECT ALL 19 DIV 95 AS col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5091
SELECT ALL 19 / 95 AS col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT 21 + + col0 FROM tab2 GROUP BY tab2.col0
----
112
113
36

query I rowsort
SELECT - - 82 + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
54
60

query I rowsort
SELECT DISTINCT - col1 + + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-38
26
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - COALESCE ( tab0.col0, - col0 * tab0.col0 ) col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - 50 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-50

query I rowsort
SELECT + 36 + - 19 AS col1 FROM tab0 cor0 GROUP BY col2
----
17
17
17

query I rowsort
SELECT DISTINCT - 54 + + 55 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT ALL - + 53 FROM tab1 GROUP BY tab1.col0
----
-53
-53
-53

query I rowsort
SELECT ALL + cor0.col0 * - col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT cor0.col2 - + ( + cor0.col2 + + cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT + + tab0.col2 + 90 AS col0 FROM tab0 GROUP BY tab0.col2
----
114
128
169

query I rowsort
SELECT - ( col2 ) AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - + 72 FROM tab2 GROUP BY tab2.col0
----
-72

query I rowsort
SELECT ALL 73 * + col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5913

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 96 col0 FROM tab2 GROUP BY tab2.col0
----
96
96
96

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( 52, + tab1.col2 ) FROM tab1 GROUP BY tab1.col0
----
52

query I rowsort
SELECT ALL - + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - 39 FROM tab2 GROUP BY tab2.col2
----
-39

query I rowsort
SELECT DISTINCT + tab0.col0 * - tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

onlyif mysql # DIV for integer division: 
query I rowsort label-5111
SELECT - 74 DIV 16 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-4
-4
-4

skipif mysql # not compatible
query I rowsort label-5111
SELECT - 74 / 16 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-4
-4
-4

query I rowsort
SELECT DISTINCT + + tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + 59 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
104
130
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 96 col0 FROM tab0 GROUP BY tab0.col2
----
96
96
96

query I rowsort
SELECT 77 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
122
148
85

query I rowsort
SELECT ALL - col1 * col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3483
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 - 74 * 60 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-4353
-4361
-4382

query I rowsort
SELECT ALL + 71 FROM tab2 GROUP BY tab2.col1
----
71
71
71

query I rowsort
SELECT DISTINCT + - 66 AS col2 FROM tab1 GROUP BY tab1.col1
----
-66

query I rowsort
SELECT - ( + 90 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
-90
-90
-90

onlyif mysql # DIV for integer division: 
query I rowsort label-5121
SELECT - 59 DIV 40 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5121
SELECT - 59 / 40 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

query I rowsort
SELECT 95 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
95
95
95

onlyif mysql # DIV for integer division: 
query I rowsort label-5123
SELECT - cor0.col2 DIV cor0.col0 - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-46
-71
-8

skipif mysql # not compatible
query I rowsort label-5123
SELECT - cor0.col2 / cor0.col0 - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-46
-71
-8

query I rowsort
SELECT DISTINCT + 18 * + col1 FROM tab2 GROUP BY tab2.col1
----
1062
1098
738

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT COALESCE ( 77, cor1.col1 * 6 ) col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor0.col1
----
77
77
77

query I rowsort
SELECT + tab2.col1 - - 75 AS col0 FROM tab2 GROUP BY tab2.col1
----
116
134
136

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 col0 - col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-38
26
83

query I rowsort
SELECT cor0.col0 - 22 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
21
4
61

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 * + 13 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
574
826
854

query I rowsort
SELECT DISTINCT + 88 FROM tab2 AS cor0 GROUP BY cor0.col0
----
88

query I rowsort
SELECT ALL cor0.col2 * - col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
462
6642
756

query I rowsort
SELECT + 99 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
99
99

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - + tab1.col2 + tab1.col2 FROM tab1 GROUP BY col2
----
0

query I rowsort
SELECT 27 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
27
27
27

onlyif mysql # DIV for integer division: 
query I rowsort label-5138
SELECT DISTINCT + tab0.col2 DIV tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1

skipif mysql # not compatible
query I rowsort label-5138
SELECT DISTINCT + tab0.col2 / tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1

query I rowsort
SELECT ALL 45 + 41 AS col1 FROM tab1 GROUP BY tab1.col2
----
86
86
86

query I rowsort
SELECT DISTINCT 41 FROM tab0 AS cor0 GROUP BY cor0.col2
----
41

query I rowsort
SELECT DISTINCT 32 FROM tab1 AS cor0 GROUP BY cor0.col2
----
32

query I rowsort
SELECT DISTINCT 51 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
51

query I rowsort
SELECT - tab1.col1 + 95 FROM tab1 GROUP BY tab1.col1
----
38
51
89

query I rowsort
SELECT DISTINCT + tab1.col1 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-5145
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-5145
SELECT ALL + cor0.col2 / + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT + 74 * - 18 FROM tab1 GROUP BY col2
----
-1332
-1332
-1332

query I rowsort
SELECT DISTINCT + - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT - 0 AS col0 FROM tab0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT - 94 FROM tab1 GROUP BY tab1.col0
----
-94
-94
-94

query I rowsort
SELECT ALL - tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL + cor0.col2 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1305
-5336
-7189

query I rowsort
SELECT ALL tab0.col1 AS col0 FROM tab0 GROUP BY col1 HAVING ( NULL ) IS NULL
----
0
81

query I rowsort
SELECT tab1.col0 + tab1.col0 FROM tab1 cor0 CROSS JOIN tab1 WHERE NOT NULL IS NOT NULL GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL cor0.col1 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
133
150
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT tab2.col1 + + tab2.col1 * - col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1640
-3422
-3660

query I rowsort
SELECT col1 * 99 AS col0 FROM tab1 GROUP BY tab1.col1
----
4356
5643
594

query I rowsort
SELECT cor0.col0 * col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5159
SELECT tab2.col2 * + tab2.col2 - CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5159
SELECT tab2.col2 * + tab2.col2 - CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 31 FROM tab1 GROUP BY tab1.col2
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + 45 * - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1804
-2596
-2684

query I rowsort
SELECT DISTINCT + - tab1.col1 * tab1.col1 - - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1892
-30
-3192

query I rowsort
SELECT + 46 AS col0 FROM tab1 GROUP BY tab1.col0
----
46
46
46

query I rowsort
SELECT DISTINCT - 88 FROM tab1 cor0 GROUP BY col1
----
-88

query I rowsort
SELECT DISTINCT cor0.col2 * + 72 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3240
5112
576

query I rowsort
SELECT + - 29 FROM tab2 GROUP BY tab2.col0
----
-29
-29
-29

query I rowsort
SELECT 79 FROM tab0 AS cor0 GROUP BY col0
----
79
79
79

query I rowsort
SELECT DISTINCT 10 AS col0 FROM tab0 GROUP BY tab0.col1
----
10

query I rowsort
SELECT ALL 5 FROM tab2 GROUP BY tab2.col0
----
5
5
5

query I rowsort
SELECT - 94 FROM tab2 cor0 GROUP BY cor0.col0
----
-94
-94
-94

query I rowsort
SELECT DISTINCT + 29 AS col0 FROM tab1 GROUP BY tab1.col1
----
29

onlyif mysql # DIV for integer division: 
query I rowsort label-5172
SELECT col0 + + cor0.col0 DIV col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
27
44
84

skipif mysql # not compatible
query I rowsort label-5172
SELECT col0 + + cor0.col0 / col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
27
44
84

query I rowsort
SELECT ALL col0 + - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 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 + col0 * tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT + col2 / - tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL >= col2
----

query I rowsort
SELECT tab1.col1 FROM tab1 GROUP BY col1 HAVING ( NULL ) IS NULL
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col0 * + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT + 52 FROM tab0 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT 78 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
17
19
37

query I rowsort
SELECT - 68 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
-68
-68
-68

query I rowsort
SELECT ALL 56 * tab1.col1 FROM tab1 GROUP BY col1
----
2464
3192
336

query I rowsort
SELECT ALL 73 AS col1 FROM tab1 GROUP BY tab1.col2
----
73
73
73

query I rowsort
SELECT - tab2.col2 + col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL + cor0.col1 * col1 AS col1 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 - - 9 col2 FROM tab0 GROUP BY tab0.col1
----
9
9

query I rowsort
SELECT DISTINCT + + 12 FROM tab2 GROUP BY tab2.col1
----
12

query I rowsort
SELECT - 54 * 80 AS col1 FROM tab2 GROUP BY tab2.col2
----
-4320
-4320
-4320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 col2 FROM tab1 GROUP BY tab1.col2
----
-7
-7
-7

query I rowsort
SELECT - 30 AS col2 FROM tab1 GROUP BY col1
----
-30
-30
-30

query I rowsort
SELECT ALL 39 AS col2 FROM tab1 GROUP BY tab1.col2
----
39
39
39

query I rowsort
SELECT + 91 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
91
91
91

query I rowsort
SELECT DISTINCT 82 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
1230
7462
7544

query I rowsort
SELECT DISTINCT - - 32 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1856
2528
2784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 * tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 22 - col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-69
-70
7

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5197
SELECT - CAST( + 86 AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
-86
-86
-86

skipif mysql # not compatible
query I rowsort label-5197
SELECT - CAST ( + 86 AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
-86
-86
-86

query I rowsort
SELECT 44 AS col2 FROM tab2 GROUP BY tab2.col0
----
44
44
44

query I rowsort
SELECT DISTINCT ( 4 ) + - 45 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-41

query I rowsort
SELECT - 28 AS col1 FROM tab0 GROUP BY tab0.col0
----
-28
-28
-28

onlyif mysql # DIV for integer division: 
query I rowsort label-5201
SELECT DISTINCT - 87 DIV + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-5201
SELECT DISTINCT - 87 / + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1

query I rowsort
SELECT col1 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + COALESCE ( + 75, - cor0.col0, cor0.col0 + 50 * cor0.col1 ) col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
75
75
75

query I rowsort
SELECT ALL + cor0.col1 + 21 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
102
21

query I rowsort
SELECT DISTINCT - - 9 * col2 FROM tab1 GROUP BY tab1.col2
----
405
639
72

query I rowsort
SELECT DISTINCT 67 FROM tab2 GROUP BY tab2.col0
----
67

query I rowsort
SELECT DISTINCT + 33 FROM tab0 GROUP BY tab0.col2
----
33

query I rowsort
SELECT ALL - tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT - ( + col2 ) * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2565
-3124
-48

query I rowsort
SELECT DISTINCT 94 AS col0 FROM tab1 GROUP BY tab1.col0
----
94

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT ALL 66 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL 73 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1095
-6643
-6716

query I rowsort
SELECT ALL 7 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT ALL - - col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT cor1.col0 * 60 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
5460
5520
900

query I rowsort
SELECT - 69 AS col1 FROM tab2 GROUP BY tab2.col1
----
-69
-69
-69

query I rowsort
SELECT DISTINCT + 67 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
67

query I rowsort
SELECT 97 FROM tab2 cor0 GROUP BY cor0.col1
----
97
97
97

query I rowsort
SELECT ALL + 99 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-4059
-5841
-6039

query I rowsort
SELECT ALL - 60 FROM tab2 GROUP BY tab2.col0
----
-60
-60
-60

query I rowsort
SELECT - + 89 FROM tab1 GROUP BY tab1.col2
----
-89
-89
-89

onlyif mysql # DIV for integer division: 
query I rowsort label-5225
SELECT - + 69 DIV col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-5225
SELECT - + 69 / col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1
-2
0

query I rowsort
SELECT ALL 20 FROM tab1 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT - 80 AS col1 FROM tab1 GROUP BY tab1.col1
----
-80
-80
-80

query I rowsort
SELECT DISTINCT 11 FROM tab0 AS cor0 GROUP BY col2
----
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 35 col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
35

query I rowsort
SELECT - + 76 FROM tab0 GROUP BY tab0.col1
----
-76
-76

query I rowsort
SELECT DISTINCT - cor0.col0 + 57 FROM tab1 cor0 GROUP BY cor0.col0
----
-25
29
35

query I rowsort
SELECT 87 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT - 88 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-88
-88
-88

onlyif mysql # DIV for integer division: 
query I rowsort label-5234
SELECT + 20 DIV - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5234
SELECT + 20 / - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + cor0.col2 * + cor0.col2 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
1997
42
4959

query I rowsort
SELECT DISTINCT 72 * + cor0.col1 - - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
5913

query I rowsort
SELECT + 13 FROM tab2 AS cor0 GROUP BY cor0.col2
----
13
13
13

query I rowsort
SELECT DISTINCT ( tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * - 96 col1 FROM tab2 GROUP BY tab2.col0
----
1440
8736
8832

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5240
SELECT ALL - + CAST( 53 AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
-53
-53

skipif mysql # not compatible
query I rowsort label-5240
SELECT ALL - + CAST ( 53 AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
-53
-53

query I rowsort
SELECT ALL + - 75 FROM tab1 GROUP BY tab1.col1
----
-75
-75
-75

query I rowsort
SELECT - ( 71 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-71
-71
-71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL 10 AS col1 FROM tab0 AS cor0 GROUP BY col0, col0, cor0.col1
----
10
10
10

query I rowsort
SELECT DISTINCT + tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT + 50 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
50
50
50

onlyif mysql # DIV for integer division: 
query I rowsort label-5248
SELECT cor0.col0 DIV + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5248
SELECT cor0.col0 / + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

query I rowsort
SELECT 30 FROM tab2 AS cor0 GROUP BY cor0.col1
----
30
30
30

query I rowsort
SELECT ALL - tab1.col0 + col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
462
6642
756

query I rowsort
SELECT + - col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - cor0.col1 * - col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
1596
3608

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL 24 * + 23 FROM tab2 AS cor0 GROUP BY cor0.col2
----
552
552
552

query I rowsort
SELECT 74 FROM tab2 AS cor0 GROUP BY cor0.col1
----
74
74
74

query I rowsort
SELECT cor0.col1 + 0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + + 29 FROM tab0 GROUP BY tab0.col2
----
29
29
29

query I rowsort
SELECT ALL cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 39 FROM tab1 GROUP BY tab1.col1
----
-39

query I rowsort
SELECT ALL + 20 FROM tab2 AS cor0 GROUP BY cor0.col1
----
20
20
20

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL + + 80 AS col1 FROM tab2 GROUP BY tab2.col1
----
80
80
80

query I rowsort
SELECT - cor0.col0 + - cor0.col1 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1773
-3572
-3736

onlyif mysql # DIV for integer division: 
query I rowsort label-5265
SELECT ALL cor0.col0 DIV - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5265
SELECT ALL cor0.col0 / - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL + 36 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
36
36
36

query I rowsort
SELECT - 58 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
-58
-58
-58

query I rowsort
SELECT + cor0.col1 * 75 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3300
4275
450

query I rowsort
SELECT 82 AS col2 FROM tab1 GROUP BY tab1.col0
----
82
82
82

query I rowsort
SELECT 65 FROM tab2 GROUP BY tab2.col0
----
65
65
65

query I rowsort
SELECT cor0.col1 + 62 FROM tab0 cor0 GROUP BY cor0.col1
----
143
62

query I rowsort
SELECT + 74 + 31 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
105
105
105

query I rowsort
SELECT + + 31 FROM tab2 GROUP BY tab2.col1
----
31
31
31

query I rowsort
SELECT DISTINCT cor0.col1 + + 23 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1092
1677
190

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-6561
0
0

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2378
4661
5307

onlyif mysql # DIV for integer division: 
query I rowsort label-5278
SELECT cor0.col1 DIV cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5278
SELECT cor0.col1 / cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
2

query I rowsort
SELECT DISTINCT cor0.col0 + ( cor0.col0 + + cor0.col0 ) * + 9 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1577
494
817

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 30 col1 FROM tab2 GROUP BY tab2.col0
----
30

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 - - 21 AS col0 FROM tab0 GROUP BY tab0.col2
----
21

query I rowsort
SELECT ALL + 4 AS col2 FROM tab2 GROUP BY tab2.col0
----
4
4
4

query I rowsort
SELECT tab1.col1 * col1 + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1980
3306
42

query I rowsort
SELECT ALL + 10 AS col1 FROM tab1 GROUP BY tab1.col1
----
10
10
10

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5286
SELECT cor0.col0 * - CAST( NULL AS SIGNED ) + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5286
SELECT cor0.col0 * - CAST ( NULL AS INTEGER ) + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 33 FROM tab0 GROUP BY tab0.col1
----
-33
-33

onlyif mysql # DIV for integer division: 
query I rowsort label-5288
SELECT DISTINCT + 37 DIV 62 - - tab2.col1 DIV 11 FROM tab2 GROUP BY tab2.col1
----
3
5

skipif mysql # not compatible
query I rowsort label-5288
SELECT DISTINCT + 37 / 62 - - tab2.col1 / 11 FROM tab2 GROUP BY tab2.col1
----
3
5

onlyif mysql # DIV for integer division: 
query I rowsort label-5289
SELECT ALL - 88 DIV 62 AS col2 FROM tab0 GROUP BY tab0.col1
----
-1
-1

skipif mysql # not compatible
query I rowsort label-5289
SELECT ALL - 88 / 62 AS col2 FROM tab0 GROUP BY tab0.col1
----
-1
-1

query I rowsort
SELECT - - col2 * + tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3422
6320
7656

query I rowsort
SELECT 77 FROM tab0 GROUP BY tab0.col2
----
77
77
77

query I rowsort
SELECT DISTINCT + 15 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15

query I rowsort
SELECT DISTINCT 98 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
98

query I rowsort
SELECT + + tab2.col2 * + 28 FROM tab2 GROUP BY tab2.col2
----
1624
2212
2436

query I rowsort
SELECT - cor0.col0 * - cor0.col1 + + col1 * - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 + + cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6642
0

query I rowsort
SELECT DISTINCT 46 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
46

query I rowsort
SELECT ALL + 85 * + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2040
3230
6715

query I rowsort
SELECT 85 * 19 + - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1554
1556
1574

query I rowsort
SELECT DISTINCT - tab2.col1 - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT DISTINCT + 41 * - 76 + 10 FROM tab0 GROUP BY tab0.col1
----
-3106

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL COALESCE ( + 41, - cor0.col2 * cor0.col2 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT DISTINCT + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 82 col0 FROM tab1 GROUP BY tab1.col1
----
-82

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT 40 FROM tab1 AS cor0 GROUP BY cor0.col0
----
40
40
40

query I rowsort
SELECT ALL + col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT 55 FROM tab1 GROUP BY tab1.col2
----
55

query I rowsort
SELECT DISTINCT + + ( - tab0.col2 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT tab2.col2 + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT ALL tab0.col2 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT - NULLIF ( - col2, - tab0.col2 ) FROM tab0 GROUP BY col2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 75 col1 FROM tab1 GROUP BY tab1.col2
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 6 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL - NULLIF ( 53, 54 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
-53
-53
-53

query I rowsort
SELECT + ( + col1 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
44
57
6

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5319
SELECT ALL ( 6 ) + + col1 * + CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5319
SELECT ALL ( 6 ) + + col1 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 13 AS col0 FROM tab1 GROUP BY tab1.col0
----
13

onlyif mysql # DIV for integer division: 
query I rowsort label-5321
SELECT - cor0.col0 DIV COALESCE ( 42, cor0.col1 + cor0.col2, CASE 55 WHEN cor0.col1 * col2 THEN NULL WHEN cor0.col2 * cor0.col0 + cor0.col1 * cor0.col1 THEN + col0 ELSE NULL END * - cor0.col1, cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-5321
SELECT - cor0.col0 / COALESCE ( 42, cor0.col1 + cor0.col2, CASE 55 WHEN cor0.col1 * col2 THEN NULL WHEN cor0.col2 * cor0.col0 + cor0.col1 * cor0.col1 THEN + col0 ELSE NULL END * - cor0.col1, cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5322
SELECT DISTINCT col0 DIV tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1

skipif mysql # not compatible
query I rowsort label-5322
SELECT DISTINCT col0 / tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1

query I rowsort
SELECT ALL - COALESCE ( cor0.col1, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL 10 * - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
-810
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 14 * + tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
-1148
-308
-392

query I rowsort
SELECT DISTINCT + 25 + 21 AS col0 FROM tab2 GROUP BY tab2.col2
----
46

query I rowsort
SELECT + 65 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * + col0 - 24 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col2, cor0.col0
----
1236
152
5798

query I rowsort
SELECT ALL 65 AS col0 FROM tab1 GROUP BY tab1.col1
----
65
65
65

query I rowsort
SELECT 19 FROM tab1 GROUP BY tab1.col0
----
19
19
19

query I rowsort
SELECT 36 AS col1 FROM tab0 GROUP BY tab0.col1
----
36
36

query I rowsort
SELECT DISTINCT - tab2.col2 - + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 0 * - col2 col0 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT + cor0.col0 * col0 AS col0 FROM tab2 cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT - tab1.col0 * tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT - + 51 FROM tab0 GROUP BY tab0.col2
----
-51
-51
-51

query I rowsort
SELECT DISTINCT 53 * + cor0.col1 + - 15 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2317
3006
303

query I rowsort
SELECT ALL 27 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
27
27

query I rowsort
SELECT DISTINCT - + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL + 76 AS col2 FROM tab2 GROUP BY col1
----
76
76
76

query I rowsort
SELECT - ( 86 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-86
-86
-86

query I rowsort
SELECT DISTINCT 47 * cor0.col2 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2784
3792
4176

query I rowsort
SELECT DISTINCT + tab1.col1 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - col1 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT cor0.col0 * + COALESCE ( + cor0.col0, - cor0.col0 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

onlyif mysql # DIV for integer division: 
query I rowsort label-5346
SELECT DISTINCT + cor0.col0 DIV - 66 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
0

skipif mysql # not compatible
query I rowsort label-5346
SELECT DISTINCT + cor0.col0 / - 66 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
0

query I rowsort
SELECT 16 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
16
16
16

query I rowsort
SELECT ALL - 96 - - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-17
-58
-72

query I rowsort
SELECT 84 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 23 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-23

query I rowsort
SELECT + 61 FROM tab0 GROUP BY tab0.col2
----
61
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT + 22 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
22
22
22

query I rowsort
SELECT 84 * - 1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-84
-84
-84

query I rowsort
SELECT ALL + - 28 FROM tab2 GROUP BY tab2.col0
----
-28
-28
-28

query I rowsort
SELECT - 8 FROM tab0 GROUP BY tab0.col1
----
-8
-8

query I rowsort
SELECT - + 99 FROM tab1 GROUP BY tab1.col1
----
-99
-99
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 17 * - 27 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-459

query I rowsort
SELECT DISTINCT + col0 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0 HAVING NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT + 98 FROM tab1 cor0 GROUP BY cor0.col1
----
98

query I rowsort
SELECT DISTINCT tab1.col0 + tab1.col0 FROM tab1 GROUP BY col0
----
164
44
56

query I rowsort
SELECT ALL + - tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col0 + 76 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
104
158
98

query I rowsort
SELECT 27 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1215
1917
216

query I rowsort
SELECT ALL - 6 AS col2 FROM tab1 GROUP BY tab1.col1
----
-6
-6
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
44
44
44

query I rowsort
SELECT - tab2.col1 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT - 63 + col2 FROM tab0 GROUP BY tab0.col2
----
-25
-39
16

query I rowsort
SELECT DISTINCT + - tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - - 75 AS col1 FROM tab1 GROUP BY tab1.col1
----
75

query I rowsort
SELECT DISTINCT - - 61 AS col0 FROM tab1 GROUP BY tab1.col2
----
61

query I rowsort
SELECT DISTINCT - 38 AS col0 FROM tab2 GROUP BY tab2.col2
----
-38

onlyif mysql # DIV for integer division: 
query I rowsort label-5375
SELECT cor0.col1 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5375
SELECT cor0.col1 / cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1
1
1

query I rowsort
SELECT DISTINCT + ( + 30 ) FROM tab1 GROUP BY tab1.col0
----
30

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-5379
SELECT + ( tab0.col0 ) DIV tab0.col0 + - tab0.col0 * - 67 FROM tab0 GROUP BY tab0.col0
----
1743
2882
5562

skipif mysql # not compatible
query I rowsort label-5379
SELECT + ( tab0.col0 ) / tab0.col0 + - tab0.col0 * - 67 FROM tab0 GROUP BY tab0.col0
----
1743
2882
5562

query I rowsort
SELECT DISTINCT - tab2.col2 * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT 12 AS col1 FROM tab0 GROUP BY tab0.col2
----
12

query I rowsort
SELECT DISTINCT + col2 + 55 FROM tab2 AS cor0 GROUP BY cor0.col2
----
113
134
142

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 44 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 38 col1 FROM tab1 GROUP BY tab1.col0
----
-38
-38
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - cor0.col0 - 99 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-125
-142
-182

query I rowsort
SELECT + 0 AS col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT - 36 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
22
43
51

query I rowsort
SELECT DISTINCT + - 15 AS col0 FROM tab1 GROUP BY tab1.col2
----
-15

query I rowsort
SELECT ALL 22 * - 15 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-249
-330

query I rowsort
SELECT ALL + 9 + + 32 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
41
41

query I rowsort
SELECT ALL 18 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, col0
----
18
18
18

query I rowsort
SELECT DISTINCT 5 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 75 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
75
75
75

query I rowsort
SELECT + + 10 AS col0 FROM tab2 GROUP BY tab2.col1
----
10
10
10

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 DISTINCT 36 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1368
2844
864

query I rowsort
SELECT DISTINCT tab2.col1 * + tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT - - 40 AS col1 FROM tab1 GROUP BY tab1.col2
----
40
40
40

query I rowsort
SELECT ALL - - 49 FROM tab1 GROUP BY tab1.col0
----
49
49
49

query I rowsort
SELECT 51 AS col2 FROM tab0 GROUP BY tab0.col2
----
51
51
51

query I rowsort
SELECT ALL + + 56 AS col1 FROM tab2 GROUP BY tab2.col0
----
56
56
56

query I rowsort
SELECT ALL + 73 FROM tab0 GROUP BY tab0.col0
----
73
73
73

query I rowsort
SELECT ALL 40 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
40
40
40

query I rowsort
SELECT cor0.col0 * - cor0.col0 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

onlyif mysql # DIV for integer division: 
query I rowsort label-5407
SELECT ALL + tab1.col1 DIV 64 + tab1.col1 * + 92 AS col2 FROM tab1 GROUP BY tab1.col1
----
4048
5244
552

skipif mysql # not compatible
query I rowsort label-5407
SELECT ALL + tab1.col1 / 64 + tab1.col1 * + 92 AS col2 FROM tab1 GROUP BY tab1.col1
----
4048
5244
552

query I rowsort
SELECT + 76 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
76
76
76

query I rowsort
SELECT ALL 31 FROM tab2 AS cor0 GROUP BY cor0.col0
----
31
31
31

query I rowsort
SELECT 64 AS col0 FROM tab0 GROUP BY tab0.col2
----
64
64
64

query I rowsort
SELECT + 20 FROM tab0 GROUP BY tab0.col2
----
20
20
20

query I rowsort
SELECT DISTINCT - + 46 AS col2 FROM tab2 GROUP BY col0
----
-46

query I rowsort
SELECT cor0.col1 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT 98 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
98

query I rowsort
SELECT - cor0.col2 + cor0.col2 * - 96 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
-4365
-6887
-776

query I rowsort
SELECT - + 46 AS col2 FROM tab0 GROUP BY tab0.col0
----
-46
-46
-46

query I rowsort
SELECT 44 FROM tab2 GROUP BY tab2.col0
----
44
44
44

query I rowsort
SELECT + cor0.col1 - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2
-27
12

query I rowsort
SELECT tab1.col1 * col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT + tab2.col1 FROM tab2 WHERE NOT ( NULL ) NOT IN ( + tab2.col1 ) GROUP BY tab2.col1
----

query I rowsort
SELECT - 9 AS col1 FROM tab2 GROUP BY tab2.col2
----
-9
-9
-9

query I rowsort
SELECT + 82 FROM tab0 GROUP BY tab0.col2
----
82
82
82

query I rowsort
SELECT - cor0.col2 * + 60 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
-2700
-4260
-480

query I rowsort
SELECT - ( - 30 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
30
30
30

onlyif mysql # DIV for integer division: 
query I rowsort label-5425
SELECT DISTINCT cor0.col2 DIV cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-5425
SELECT DISTINCT cor0.col2 / cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT ALL - 56 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor1.col2
----
-56
-56
-56
-56
-56
-56

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL - + ( tab2.col0 ) - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

onlyif mysql # DIV for integer division: 
query I rowsort label-5429
SELECT + 96 DIV + 22 FROM tab0 GROUP BY tab0.col0
----
4
4
4

skipif mysql # not compatible
query I rowsort label-5429
SELECT + 96 / + 22 FROM tab0 GROUP BY tab0.col0
----
4
4
4

query I rowsort
SELECT DISTINCT - tab0.col0 + + ( - tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

query I rowsort
SELECT ALL - 56 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-2296
-3304
-3416

query I rowsort
SELECT DISTINCT + - 10 FROM tab1 GROUP BY tab1.col1
----
-10

query I rowsort
SELECT DISTINCT + 20 - - 78 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
98

query I rowsort
SELECT ALL 22 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
22
22

query I rowsort
SELECT - ( tab0.col2 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + ( + tab2.col2 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + + 23 AS col1 FROM tab1 GROUP BY tab1.col0
----
23

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col0
----
24
38
79

query I rowsort
SELECT DISTINCT - col0 * 3 AS col2 FROM tab1 GROUP BY tab1.col0
----
-246
-66
-84

query I rowsort
SELECT ALL - cor0.col0 * + ( + cor0.col0 ) + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-240
-8372
-8556

query I rowsort
SELECT ALL + col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, col0
----
15
91
92

query I rowsort
SELECT DISTINCT - + col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL 25 FROM tab1 GROUP BY tab1.col2
----
25
25
25

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
-26
-43
-83

query I rowsort
SELECT + - 91 AS col1 FROM tab0 GROUP BY tab0.col2
----
-91
-91
-91

query I rowsort
SELECT DISTINCT tab2.col2 + tab2.col2 FROM tab2 WHERE NULL IS NULL GROUP BY col2
----
116
158
174

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - tab0.col1 * + ( - tab0.col1 * + tab0.col1 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
0
531441

query I rowsort
SELECT + col2 + - 45 FROM tab2 GROUP BY tab2.col2
----
13
34
42

query I rowsort
SELECT DISTINCT + tab1.col2 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT + + 95 AS col2 FROM tab0 GROUP BY tab0.col2
----
95

query I rowsort
SELECT + tab1.col2 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT ALL - cor0.col1 * 62 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
-2728
-3534
-372

query I rowsort
SELECT ALL - tab2.col1 - + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT ALL - 4 AS col1 FROM tab1 GROUP BY tab1.col1
----
-4
-4
-4

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL tab2.col1 + COALESCE ( - 68, col0 * ( 43 * + tab2.col2 ) ) AS col0 FROM tab2 GROUP BY tab2.col1
----
-27
-7
-9

query I rowsort
SELECT DISTINCT col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT DISTINCT - 57 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
-57

query I rowsort
SELECT + ( - 0 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT 74 FROM tab1 GROUP BY col2
----
74

query I rowsort
SELECT - col2 * 30 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1350
-2130
-240

query I rowsort
SELECT DISTINCT 51 - - col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
142
143
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 56 col1 FROM tab1 GROUP BY tab1.col0
----
-56
-56
-56

query I rowsort
SELECT DISTINCT - tab2.col0 + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT DISTINCT - + tab0.col1 + 91 AS col1 FROM tab0 GROUP BY tab0.col1
----
10
91

query I rowsort
SELECT + cor0.col1 + NULLIF ( - 1 - - cor0.col0 * - cor0.col1, + cor0.col0 ) * + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
-154652
-316771
-55815

query I rowsort
SELECT + + tab2.col0 * 58 FROM tab2 GROUP BY tab2.col0
----
5278
5336
870

query I rowsort
SELECT ALL - 35 * + col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-3185
-3220
-525

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-5471
SELECT cor0.col2 + - cor0.col2 DIV col2 FROM tab0 cor0 GROUP BY cor0.col2
----
23
37
78

skipif mysql # not compatible
query I rowsort label-5471
SELECT cor0.col2 + - cor0.col2 / col2 FROM tab0 cor0 GROUP BY cor0.col2
----
23
37
78

query I rowsort
SELECT ALL 81 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 30 * - 51 col1 FROM tab1 GROUP BY tab1.col0
----
-1530
-1530
-1530

query I rowsort
SELECT ALL - cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL 55 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
240
8372
8556

query I rowsort
SELECT DISTINCT 38 AS col1 FROM tab0 GROUP BY tab0.col2
----
38

query I rowsort
SELECT cor0.col1 * 36 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
2835

onlyif mysql # DIV for integer division: 
query I rowsort label-5479
SELECT ALL cor0.col0 + - cor0.col0 DIV + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
21
27
81

skipif mysql # not compatible
query I rowsort label-5479
SELECT ALL cor0.col0 + - cor0.col0 / + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
21
27
81

query I rowsort
SELECT - 14 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
-14
-14
-14

query I rowsort
SELECT DISTINCT + 60 FROM tab2 GROUP BY tab2.col0
----
60

query I rowsort
SELECT DISTINCT 76 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
19
32
70

query I rowsort
SELECT DISTINCT + + 70 AS col1 FROM tab0 GROUP BY tab0.col1
----
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-5485
SELECT - col0 DIV - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5485
SELECT - col0 / - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1
1
1

query I rowsort
SELECT ALL - ( cor0.col2 ) + - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-158
-48
-76

query I rowsort
SELECT 21 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
21
21
21

query I rowsort
SELECT DISTINCT + tab1.col2 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5489
SELECT + CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5489
SELECT + CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ALL - + 37 FROM tab1 GROUP BY tab1.col1
----
-37
-37
-37

query I rowsort
SELECT ALL 64 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
64
64
64

query I rowsort
SELECT - - tab2.col2 * tab2.col2 + 6 FROM tab2 GROUP BY tab2.col2
----
3370
6247
7575

query I rowsort
SELECT tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT ALL 48 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
48
48
48

query I rowsort
SELECT + 84 * col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
1260
7644
7728

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT 76 FROM tab1 GROUP BY tab1.col0
----
76
76
76

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-12
-34
72

onlyif mysql # DIV for integer division: 
query I rowsort label-5499
SELECT DISTINCT + - 64 DIV 17 AS col2 FROM tab1 GROUP BY tab1.col0
----
-3

skipif mysql # not compatible
query I rowsort label-5499
SELECT DISTINCT + - 64 / 17 AS col2 FROM tab1 GROUP BY tab1.col0
----
-3

query I rowsort
SELECT DISTINCT 69 + - col1 FROM tab2 GROUP BY tab2.col1
----
10
28
8

onlyif mysql # DIV for integer division: 
query I rowsort label-5501
SELECT - - COALESCE ( + 65, tab1.col1 + - tab1.col1 ) DIV + 93 AS col2 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5501
SELECT - - COALESCE ( + 65, tab1.col1 + - tab1.col1 ) / + 93 AS col2 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT 60 AS col0 FROM tab1 GROUP BY col1
----
60
60
60

query I rowsort
SELECT ALL - tab0.col2 - - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL - + 85 AS col0 FROM tab2 GROUP BY tab2.col2
----
-85
-85
-85

query I rowsort
SELECT + ( tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT 33 * 11 + - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
281
335
341

query I rowsort
SELECT - 34 AS col1 FROM tab0 GROUP BY tab0.col0
----
-34
-34
-34

query I rowsort
SELECT ALL 57 * 91 FROM tab2 GROUP BY tab2.col1
----
5187
5187
5187

query I rowsort
SELECT 84 FROM tab0 GROUP BY tab0.col0
----
84
84
84

query I rowsort
SELECT + tab0.col0 * - 59 FROM tab0 GROUP BY tab0.col0
----
-1534
-2537
-4897

onlyif mysql # DIV for integer division: 
query I rowsort label-5512
SELECT + + tab1.col0 DIV - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5512
SELECT + + tab1.col0 / - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

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 - 98 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-98
-98
-98

query I rowsort
SELECT ALL - - 89 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - 50 ) * col2 + - 27 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1227
-1927
-3977

query I rowsort
SELECT - 74 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-74
-74
-74

query I rowsort
SELECT DISTINCT - cor0.col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT col1 * - tab0.col1 + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-6480
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5520
SELECT + col0 + tab0.col0 DIV - tab0.col0 col0 FROM tab0 GROUP BY col0
----
25
42
82

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5520
SELECT + col0 + tab0.col0 / - tab0.col0 col0 FROM tab0 GROUP BY col0
----
25
42
82

query I rowsort
SELECT + cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1892
-30
-3192

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5523
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-5523
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL

query I rowsort
SELECT DISTINCT - 24 + - col0 * tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1873
-6913
-700

query I rowsort
SELECT DISTINCT 92 AS col1 FROM tab0 GROUP BY tab0.col1
----
92

query I rowsort
SELECT + 65 - + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-14
27
41

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 tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-5529
SELECT DISTINCT + cor0.col0 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-5529
SELECT DISTINCT + cor0.col0 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT 87 * cor0.col1 + - 93 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3735
429
4866

query I rowsort
SELECT ALL - - 49 FROM tab2 GROUP BY tab2.col0
----
49
49
49

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + - 92 FROM tab2 GROUP BY tab2.col1
----
-92
-92
-92

query I rowsort
SELECT ALL cor0.col2 + - col0 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1218
-5278
-7110

query I rowsort
SELECT 48 * - col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1056
-1344
-3936

query I rowsort
SELECT 52 FROM tab1 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT ALL - - 2 + 54 FROM tab2 GROUP BY tab2.col1
----
56
56
56

query I rowsort
SELECT DISTINCT - + 77 FROM tab0 GROUP BY col1
----
-77

query I rowsort
SELECT ALL ( + tab0.col2 ) * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT + + col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT 95 FROM tab1 AS cor0 GROUP BY cor0.col0
----
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 + - 41 col0 FROM tab1 GROUP BY tab1.col2
----
-33
30
4

query I rowsort
SELECT col1 * + col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
6561

query I rowsort
SELECT - cor0.col0 * 31 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1333
-2573
-806

query I rowsort
SELECT DISTINCT + ( - cor0.col2 ) + cor0.col2 * 99 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4410
6958
784

onlyif mysql # DIV for integer division: 
query I rowsort label-5546
SELECT ALL + 31 DIV - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-5546
SELECT ALL + 31 / - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-2
0
0

query I rowsort
SELECT DISTINCT col2 * + 10 FROM tab2 AS cor0 GROUP BY cor0.col2
----
580
790
870

query I rowsort
SELECT ALL + col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT ( NULL ) IS NOT NULL
----
-26
-43
-83

query I rowsort
SELECT + tab0.col2 + - col2 AS col0 FROM tab0 GROUP BY tab0.col2 HAVING NOT ( NULL ) <> NULL
----

query I rowsort
SELECT col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT 31 AS col0 FROM tab1 GROUP BY col1
----
31
31
31

query I rowsort
SELECT DISTINCT 37 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
120
63
80

query I rowsort
SELECT 8 FROM tab2 AS cor0 GROUP BY col0
----
8
8
8

query I rowsort
SELECT ALL 64 FROM tab1 AS cor0 GROUP BY cor0.col2
----
64
64
64

onlyif mysql # DIV for integer division: 
query I rowsort label-5556
SELECT + - tab0.col1 DIV - 63 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-5556
SELECT + - tab0.col1 / - 63 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
1

query I rowsort
SELECT 89 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT - 7 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-7
-7
-7

query I rowsort
SELECT DISTINCT + 34 FROM tab2 AS cor0 GROUP BY cor0.col0
----
34

onlyif mysql # DIV for integer division: 
query I rowsort label-5560
SELECT DISTINCT + 88 DIV - 49 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1

skipif mysql # not compatible
query I rowsort label-5560
SELECT DISTINCT + 88 / - 49 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 18 + - cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-63
18

onlyif mysql # DIV for integer division: 
query I rowsort label-5562
SELECT + tab2.col2 DIV - 2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-29
-39
-43

skipif mysql # not compatible
query I rowsort label-5562
SELECT + tab2.col2 / - 2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-29
-39
-43

query I rowsort
SELECT + tab1.col1 + - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 74 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - col1 + 58 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-3
17

query I rowsort
SELECT ALL - 43 AS col0 FROM tab2 GROUP BY tab2.col1
----
-43
-43
-43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 21 col0 FROM tab1 GROUP BY tab1.col0
----
-21
-21
-21

query I rowsort
SELECT DISTINCT + 87 * + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
7047

query I rowsort
SELECT DISTINCT 46 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
46

query I rowsort
SELECT ALL - 91 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
-3731
-5369
-5551

query I rowsort
SELECT ALL + 81 + tab1.col2 * - col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-1944
-4960
17

query I rowsort
SELECT - tab2.col0 - - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

query I rowsort
SELECT DISTINCT 40 FROM tab2 AS cor0 GROUP BY cor0.col2
----
40

query I rowsort
SELECT 87 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT ALL + - tab2.col0 + col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL tab1.col0 + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT ALL + 8 * cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
352
456
48

query I rowsort
SELECT - 25 + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-10
66
67

query I rowsort
SELECT ALL + 40 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
40
40
40

query I rowsort
SELECT cor0.col2 * + ( + 37 ) FROM tab0 AS cor0 GROUP BY col2
----
1406
2923
888

query I rowsort
SELECT - + COALESCE ( + tab2.col1, 56 + 63 ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT 26 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT ALL - 10 FROM tab0 GROUP BY tab0.col2
----
-10
-10
-10

query I rowsort
SELECT 36 FROM tab1 GROUP BY tab1.col2
----
36
36
36

query I rowsort
SELECT ALL + + col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT ALL - tab2.col2 - 4 AS col1 FROM tab2 GROUP BY tab2.col2
----
-62
-83
-91

query I rowsort
SELECT ALL + + tab0.col2 - + 36 AS col1 FROM tab0 GROUP BY tab0.col2
----
-12
2
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col1 col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - - tab1.col0 * - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

onlyif mysql # DIV for integer division: 
query I rowsort label-5593
SELECT ALL - + 98 DIV 44 FROM tab0 GROUP BY tab0.col0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-5593
SELECT ALL - + 98 / 44 FROM tab0 GROUP BY tab0.col0
----
-2
-2
-2

query I rowsort
SELECT ALL - 90 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
-90
-90
-90

query I rowsort
SELECT + 25 AS col2 FROM tab2 GROUP BY tab2.col1
----
25
25
25

query I rowsort
SELECT + + 8 AS col2 FROM tab2 GROUP BY tab2.col1
----
8
8
8

query I rowsort
SELECT 35 FROM tab1 GROUP BY tab1.col1
----
35
35
35

query I rowsort
SELECT 18 AS col0 FROM tab2 GROUP BY tab2.col1
----
18
18
18

query I rowsort
SELECT + tab2.col1 - + col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT 12 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
12
12
12

query I rowsort
SELECT ALL + 40 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
40
40
40

query I rowsort
SELECT - 20 FROM tab0 GROUP BY tab0.col0
----
-20
-20
-20

query I rowsort
SELECT + 80 + + 58 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
138
138
138

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 DISTINCT - 18 col1 FROM tab1 GROUP BY tab1.col0
----
-18

query I rowsort
SELECT DISTINCT - - 72 AS col1 FROM tab2 GROUP BY tab2.col2
----
72

query I rowsort
SELECT + 54 AS col1 FROM tab0 GROUP BY tab0.col0
----
54
54
54

query I rowsort
SELECT DISTINCT 73 AS col0 FROM tab0 GROUP BY tab0.col1
----
73

query I rowsort
SELECT ALL + - 24 AS col1 FROM tab0 GROUP BY tab0.col1
----
-24
-24

query I rowsort
SELECT DISTINCT + 19 AS col1 FROM tab1 GROUP BY tab1.col2
----
19

query I rowsort
SELECT - 12 * cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
-1092
-1104
-180

query I rowsort
SELECT DISTINCT + cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT ( 63 ) * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1512
2394
4977

query I rowsort
SELECT + 93 * col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3813
5487
5673

query I rowsort
SELECT DISTINCT 13 FROM tab2 AS cor0 GROUP BY cor0.col1
----
13

query I rowsort
SELECT - 83 FROM tab1 cor0 GROUP BY cor0.col0
----
-83
-83
-83

query I rowsort
SELECT DISTINCT - + 65 AS col0 FROM tab2 GROUP BY tab2.col2
----
-65

query I rowsort
SELECT DISTINCT + 23 AS col1 FROM tab1 GROUP BY col2
----
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 19 col2 FROM tab1 GROUP BY tab1.col2
----
-19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + cor0.col0 * 33 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
1419
2739
858

query I rowsort
SELECT ALL cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT ALL + 89 FROM tab1 cor0 GROUP BY cor0.col1
----
89
89
89

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col0 col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT ALL CASE - cor0.col0 WHEN col0 * 59 THEN NULL WHEN cor0.col0 THEN 92 + cor0.col0 END AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT DISTINCT tab0.col1 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT ALL + + 98 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
106
143
169

query I rowsort
SELECT ALL + 38 + + tab0.col1 * + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
38
6599

query I rowsort
SELECT + 83 FROM tab2 GROUP BY tab2.col1
----
83
83
83

onlyif mysql # DIV for integer division: 
query I rowsort label-5632
SELECT - ( 46 ) DIV tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5632
SELECT - ( 46 ) / tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT 95 AS col2 FROM tab2 GROUP BY tab2.col2
----
95
95
95

onlyif mysql # DIV for integer division: 
query I rowsort label-5634
SELECT - - tab2.col2 DIV tab2.col2 + - 97 AS col2 FROM tab2 GROUP BY tab2.col2
----
-96
-96
-96

skipif mysql # not compatible
query I rowsort label-5634
SELECT - - tab2.col2 / tab2.col2 + - 97 AS col2 FROM tab2 GROUP BY tab2.col2
----
-96
-96
-96

query I rowsort
SELECT ALL cor0.col0 - - col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
182
184
30

query I rowsort
SELECT ALL + ( 36 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT - - 80 + 16 FROM tab2 GROUP BY col2
----
96
96
96

query I rowsort
SELECT - cor0.col1 + - 11 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-17
-55
-68

query I rowsort
SELECT COALESCE ( cor0.col1, 22 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + + 60 FROM tab2, tab2 cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT + cor0.col2 * ( - cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - 22 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-14
23
49

query I rowsort
SELECT ALL + ( + tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 77 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
77

query I rowsort
SELECT + - 56 - + tab2.col2 * - 62 FROM tab2 GROUP BY tab2.col2
----
3540
4842
5338

query I rowsort
SELECT DISTINCT - 65 - tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-110
-136
-73

query I rowsort
SELECT ALL - 74 * - col2 + - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
4234
5767
6351

onlyif mysql # DIV for integer division: 
query I rowsort label-5648
SELECT DISTINCT cor0.col1 DIV - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-5648
SELECT DISTINCT cor0.col1 / - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 74 + tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
112
153
98

query I rowsort
SELECT ALL - tab0.col2 * 61 FROM tab0 GROUP BY tab0.col2
----
-1464
-2318
-4819

query I rowsort
SELECT - 3 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3
-3
-3

query I rowsort
SELECT - 92 + cor0.col2 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1536
-6333
-668

query I rowsort
SELECT ALL - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT 75 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
75
75
75

query I rowsort
SELECT 21 FROM tab1 AS cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT + 84 FROM tab2 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT - col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT cor0.col0 + col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

query I rowsort
SELECT ALL cor0.col0 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL - 56 FROM tab0, tab0 cor0 GROUP BY cor0.col2
----
-56
-56
-56

query I rowsort
SELECT ALL col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - 87 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-87
-87
-87

query I rowsort
SELECT ALL - + tab0.col0 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT ALL tab1.col1 * tab1.col1 + - tab1.col1 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - - tab1.col0 + 61 FROM tab1 GROUP BY col0
----
143
83
89

onlyif mysql # DIV for integer division: 
query I rowsort label-5667
SELECT DISTINCT col1 DIV ( + 62 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-5667
SELECT DISTINCT col1 / ( + 62 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0

query I rowsort
SELECT DISTINCT cor0.col0 - - 58 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
149
150
73

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 66 FROM tab0 AS cor0 GROUP BY cor0.col0
----
66
66
66

query I rowsort
SELECT - + tab2.col0 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT - tab0.col0 + col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT + 51 FROM tab0 AS cor0 GROUP BY col1
----
51
51

query I rowsort
SELECT ALL - 41 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-41
-41
-41

query I rowsort
SELECT DISTINCT + - 45 AS col1 FROM tab1 GROUP BY tab1.col1
----
-45

query I rowsort
SELECT + 6 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
6
87

query I rowsort
SELECT + 72 AS col0 FROM tab2 GROUP BY tab2.col1
----
72
72
72

query I rowsort
SELECT + 80 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
80
80
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1305
-5336
-7189

query I rowsort
SELECT DISTINCT tab1.col1 + + tab1.col1 * tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
1980
3306
42

query I rowsort
SELECT ALL 38 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
38
38

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT 49 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
49
49
49

query I rowsort
SELECT ALL 80 - - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
124
137
86

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
26
43
83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( 84, + cor0.col0 * - cor0.col2 + 62 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
84

query I rowsort
SELECT + 1 AS col0 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT - 67 - cor0.col2 * col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-2011
-67
-67

query I rowsort
SELECT ALL + 50 AS col2 FROM tab2 GROUP BY tab2.col0
----
50
50
50

query I rowsort
SELECT ALL 41 AS col2 FROM tab2 GROUP BY tab2.col2
----
41
41
41

query I rowsort
SELECT ALL 54 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
54
54
54

query I rowsort
SELECT + COALESCE ( col0, + col2 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-5694
SELECT - - tab2.col1 DIV - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5694
SELECT - - tab2.col1 / - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5695
SELECT - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5695
SELECT - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5696
SELECT ALL + cor0.col0 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5696
SELECT ALL + cor0.col0 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-5697
SELECT + cor0.col0 DIV - ( - cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-5697
SELECT + cor0.col0 / - ( - cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
0
1
2

query I rowsort
SELECT DISTINCT + 75 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6075

onlyif mysql # DIV for integer division: 
query I rowsort label-5699
SELECT DISTINCT 14 DIV - col2 FROM tab2 AS cor0 GROUP BY col2
----
0

skipif mysql # not compatible
query I rowsort label-5699
SELECT DISTINCT 14 / - col2 FROM tab2 AS cor0 GROUP BY col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + 38 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
120
60
66

query I rowsort
SELECT DISTINCT 44 * - cor0.col2 FROM tab2 cor0 GROUP BY col2
----
-2552
-3476
-3828

query I rowsort
SELECT + 3 * 1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor0.col1
----
3
3
3
3

query I rowsort
SELECT ALL + - 38 AS col0 FROM tab0 GROUP BY col1
----
-38
-38

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5704
SELECT + CAST( NULL AS DECIMAL ) AS col2 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5704
SELECT + CAST ( NULL AS REAL ) AS col2 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 31 FROM tab2 GROUP BY tab2.col0
----
-31
-31
-31

query I rowsort
SELECT 82 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
82
82
82

query I rowsort
SELECT ( 99 ) FROM tab2 AS cor0 GROUP BY col0
----
99
99
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 75 col1 FROM tab2 AS cor0 GROUP BY col0
----
75
75
75

query I rowsort
SELECT + ( + tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 42 FROM tab1 AS cor0 GROUP BY cor0.col2
----
42
42
42

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2, col2
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 25 col1 FROM tab1 GROUP BY tab1.col2
----
-25

query I rowsort
SELECT - 14 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-14
-14
-14

query I rowsort
SELECT DISTINCT - tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - 0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - 56 AS col1 FROM tab0 GROUP BY tab0.col1
----
-56

query I rowsort
SELECT DISTINCT + 58 * - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-5278
-5336
-870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 0 col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT 54 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
4374

query I rowsort
SELECT + + tab0.col1 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + 52 * tab2.col1 + - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
2091
3009
3111

query I rowsort
SELECT ALL - + 16 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-1296
0

query I rowsort
SELECT + + tab1.col2 * - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT cor0.col1 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT 44 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44

query I rowsort
SELECT ALL - + 35 + - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-106
-43
-80

onlyif mysql # DIV for integer division: 
query I rowsort label-5728
SELECT 27 DIV + 49 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-5728
SELECT 27 / + 49 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT cor0.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-5730
SELECT cor0.col0 DIV + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-5730
SELECT cor0.col0 / + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
1
3

query I rowsort
SELECT DISTINCT col0 + col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT - tab2.col1 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL - cor0.col2 - 68 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-113
-139
-76

onlyif mysql # DIV for integer division: 
query I rowsort label-5734
SELECT tab2.col2 DIV tab2.col2 - col2 FROM tab2 GROUP BY tab2.col2
----
-57
-78
-86

skipif mysql # not compatible
query I rowsort label-5734
SELECT tab2.col2 / tab2.col2 - col2 FROM tab2 GROUP BY tab2.col2
----
-57
-78
-86

query I rowsort
SELECT ( + col0 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT - cor0.col2 * 5 + 99 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
-126
-256
59

query I rowsort
SELECT ALL + cor0.col2 + - 77 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-32
-6
-69

query I rowsort
SELECT cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5740
SELECT ALL + - CAST( col1 AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

skipif mysql # not compatible
query I rowsort label-5740
SELECT ALL + - CAST ( col1 AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL + 33 * 32 AS col2 FROM tab0 GROUP BY tab0.col1
----
1056
1056

query I rowsort
SELECT 44 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
44
44
44

query I rowsort
SELECT - tab0.col1 - + 61 FROM tab0 GROUP BY tab0.col1
----
-142
-61

query I rowsort
SELECT - tab2.col1 + + 54 AS col1 FROM tab2 GROUP BY tab2.col1
----
-5
-7
13

query I rowsort
SELECT - 34 FROM tab0 GROUP BY col0
----
-34
-34
-34

query I rowsort
SELECT ALL - cor0.col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL + tab2.col2 * - 65 FROM tab2 GROUP BY tab2.col2
----
-3770
-5135
-5655

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 34, 75 * - col0 ) AS col0 FROM tab1 GROUP BY tab1.col2
----
34
34
34

query I rowsort
SELECT ALL - col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT - tab0.col0 + + tab0.col0 FROM tab0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1936
3249
36

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL >= NULL
----

query I rowsort
SELECT tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT - - col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-5755
SELECT DISTINCT ( - cor0.col1 ) - cor0.col1 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-82
0

skipif mysql # not compatible
query I rowsort label-5755
SELECT DISTINCT ( - cor0.col1 ) - cor0.col1 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-82
0

query I rowsort
SELECT ALL + 22 AS col2 FROM tab1 GROUP BY tab1.col1
----
22
22
22

query I rowsort
SELECT - col1 + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5758
SELECT col1 + cor0.col1 DIV - 55 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
56
6

skipif mysql # not compatible
query I rowsort label-5758
SELECT col1 + cor0.col1 / - 55 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
56
6

query I rowsort
SELECT ALL - 57 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-57
-57
-57

query I rowsort
SELECT DISTINCT + 82 FROM tab2 AS cor0 GROUP BY cor0.col0
----
82

query I rowsort
SELECT ALL - - col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL + - tab1.col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-5763
SELECT - - tab0.col0 + tab0.col0 DIV - 19 AS col0 FROM tab0 GROUP BY tab0.col0
----
25
41
79

skipif mysql # not compatible
query I rowsort label-5763
SELECT - - tab0.col0 + tab0.col0 / - 19 AS col0 FROM tab0 GROUP BY tab0.col0
----
25
41
79

query I rowsort
SELECT 18 FROM tab0 GROUP BY tab0.col2
----
18
18
18

query I rowsort
SELECT DISTINCT - + tab1.col1 * tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL + 18 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
18
18

query I rowsort
SELECT cor0.col0 - cor0.col0 * 41 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-3640
-3680
-600

query I rowsort
SELECT - + col2 * 15 FROM tab1 GROUP BY col2
----
-1065
-120
-675

query I rowsort
SELECT 45 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
45
45

query I rowsort
SELECT ALL + ( + tab0.col2 ) - - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY col1, col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 86 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
86

onlyif mysql # DIV for integer division: 
query I rowsort label-5773
SELECT - 73 DIV tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-5773
SELECT - 73 / tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1
-2
0

query I rowsort
SELECT ALL + tab0.col2 + col2 FROM tab0 GROUP BY col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 32 col2 FROM tab0 GROUP BY tab0.col1
----
-32
-32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 41 col0 FROM tab0 GROUP BY tab0.col0
----
-41
-41
-41

query I rowsort
SELECT ALL 74 FROM tab2 GROUP BY tab2.col0
----
74
74
74

query I rowsort
SELECT ALL - 27 AS col0 FROM tab2 GROUP BY tab2.col2
----
-27
-27
-27

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT ( cor0.col1 ) FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL - + 6 FROM tab1 GROUP BY tab1.col0
----
-6
-6
-6

query I rowsort
SELECT ALL + - 99 AS col1 FROM tab0 GROUP BY tab0.col0
----
-99
-99
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
52
52
52

query I rowsort
SELECT ALL - cor0.col1 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3483
0
0

query I rowsort
SELECT + 46 FROM tab2 GROUP BY tab2.col2
----
46
46
46

query I rowsort
SELECT 42 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
42
42
42

query I rowsort
SELECT DISTINCT + 96 FROM tab0 GROUP BY tab0.col1
----
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 77 col0 FROM tab1 GROUP BY tab1.col0
----
77
77
77

query I rowsort
SELECT - cor0.col2 - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-158
-48
-76

query I rowsort
SELECT ALL col2 * - col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5791
SELECT ALL - tab0.col2 * - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5791
SELECT ALL - tab0.col2 * - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-5792
SELECT ALL ( + 93 ) DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-5792
SELECT ALL ( + 93 ) / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
2
3

query I rowsort
SELECT DISTINCT - 60 * - 83 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
4980

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 34 * 78 AS col2 FROM tab0 GROUP BY tab0.col1
----
2652

query I rowsort
SELECT + 90 AS col1 FROM tab1 GROUP BY tab1.col1
----
90
90
90

query I rowsort
SELECT col2 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT - 54 AS col2 FROM tab2 GROUP BY col2
----
-54

query I rowsort
SELECT + 94 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
4136
5358
564

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 0 col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - 33 FROM tab2 GROUP BY col1
----
-33

query I rowsort
SELECT DISTINCT 21 FROM tab0 GROUP BY tab0.col2
----
21

query I rowsort
SELECT DISTINCT + 21 AS col2 FROM tab1 GROUP BY tab1.col2
----
21

query I rowsort
SELECT DISTINCT + + 92 FROM tab0 GROUP BY tab0.col2
----
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5805
SELECT ALL - + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5805
SELECT ALL - + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + cor0.col1 * + 33 + + cor0.col1 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
0
2754

query I rowsort
SELECT ALL 72 * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1584
-2016
-5904

query I rowsort
SELECT 95 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
136
154
156

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT ( NULL ) > ( NULL )
----

query I rowsort
SELECT tab1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL 76 AS col2 FROM tab2 GROUP BY tab2.col1
----
76
76
76

query I rowsort
SELECT - 64 AS col0 FROM tab1 GROUP BY tab1.col1
----
-64
-64
-64

query I rowsort
SELECT 98 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT + + 66 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2970
4686
528

query I rowsort
SELECT ALL 22 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
22
22

query I rowsort
SELECT ALL ( tab2.col2 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + tab1.col2 + 49 FROM tab1 GROUP BY tab1.col2
----
120
57
94

query I rowsort
SELECT cor0.col1 * - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1944
0
0

query I rowsort
SELECT ALL + cor0.col2 FROM tab2, tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT 98 + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
16
70
76

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT - tab2.col1 * 48 FROM tab2 GROUP BY tab2.col1
----
-1968
-2832
-2928

query I rowsort
SELECT ALL + cor0.col0 * 4 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
364
368
60

query I rowsort
SELECT - - 93 AS col0 FROM tab1 GROUP BY col1
----
93
93
93

query I rowsort
SELECT 25 FROM tab1 AS cor0 GROUP BY cor0.col0
----
25
25
25

onlyif mysql # DIV for integer division: 
query I rowsort label-5827
SELECT DISTINCT + COALESCE ( 28, col1, cor0.col2 DIV + cor0.col0, cor0.col0 + + col1 * cor0.col1 ) DIV 17 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-5827
SELECT DISTINCT + COALESCE ( 28, col1, cor0.col2 / + cor0.col0, cor0.col0 + + col1 * cor0.col1 ) / 17 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT - - tab0.col2 + - 32 FROM tab0 GROUP BY tab0.col2
----
-8
47
6

query I rowsort
SELECT - 69 FROM tab1 GROUP BY col1
----
-69
-69
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 57 * + 12 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
684

query I rowsort
SELECT ALL - 58 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-58
-58
-58

onlyif mysql # DIV for integer division: 
query I rowsort label-5832
SELECT ALL - cor0.col2 DIV - cor0.col0 + 32 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
32
32
35

skipif mysql # not compatible
query I rowsort label-5832
SELECT ALL - cor0.col2 / - cor0.col0 + 32 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
32
32
35

query I rowsort
SELECT DISTINCT + 38 FROM tab0 AS cor0 GROUP BY col1
----
38

onlyif mysql # DIV for integer division: 
query I rowsort label-5834
SELECT ALL tab2.col0 DIV + tab2.col0 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-14
-90
-91

skipif mysql # not compatible
query I rowsort label-5834
SELECT ALL tab2.col0 / + tab2.col0 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-14
-90
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col1 col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
22
28
82

query I rowsort
SELECT + 97 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
97
97
97

query I rowsort
SELECT 0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

query I rowsort
SELECT - 15 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-15
-15

query I rowsort
SELECT 76 FROM tab0 GROUP BY tab0.col1
----
76
76

query I rowsort
SELECT + 30 FROM tab0, tab1 cor0 GROUP BY tab0.col2
----
30
30
30

query I rowsort
SELECT + cor0.col2 + + col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
116
158
174

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 * + tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT + + 2 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
28
45
85

query I rowsort
SELECT DISTINCT 67 FROM tab0 GROUP BY tab0.col0
----
67

query I rowsort
SELECT DISTINCT + + 80 FROM tab1 GROUP BY tab1.col0
----
80

query I rowsort
SELECT cor0.col2 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT + + 6 FROM tab1 GROUP BY tab1.col1
----
6

query I rowsort
SELECT ALL 64 FROM tab1 GROUP BY tab1.col1
----
64
64
64

query I rowsort
SELECT DISTINCT + 96 AS col0 FROM tab0 GROUP BY tab0.col1
----
96

query I rowsort
SELECT tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT DISTINCT 77 AS col0 FROM tab0 cor0 GROUP BY col1
----
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + tab1.col2 AS col1 FROM tab1 WHERE NULL IS NOT NULL GROUP BY col2 HAVING NOT ( NULL ) IS NOT NULL
----

query I rowsort
SELECT + col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - 9 FROM tab1 cor0 GROUP BY col1
----
-9
-9
-9

query I rowsort
SELECT - 3 FROM tab2 cor0 GROUP BY cor0.col1
----
-3
-3
-3

query I rowsort
SELECT ALL - 81 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-81
-81
-81

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT 76 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1824
2888
6004

query I rowsort
SELECT DISTINCT - + 2 AS col2 FROM tab0 GROUP BY tab0.col0
----
-2

query I rowsort
SELECT - col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 15 FROM tab1 AS cor0 GROUP BY col0
----
15

query I rowsort
SELECT DISTINCT - 69 FROM tab2 GROUP BY tab2.col1
----
-69

query I rowsort
SELECT - 88 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
-88
-88
-88

query I rowsort
SELECT DISTINCT + 6 AS col2 FROM tab0 GROUP BY tab0.col1
----
6

query I rowsort
SELECT DISTINCT - 93 * - col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2232
3534
7347

query I rowsort
SELECT 63 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
2583
3717
3843

query I rowsort
SELECT ALL - - tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT 6 AS col0 FROM tab1 GROUP BY tab1.col2
----
6
6
6

query I rowsort
SELECT - 56 AS col1 FROM tab0 GROUP BY tab0.col2
----
-56
-56
-56

query I rowsort
SELECT DISTINCT + tab2.col0 - col0 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT DISTINCT - 77 * tab2.col0 - + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-1170
-7098
-7176

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + 44 FROM tab0 AS cor0 GROUP BY col2
----
44
44
44

query I rowsort
SELECT ALL + + 46 AS col0 FROM tab2 GROUP BY tab2.col0
----
46
46
46

onlyif mysql # DIV for integer division: 
query I rowsort label-5878
SELECT DISTINCT + cor0.col1 DIV - 67 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-5878
SELECT DISTINCT + cor0.col1 / - 67 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
0

query I rowsort
SELECT ALL + 47 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
47
47
47

query I rowsort
SELECT - 48 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-48
-48
-48

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-5882
SELECT DISTINCT - 77 DIV cor0.col2 + 35 AS col2 FROM tab2 cor0 GROUP BY col2
----
34
35

skipif mysql # not compatible
query I rowsort label-5882
SELECT DISTINCT - 77 / cor0.col2 + 35 AS col2 FROM tab2 cor0 GROUP BY col2
----
34
35

query I rowsort
SELECT 82 FROM tab1 GROUP BY tab1.col2
----
82
82
82

onlyif mysql # DIV for integer division: 
query I rowsort label-5884
SELECT + 88 DIV + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5884
SELECT + 88 / + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT - + 21 * + tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
-1218
-1659
-1827

query I rowsort
SELECT 34 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
34
34
34

query I rowsort
SELECT ALL + + tab1.col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0 HAVING NULL < ( NULL )
----

query I rowsort
SELECT ALL cor0.col0 + - col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING col0 IS NULL
----

query I rowsort
SELECT ALL col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT 31 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 89 col1 FROM tab1 GROUP BY tab1.col2
----
89
89
89

query I rowsort
SELECT cor1.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 52 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
52

query I rowsort
SELECT ALL + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL - 63 + col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-63
-63
18

query I rowsort
SELECT ALL col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5898
SELECT ALL + + CAST( NULL AS SIGNED ) + 48 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5898
SELECT ALL + + CAST ( NULL AS INTEGER ) + 48 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-5899
SELECT - 21 + + 56 DIV + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-19
-19
-21

skipif mysql # not compatible
query I rowsort label-5899
SELECT - 21 + + 56 / + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-19
-19
-21

query I rowsort
SELECT 66 + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
148
88
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - 81 AS col0 FROM tab1 GROUP BY tab1.col2
----
-81
-81
-81

query I rowsort
SELECT + 75 + 88 FROM tab1 AS cor0 GROUP BY cor0.col0
----
163
163
163

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT - - 95 FROM tab2 GROUP BY tab2.col2
----
95
95
95

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 41 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
41
41
41

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5908
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5908
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 23 AS col0 FROM tab2 GROUP BY tab2.col2
----
-23

query I rowsort
SELECT 65 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
65
65
65

query I rowsort
SELECT DISTINCT - 13 * 95 FROM tab0 GROUP BY tab0.col0
----
-1235

query I rowsort
SELECT + + tab2.col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + + tab0.col2 * tab0.col2 FROM tab0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT 20 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
20
20
20

onlyif mysql # DIV for integer division: 
query I rowsort label-5915
SELECT - tab0.col0 DIV 87 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5915
SELECT - tab0.col0 / 87 FROM tab0 GROUP BY tab0.col0
----
0
0
0

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 ALL - 56 - - 62 col1 FROM tab1 GROUP BY tab1.col0
----
6
6
6

query I rowsort
SELECT ALL 72 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
72
72
72

query I rowsort
SELECT DISTINCT + 57 FROM tab0 GROUP BY tab0.col0
----
57

query I rowsort
SELECT - 55 AS col1 FROM tab2 GROUP BY tab2.col0
----
-55
-55
-55

query I rowsort
SELECT 69 AS col2 FROM tab1 GROUP BY tab1.col0
----
69
69
69

query I rowsort
SELECT DISTINCT col1 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - - tab1.col2 - + tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
0

query I rowsort
SELECT 5 FROM tab2 GROUP BY tab2.col2
----
5
5
5

query I rowsort
SELECT ALL 81 * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1215
-7371
-7452

query I rowsort
SELECT - - tab1.col1 * ( - col1 * - tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
185193
216
85184

query I rowsort
SELECT DISTINCT - + col2 * 92 AS col0 FROM tab2 GROUP BY tab2.col2
----
-5336
-7268
-8004

query I rowsort
SELECT + cor0.col0 * - 75 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1125
-6825
-6900

query I rowsort
SELECT ALL 26 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2106

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 54 col0 FROM tab0 GROUP BY col1
----
-54
-54

query I rowsort
SELECT + cor0.col2 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1944
0
0

query I rowsort
SELECT DISTINCT tab0.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 + 35 col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
35
35
35

query I rowsort
SELECT ALL cor0.col1 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT - 22 + col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
19
37
39

query I rowsort
SELECT DISTINCT - 83 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 87 - tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
0
29
8

query I rowsort
SELECT 49 AS col2 FROM tab0 GROUP BY tab0.col1
----
49
49

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
1305
5336
7189

query I rowsort
SELECT - ( + cor0.col1 ) * - 74 FROM tab0 cor0 GROUP BY cor0.col1
----
0
5994

query I rowsort
SELECT + col0 * tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 7 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT 20 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 60 col2 FROM tab2 GROUP BY col0
----
-60
-60
-60

query I rowsort
SELECT + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - tab1.col0 FROM tab1 GROUP BY col0 HAVING NOT NULL IS NOT NULL
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 col0 FROM tab0 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT 57 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
57
57
57

query I rowsort
SELECT ALL + 73 FROM tab2 GROUP BY tab2.col1
----
73
73
73

query I rowsort
SELECT DISTINCT - 34 * 7 FROM tab2 GROUP BY tab2.col1
----
-238

query I rowsort
SELECT 89 FROM tab0 GROUP BY tab0.col2
----
89
89
89

query I rowsort
SELECT - 59 FROM tab0 GROUP BY tab0.col1
----
-59
-59

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT 40 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col0
----
40
40
40

query I rowsort
SELECT 98 FROM tab2 AS cor0 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT ALL - 61 AS col1 FROM tab1 GROUP BY col0
----
-61
-61
-61

query I rowsort
SELECT DISTINCT - 37 * + 56 FROM tab2 GROUP BY tab2.col0
----
-2072

query I rowsort
SELECT ALL - col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 34 col1 FROM tab1 GROUP BY tab1.col1
----
34
34
34

query I rowsort
SELECT + 64 AS col2 FROM tab0 GROUP BY tab0.col1
----
64
64

query I rowsort
SELECT ALL ( 37 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT + 51 AS col0 FROM tab2 GROUP BY tab2.col2
----
51
51
51

query I rowsort
SELECT DISTINCT + 62 AS col2 FROM tab0 GROUP BY tab0.col2
----
62

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
44
57
6

query I rowsort
SELECT - 29 * + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1247
-2407
-754

query I rowsort
SELECT + 65 FROM tab2 GROUP BY tab2.col1
----
65
65
65

query I rowsort
SELECT - 60 AS col0 FROM tab1 GROUP BY tab1.col0
----
-60
-60
-60

query I rowsort
SELECT DISTINCT + tab1.col0 + + 98 FROM tab1 GROUP BY tab1.col0
----
120
126
180

query I rowsort
SELECT 35 FROM tab1 AS cor0 GROUP BY cor0.col0
----
35
35
35

query I rowsort
SELECT ALL cor0.col1 + - 0 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT tab1.col2 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT tab1.col1 * col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 * - 14 FROM tab2 cor0 GROUP BY cor0.col1
----
-533
-767
-793

query I rowsort
SELECT + col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT - - tab1.col0 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2 HAVING NULL > NULL
----

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT - + 16 FROM tab2 GROUP BY tab2.col1
----
-16
-16
-16

query I rowsort
SELECT - col0 AS col2 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT cor0.col0 * 6 + 79 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
211
247
571

query I rowsort
SELECT ( - 17 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
-17
-17
-17

query I rowsort
SELECT + 66 AS col0 FROM tab1 GROUP BY tab1.col1
----
66
66
66

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 89 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
89
89
89

query I rowsort
SELECT ALL - - 16 AS col2 FROM tab2 GROUP BY tab2.col2
----
16
16
16

query I rowsort
SELECT 76 AS col1 FROM tab1 GROUP BY tab1.col2
----
76
76
76

query I rowsort
SELECT - 5 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-5
-5
-5

query I rowsort
SELECT ALL - 24 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-24
-24
-24

query I rowsort
SELECT ALL - - col0 * - 72 + col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1846
-3053
-5893

query I rowsort
SELECT ALL + 64 FROM tab2 GROUP BY tab2.col1
----
64
64
64

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5992
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-5992
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
NULL

query I rowsort
SELECT ALL 92 AS col0 FROM tab2 GROUP BY tab2.col1
----
92
92
92

query I rowsort
SELECT DISTINCT + - 3 FROM tab0 GROUP BY tab0.col0
----
-3

query I rowsort
SELECT DISTINCT + 25 * 56 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
58
79
87

query I rowsort
SELECT + - 35 + - 29 FROM tab0 GROUP BY tab0.col0
----
-64
-64
-64

query I rowsort
SELECT - + 95 AS col1 FROM tab1 GROUP BY tab1.col0
----
-95
-95
-95

query I rowsort
SELECT - cor0.col0 * 63 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-1386
-1764
-5166

query I rowsort
SELECT col1 - NULLIF ( + 90, cor0.col1 ) * + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-7209
0
0

query I rowsort
SELECT - cor0.col1 * - 2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT + cor0.col2 * - cor0.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT + 88 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
88

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6007
SELECT DISTINCT + + tab1.col2 + - CAST( tab1.col2 AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
0

skipif mysql # not compatible
query I rowsort label-6007
SELECT DISTINCT + + tab1.col2 + - CAST ( tab1.col2 AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col1 * 48 col1 FROM tab2 GROUP BY tab2.col1
----
-1968
-2832
-2928

query I rowsort
SELECT DISTINCT - tab1.col1 * + col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6011
SELECT cor0.col0 * - CAST( NULL AS DECIMAL ) AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6011
SELECT cor0.col0 * - CAST ( NULL AS REAL ) AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 68 FROM tab2 GROUP BY tab2.col1
----
-68

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT ALL + - 30 FROM tab0 GROUP BY tab0.col2
----
-30
-30
-30

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 84, - tab2.col0 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
84
84
84

query I rowsort
SELECT - ( - 71 ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
71
71
71

query I rowsort
SELECT ALL tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL - 3 * + 90 FROM tab0 GROUP BY tab0.col2
----
-270
-270
-270

query I rowsort
SELECT ALL - 77 FROM tab2 GROUP BY tab2.col2
----
-77
-77
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * - 26 col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-2054
-624
-988

query I rowsort
SELECT ALL - col0 * 21 FROM tab1 GROUP BY tab1.col0
----
-1722
-462
-588

query I rowsort
SELECT cor0.col1 * 82 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
6642

query I rowsort
SELECT DISTINCT + - tab0.col0 * + tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1806
-650
-6806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col2 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
45
71
8

query I rowsort
SELECT + 98 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT - 99 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
-99
-99
-99

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
26
43
83

query I rowsort
SELECT ALL + 27 FROM tab0 GROUP BY tab0.col1
----
27
27

onlyif mysql # DIV for integer division: 
query I rowsort label-6030
SELECT ALL + tab2.col1 DIV - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6030
SELECT ALL + tab2.col1 / - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6031
SELECT tab2.col2 / - CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6031
SELECT tab2.col2 / - CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 49 AS col0 FROM tab0 GROUP BY col1
----
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col1 col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT tab1.col0 - - 43 AS col2 FROM tab1 GROUP BY tab1.col0
----
125
65
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 45 col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT cor0.col2 + 72 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
117
143
80

query I rowsort
SELECT DISTINCT - tab2.col0 * + ( - 42 ) FROM tab2 GROUP BY tab2.col0
----
3822
3864
630

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1444
576
6241

query I rowsort
SELECT DISTINCT 31 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
31

onlyif mysql # DIV for integer division: 
query I rowsort label-6040
SELECT - 24 + 23 DIV tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
-24
-24
-24

skipif mysql # not compatible
query I rowsort label-6040
SELECT - 24 + 23 / tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
-24
-24
-24

query I rowsort
SELECT ALL 88 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
88
88
88

query I rowsort
SELECT cor0.col1 + 13 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
13
94

query I rowsort
SELECT + + 74 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-13
-5
16

onlyif mysql # DIV for integer division: 
query I rowsort label-6044
SELECT col0 DIV col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6044
SELECT col0 / col0 AS 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 - 91 * cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2184
-3458
-7189

query I rowsort
SELECT ALL 61 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
61
61
61

query I rowsort
SELECT ALL col1 + - cor0.col1 * - 5 FROM tab2 AS cor0 GROUP BY cor0.col1
----
246
354
366

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + 46 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
104
125
133

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT ALL tab1.col0 + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 56 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-56
-56
-56

query I rowsort
SELECT ALL + - 58 AS col0 FROM tab1 GROUP BY tab1.col1
----
-58
-58
-58

query I rowsort
SELECT tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2 HAVING ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 WHERE NULL > ( NULL ) AND NULL NOT IN ( + cor0.col2 + - cor0.col0 ) OR NOT NULL IS NOT NULL GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + 38 FROM tab2 GROUP BY col2
----
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 99 col0 FROM tab0 GROUP BY col2
----
-99
-99
-99

query I rowsort
SELECT - 22 AS col2 FROM tab0 GROUP BY tab0.col0
----
-22
-22
-22

query I rowsort
SELECT - 71 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1846
-3053
-5893

query I rowsort
SELECT + 15 FROM tab0 cor0 GROUP BY cor0.col1
----
15
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 19 col0 FROM tab0 GROUP BY tab0.col0
----
19

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT + 9 * - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-396
-513
-54

query I rowsort
SELECT - 35 AS col1 FROM tab2 GROUP BY tab2.col1
----
-35
-35
-35

query I rowsort
SELECT 36 * + tab2.col1 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1517
2183
2257

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT ALL cor0.col0 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1305
5336
7189

query I rowsort
SELECT + 54 FROM tab0 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT ALL + ( + col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT 78 FROM tab0 AS cor0 GROUP BY col2
----
78
78
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 7 FROM tab2 AS cor0 GROUP BY cor0.col2
----
7

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
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT 20 * col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1722
462
588

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT - 13 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
-13
-13
-13

query I rowsort
SELECT NULLIF ( + 16, tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
16
16
16

query I rowsort
SELECT ALL + cor0.col0 + + cor0.col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT - cor0.col2 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT - cor0.col1 + cor0.col2 * + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
2337
4602
5246

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6082
SELECT ALL + + CAST( NULL AS SIGNED ) FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6082
SELECT ALL + + CAST ( NULL AS INTEGER ) FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT COALESCE ( cor0.col1, cor0.col1 ) * 85 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3740
4845
510

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL + - tab2.col0 - 27 AS col2 FROM tab2 GROUP BY tab2.col0
----
-118
-119
-42

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
153
30
73

query I rowsort
SELECT DISTINCT + tab0.col1 * - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT cor0.col0 * 77 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, col0
----
1700
2213
6358

query I rowsort
SELECT DISTINCT - + ( tab2.col2 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

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 + cor1.col1 col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1, cor1.col2
----
0
0
81

query I rowsort
SELECT ( tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + tab2.col0 + col0 * - 3 AS col2 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT 70 FROM tab0 AS cor0 GROUP BY col2
----
70
70
70

query I rowsort
SELECT DISTINCT 75 FROM tab1 cor0 GROUP BY cor0.col2
----
75

query I rowsort
SELECT - tab2.col1 * + 18 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1062
-1098
-738

query I rowsort
SELECT DISTINCT - 39 AS col0 FROM tab2 GROUP BY tab2.col0
----
-39

query I rowsort
SELECT - tab1.col1 * - 51 AS col1 FROM tab1 GROUP BY col1
----
2244
2907
306

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6101
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6101
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 66 + 80 FROM tab0 GROUP BY col0
----
146
146
146

query I rowsort
SELECT + 65 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1, cor1.col1
----
65
65
65

query I rowsort
SELECT ALL + + tab1.col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 52 FROM tab0 AS cor0 GROUP BY cor0.col1
----
52
52

query I rowsort
SELECT - col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1640
3422
3660

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT NULLIF ( + cor0.col0, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-6110
SELECT DISTINCT cor0.col1 DIV - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-6110
SELECT DISTINCT cor0.col1 / - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-1

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 ALL + 22 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
22
22
22

query I rowsort
SELECT - 25 + 12 AS col1 FROM tab2 GROUP BY tab2.col2
----
-13
-13
-13

query I rowsort
SELECT cor0.col2 + 71 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
129
150
158

query I rowsort
SELECT + 39 FROM tab0 AS cor0 GROUP BY cor0.col2
----
39
39
39

onlyif mysql # DIV for integer division: 
query I rowsort label-6116
SELECT tab0.col0 + tab0.col0 DIV 58 AS col2 FROM tab0 GROUP BY col0
----
26
43
84

skipif mysql # not compatible
query I rowsort label-6116
SELECT tab0.col0 + tab0.col0 / 58 AS col2 FROM tab0 GROUP BY col0
----
26
43
84

query I rowsort
SELECT 58 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
58
58
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab1.col0 + + 0 col2 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + 12 + + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
103
104
27

query I rowsort
SELECT - 28 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1232
-1596
-168

query I rowsort
SELECT 19 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
19
19
19

query I rowsort
SELECT tab1.col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 90 col1 FROM tab1 GROUP BY tab1.col1
----
-90

query I rowsort
SELECT + ( 90 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
90
90

query I rowsort
SELECT 32 AS col0 FROM tab1 GROUP BY tab1.col1
----
32
32
32

query I rowsort
SELECT + + 16 FROM tab1 GROUP BY tab1.col2
----
16
16
16

onlyif mysql # DIV for integer division: 
query I rowsort label-6127
SELECT ALL 68 DIV + col0 FROM tab1 GROUP BY col0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-6127
SELECT ALL 68 / + col0 FROM tab1 GROUP BY col0
----
0
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT col0 * cor0.col2 + + 30 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
1290
206
5852

query I rowsort
SELECT + cor0.col1 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
162

query I rowsort
SELECT 45 FROM tab2 AS cor0 GROUP BY cor0.col1
----
45
45
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - CASE cor0.col2 WHEN 55 * cor0.col2 + + cor0.col2 THEN - col2 END col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 8 * - cor0.col1 + - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
567

query I rowsort
SELECT DISTINCT + 43 AS col2 FROM tab1 GROUP BY tab1.col2
----
43

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 + + 88 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1532
6329
664

query I rowsort
SELECT 4 * - 45 FROM tab0 cor0 GROUP BY cor0.col2
----
-180
-180
-180

query I rowsort
SELECT + + 77 AS col0 FROM tab1 GROUP BY tab1.col2
----
77
77
77

query I rowsort
SELECT cor0.col0 * + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

onlyif mysql # DIV for integer division: 
query I rowsort label-6139
SELECT ALL cor0.col2 * + cor0.col2 + - cor0.col1 DIV + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
3363
6240
7568

skipif mysql # not compatible
query I rowsort label-6139
SELECT ALL cor0.col2 * + cor0.col2 + - cor0.col1 / + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
3363
6240
7568

query I rowsort
SELECT + 30 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-1230
-1770
-1830

query I rowsort
SELECT ALL - 48 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-48
-48

query I rowsort
SELECT 64 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT ALL - 95 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-95
-95

query I rowsort
SELECT ALL 64 + + col1 FROM tab1 AS cor0 GROUP BY col1, col0
----
108
121
70

query I rowsort
SELECT 46 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
129
72
89

query I rowsort
SELECT + 66 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
66
66
66

query I rowsort
SELECT DISTINCT + - col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-6148
SELECT DISTINCT cor0.col2 DIV 48 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
80

skipif mysql # not compatible
query I rowsort label-6148
SELECT DISTINCT cor0.col2 / 48 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
80

query I rowsort
SELECT - ( + 95 ) + 27 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-68
-68
-68

query I rowsort
SELECT 23 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT DISTINCT - col2 + - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-142
-16
-90

query I rowsort
SELECT ALL + tab1.col0 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT DISTINCT 84 AS col0 FROM tab0 GROUP BY tab0.col1
----
84

query I rowsort
SELECT ALL + + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL + 90 AS col2 FROM tab2 GROUP BY tab2.col1
----
90
90
90

query I rowsort
SELECT - tab0.col1 + col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT 37 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT DISTINCT 9 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
9

query I rowsort
SELECT DISTINCT - - col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6160
SELECT ALL + + CAST( + 56 AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
56
56
56

skipif mysql # not compatible
query I rowsort label-6160
SELECT ALL + + CAST ( + 56 AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
56
56
56

query I rowsort
SELECT DISTINCT - + 50 * 69 - - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-3368
-3422
-3428

query I rowsort
SELECT ALL 72 + 97 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, col1
----
169
169
169

query I rowsort
SELECT + tab2.col1 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT + 28 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2, cor1.col0
----
28

query I rowsort
SELECT 81 * + 75 AS col2 FROM tab1 GROUP BY tab1.col1
----
6075
6075
6075

query I rowsort
SELECT DISTINCT 93 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
93

query I rowsort
SELECT - 54 FROM tab2 GROUP BY tab2.col2
----
-54
-54
-54

query I rowsort
SELECT ALL + - tab1.col1 - + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

query I rowsort
SELECT + cor0.col0 + + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
182
184
30

query I rowsort
SELECT + 97 FROM tab0 GROUP BY tab0.col2
----
97
97
97

query I rowsort
SELECT ALL + 10 AS col2 FROM tab1 GROUP BY tab1.col1
----
10
10
10

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6172
SELECT ALL cor0.col2 + cor0.col1 * - COALESCE ( col1, cor0.col1, CAST( NULL AS SIGNED ) ) col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-1865
-28
-3204

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6172
SELECT ALL cor0.col2 + cor0.col1 * - COALESCE ( col1, cor0.col1, CAST ( NULL AS INTEGER ) ) col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-1865
-28
-3204

onlyif mysql # DIV for integer division: 
query I rowsort label-6173
SELECT 21 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-6173
SELECT 21 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
2

query I rowsort
SELECT ALL - 98 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
-98
-98
-98

query I rowsort
SELECT ALL tab1.col0 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6177
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-6177
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL

query I rowsort
SELECT DISTINCT - + 17 FROM tab0 GROUP BY tab0.col0
----
-17

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - - COALESCE ( + 38, - tab1.col2 ) FROM tab1 GROUP BY tab1.col0
----
38

query I rowsort
SELECT NULLIF ( cor0.col1, cor0.col1 ) * 13 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT + 99 FROM tab1 AS cor0 GROUP BY cor0.col1
----
99
99
99

query I rowsort
SELECT 32 FROM tab1 cor0 GROUP BY cor0.col1
----
32
32
32

query I rowsort
SELECT ALL cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, col0
----
58
79
87

query I rowsort
SELECT tab0.col0 * - 84 AS col0 FROM tab0 GROUP BY col0
----
-2184
-3612
-6972

query I rowsort
SELECT ALL + 11 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col1
----
11
11
11

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT ALL - col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + + ( tab0.col1 ) + tab0.col1 FROM tab0 GROUP BY col1
----
0
162

query I rowsort
SELECT ALL tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - 70 + 54 AS col0 FROM tab1 GROUP BY col2
----
-16

query I rowsort
SELECT + - 21 + + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
22
5
62

query I rowsort
SELECT DISTINCT + 41 AS col0 FROM tab0 GROUP BY tab0.col0
----
41

query I rowsort
SELECT DISTINCT + + 98 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
2548
4214
8134

query I rowsort
SELECT ALL cor0.col0 + + ( 80 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
102
108
162

query I rowsort
SELECT + tab2.col2 - + 96 FROM tab2 GROUP BY tab2.col2
----
-17
-38
-9

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab1 cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + cor0.col0 + + 48 FROM tab2 AS cor0 GROUP BY cor0.col0
----
139
140
63

query I rowsort
SELECT ALL col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - 72 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-72
-72

query I rowsort
SELECT tab0.col1 * + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT + col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-484
-6724
-784

onlyif mysql # DIV for integer division: 
query I rowsort label-6206
SELECT - cor0.col0 DIV - 87 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6206
SELECT - cor0.col0 / - 87 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + - 6 FROM tab1 GROUP BY tab1.col1
----
-6

query I rowsort
SELECT ALL + 92 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT DISTINCT + + 51 * + 37 AS col1 FROM tab1 GROUP BY col1
----
1887

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 79 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
79
79
79

query I rowsort
SELECT + - 21 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-1701
0

query I rowsort
SELECT DISTINCT - - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6213
SELECT ALL + CAST( + 1 AS SIGNED ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6213
SELECT ALL + CAST ( + 1 AS INTEGER ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT cor0.col1 * - ( + cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

onlyif mysql # DIV for integer division: 
query I rowsort label-6215
SELECT ALL 80 DIV - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-13

skipif mysql # not compatible
query I rowsort label-6215
SELECT ALL 80 / - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-13

query I rowsort
SELECT ALL + col2 * + 26 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1170
1846
208

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - 64 AS col0 FROM tab0 GROUP BY tab0.col1
----
-64
-64

query I rowsort
SELECT ( - cor0.col1 ) * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL 19 - + cor0.col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
-22
-40
-42

query I rowsort
SELECT - 34 FROM tab1 cor0 GROUP BY cor0.col2
----
-34
-34
-34

query I rowsort
SELECT ALL - 27 FROM tab0 AS cor0 GROUP BY col0
----
-27
-27
-27

query I rowsort
SELECT ALL - cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-81
0

query I rowsort
SELECT 77 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT - 25 + - cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-116
-117
-40

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT 99 FROM tab2 GROUP BY tab2.col2
----
99
99
99

query I rowsort
SELECT DISTINCT + 14 AS col2 FROM tab2 GROUP BY tab2.col2
----
14

query I rowsort
SELECT - 14 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-14
-14
-14

query I rowsort
SELECT - 6 * - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
132
168
492

query I rowsort
SELECT cor0.col1 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
24
38
79

query I rowsort
SELECT ALL + 7 + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
48
66
68

query I rowsort
SELECT - 68 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-68
-68
-68

query I rowsort
SELECT ALL tab1.col1 + - ( tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL 97 FROM tab2 AS cor0 GROUP BY cor0.col2
----
97
97
97

query I rowsort
SELECT ALL + 58 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
58
58
58

query I rowsort
SELECT ALL 7 * + 87 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
609
609
609

query I rowsort
SELECT - cor0.col0 + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-182
-184
-30

query I rowsort
SELECT ALL tab2.col2 * - tab2.col2 - 98 AS col1 FROM tab2 GROUP BY tab2.col2
----
-3462
-6339
-7667

onlyif mysql # DIV for integer division: 
query I rowsort label-6243
SELECT + + tab0.col0 DIV + tab0.col0 - tab0.col0 DIV 75 FROM tab0 GROUP BY tab0.col0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-6243
SELECT + + tab0.col0 / + tab0.col0 - tab0.col0 / 75 FROM tab0 GROUP BY tab0.col0
----
0
1
1

query I rowsort
SELECT tab2.col1 FROM tab2 WHERE NOT NULL IS NULL GROUP BY tab2.col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col2 col0 FROM tab1 WHERE NOT NULL IS NOT NULL GROUP BY col2
----
45
71
8

query I rowsort
SELECT 28 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT DISTINCT - 47 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-47

query I rowsort
SELECT - - 68 - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-13
68

query I rowsort
SELECT DISTINCT + + tab1.col0 + + 77 * 20 AS col0 FROM tab1 GROUP BY tab1.col0
----
1562
1568
1622

query I rowsort
SELECT - NULLIF ( tab2.col0, 58 + tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT 43 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-16
-18
2

query I rowsort
SELECT - ( 26 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
-26
-26
-26

query I rowsort
SELECT DISTINCT + 44 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
44

query I rowsort
SELECT DISTINCT - 50 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-50

query I rowsort
SELECT ALL + 25 FROM tab2 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT DISTINCT + + tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT - tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT + + 95 * - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-4275
-6745
-760

query I rowsort
SELECT DISTINCT - 54 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-54

query I rowsort
SELECT - ( 81 ) FROM tab1 GROUP BY tab1.col2
----
-81
-81
-81

query I rowsort
SELECT 57 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2508
3249
342

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 ALL - 23 AS col2 FROM tab0 GROUP BY tab0.col1
----
-23
-23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6264
SELECT ALL - CAST( - 42 AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
42
42
42

skipif mysql # not compatible
query I rowsort label-6264
SELECT ALL - CAST ( - 42 AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
42
42
42

query I rowsort
SELECT ALL + 15 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
15
15

query I rowsort
SELECT ALL + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
0

query I rowsort
SELECT ALL - tab0.col1 + + 18 FROM tab0 GROUP BY tab0.col1
----
-63
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col0 * 86 col2 FROM tab1 GROUP BY tab1.col0
----
1892
2408
7052

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6270
SELECT ALL + CAST( + tab2.col2 AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

skipif mysql # not compatible
query I rowsort label-6270
SELECT ALL + CAST ( + tab2.col2 AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-6271
SELECT ALL + tab1.col2 DIV - 81 FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6271
SELECT ALL + tab1.col2 / - 81 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL 70 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
70
70
70

query I rowsort
SELECT + - 91 FROM tab2 GROUP BY col2
----
-91
-91
-91

query I rowsort
SELECT ALL cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 cor0 GROUP BY col2 HAVING NOT NULL NOT IN ( + cor0.col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab0 AS cor0 WHERE NOT NULL > ( NULL ) GROUP BY col0
----

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + - tab0.col0 * tab0.col0 + col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1806
-650
-6806

onlyif mysql # DIV for integer division: 
query I rowsort label-6279
SELECT tab2.col0 - + tab2.col0 DIV tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
14
90
91

skipif mysql # not compatible
query I rowsort label-6279
SELECT tab2.col0 - + tab2.col0 / tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
14
90
91

query I rowsort
SELECT - + 82 AS col1 FROM tab1 GROUP BY tab1.col2
----
-82
-82
-82

query I rowsort
SELECT DISTINCT + 65 FROM tab2 AS cor0 GROUP BY cor0.col2
----
65

query I rowsort
SELECT - - tab1.col2 * - 23 FROM tab1 GROUP BY tab1.col2
----
-1035
-1633
-184

query I rowsort
SELECT DISTINCT + 43 FROM tab1 GROUP BY tab1.col2
----
43

query I rowsort
SELECT DISTINCT - 83 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
-83

query I rowsort
SELECT ALL - 36 * - 92 + tab2.col0 FROM tab2 GROUP BY col0
----
3327
3403
3404

query I rowsort
SELECT + - 43 AS col1 FROM tab0 GROUP BY tab0.col0
----
-43
-43
-43

query I rowsort
SELECT DISTINCT + 11 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
11

query I rowsort
SELECT ALL + 66 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
66
66
66

onlyif mysql # DIV for integer division: 
query I rowsort label-6289
SELECT ALL - cor0.col1 DIV ( - 24 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1
2
2

skipif mysql # not compatible
query I rowsort label-6289
SELECT ALL - cor0.col1 / ( - 24 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1
2
2

query I rowsort
SELECT - + tab2.col1 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT - + ( + 15 ) FROM tab2 GROUP BY tab2.col1
----
-15
-15
-15

query I rowsort
SELECT - 11 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-11
-11
-11

query I rowsort
SELECT DISTINCT 61 FROM tab0 AS cor0 GROUP BY cor0.col2
----
61

query I rowsort
SELECT DISTINCT + - 52 * + ( tab2.col0 ) FROM tab2 GROUP BY col0
----
-4732
-4784
-780

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col0 * 60 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1560
2580
4980

onlyif mysql # DIV for integer division: 
query I rowsort label-6297
SELECT DISTINCT + tab1.col0 DIV 90 AS col0 FROM tab1 GROUP BY tab1.col0
----
0

skipif mysql # not compatible
query I rowsort label-6297
SELECT DISTINCT + tab1.col0 / 90 AS col0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT tab0.col0 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL + 78 FROM tab1 GROUP BY tab1.col0
----
78
78
78

query I rowsort
SELECT DISTINCT 68 FROM tab0 GROUP BY tab0.col0
----
68

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT + 59 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
59
59
59

query I rowsort
SELECT col0 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT 11 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
495
781
88

query I rowsort
SELECT 47 * cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
2726
3713
4089

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL - 3 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3
-3
-3

query I rowsort
SELECT - + 13 FROM tab0 GROUP BY tab0.col0
----
-13
-13
-13

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL + 29 FROM tab1 GROUP BY tab1.col1
----
29
29
29

query I rowsort
SELECT ALL - + 89 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-2314
-3827
-7387

query I rowsort
SELECT ALL - ( + 13 ) FROM tab2 cor0 GROUP BY cor0.col0
----
-13
-13
-13

query I rowsort
SELECT ALL 83 AS col2 FROM tab0 GROUP BY tab0.col0
----
83
83
83

query I rowsort
SELECT 13 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
13
13
13

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1944
0

query I rowsort
SELECT DISTINCT - col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-225
-8281
-8464

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
114
12
88

query I rowsort
SELECT ALL + 19 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT - ( 79 ) FROM tab2 GROUP BY tab2.col2
----
-79
-79
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-6322
SELECT DISTINCT tab0.col0 DIV tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6322
SELECT DISTINCT tab0.col0 / tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
1

query I rowsort
SELECT tab2.col2 FROM tab2 WHERE - tab2.col1 IS NOT NULL GROUP BY tab2.col2 HAVING NOT NULL NOT IN ( + col2 * tab2.col2 )
----

query I rowsort
SELECT DISTINCT - col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + - tab2.col0 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT 80 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
80

query I rowsort
SELECT - tab1.col2 * tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL + 50 FROM tab2 GROUP BY col0
----
50
50
50

query I rowsort
SELECT COALESCE ( cor0.col2, 77 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-6330
SELECT ALL - 91 DIV col0 FROM tab1 GROUP BY tab1.col0
----
-1
-3
-4

skipif mysql # not compatible
query I rowsort label-6330
SELECT ALL - 91 / col0 FROM tab1 GROUP BY tab1.col0
----
-1
-3
-4

query I rowsort
SELECT 78 FROM tab2 cor0 GROUP BY col1
----
78
78
78

query I rowsort
SELECT 18 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
18
18
18

query I rowsort
SELECT ALL + col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT + 28 FROM tab1 GROUP BY tab1.col2
----
28
28
28

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
0
0
81

query I rowsort
SELECT - ( 0 ) FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 78 col2 FROM tab1 GROUP BY tab1.col2
----
78
78
78

query I rowsort
SELECT DISTINCT + 25 AS col1 FROM tab0 GROUP BY tab0.col1
----
25

query I rowsort
SELECT + 86 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
3526
5074
5246

query I rowsort
SELECT tab2.col1 + 50 FROM tab2 GROUP BY tab2.col1
----
109
111
91

query I rowsort
SELECT ALL 28 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
28
28
28

query I rowsort
SELECT + - 83 FROM tab1 GROUP BY tab1.col1
----
-83
-83
-83

query I rowsort
SELECT 27 FROM tab2 GROUP BY col0
----
27
27
27

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + 12 FROM tab0 cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT DISTINCT + 32 FROM tab0 AS cor0 GROUP BY cor0.col2
----
32

query I rowsort
SELECT 13 FROM tab1 GROUP BY tab1.col0
----
13
13
13

query I rowsort
SELECT ALL + 57 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
57
57
57

query I rowsort
SELECT + 45 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
45
45

query I rowsort
SELECT DISTINCT + 22 * 13 FROM tab0 GROUP BY tab0.col0
----
286

query I rowsort
SELECT - 62 FROM tab0 AS cor0 GROUP BY col2
----
-62
-62
-62

query I rowsort
SELECT + - 55 FROM tab0 GROUP BY tab0.col2
----
-55
-55
-55

query I rowsort
SELECT - 57 FROM tab1 GROUP BY tab1.col2
----
-57
-57
-57

query I rowsort
SELECT - + 25 FROM tab2 GROUP BY tab2.col2
----
-25
-25
-25

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab0 cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT 17 FROM tab1 AS cor0 GROUP BY col0
----
17

query I rowsort
SELECT - + 65 FROM tab2 GROUP BY col2
----
-65
-65
-65

query I rowsort
SELECT DISTINCT 13 FROM tab0 GROUP BY tab0.col0
----
13

query I rowsort
SELECT - 45 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-45
-45
-45

query I rowsort
SELECT + + tab1.col2 - - col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

onlyif mysql # DIV for integer division: 
query I rowsort label-6362
SELECT DISTINCT cor0.col1 DIV 18 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
2
3

skipif mysql # not compatible
query I rowsort label-6362
SELECT DISTINCT cor0.col1 / 18 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
2
3

query I rowsort
SELECT - 92 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-92
-92
-92

query I rowsort
SELECT DISTINCT 5 FROM tab0 GROUP BY tab0.col0
----
5

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6365
SELECT ALL + CAST( NULL AS DECIMAL ) + + 78 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6365
SELECT ALL + CAST ( NULL AS REAL ) + + 78 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT ALL - - COALESCE ( tab2.col1, tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 col0 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT cor0.col0 * - 28 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-1204
-2324
-728

query I rowsort
SELECT - cor0.col0 * 73 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1606
-2044
-5986

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col2 + + 16 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-22
-63
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-6375
SELECT 76 DIV cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col0
----
0
0
5

skipif mysql # not compatible
query I rowsort label-6375
SELECT 76 / cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col0
----
0
0
5

query I rowsort
SELECT DISTINCT 44 FROM tab1 GROUP BY tab1.col0
----
44

query I rowsort
SELECT ALL - cor0.col0 + 15 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-11
-28
-68

query I rowsort
SELECT - cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col0
----
-81
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6379
SELECT + col0 DIV - cor0.col0 + 39 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1013
1676
3236

skipif mysql # not compatible
query I rowsort label-6379
SELECT + col0 / - cor0.col0 + 39 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1013
1676
3236

query I rowsort
SELECT DISTINCT - cor0.col1 + 76 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
15
17
35

query I rowsort
SELECT + 59 FROM tab1 AS cor0 GROUP BY cor0.col2
----
59
59
59

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

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 + 98 FROM tab0 GROUP BY col2
----
98
98
98

query I rowsort
SELECT tab2.col2 + - 70 AS col0 FROM tab2 GROUP BY tab2.col2
----
-12
17
9

query I rowsort
SELECT ALL - 40 - - 20 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-20
-20
-20

query I rowsort
SELECT 89 AS col2 FROM tab0 GROUP BY col0
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab0.col2 * + tab0.col2 + 84 col1 FROM tab0 GROUP BY tab0.col2
----
-1360
-492
-6157

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 + 31 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
1967
3280
67

onlyif mysql # DIV for integer division: 
query I rowsort label-6390
SELECT DISTINCT - col1 DIV - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-6390
SELECT DISTINCT - col1 / - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-6391
SELECT ALL + cor0.col2 + col2 DIV cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
46
72
9

skipif mysql # not compatible
query I rowsort label-6391
SELECT ALL + cor0.col2 + col2 / cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
46
72
9

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col2 - + cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
0

query I rowsort
SELECT - - 25 AS col1 FROM tab2 GROUP BY tab2.col1
----
25
25
25

query I rowsort
SELECT + ( 24 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
24
24
24

query I rowsort
SELECT 30 AS col1 FROM tab0 GROUP BY tab0.col2
----
30
30
30

query I rowsort
SELECT ALL + - tab2.col0 * 27 AS col0 FROM tab2 GROUP BY tab2.col0
----
-2457
-2484
-405

query I rowsort
SELECT ALL 96 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
96
96
96

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 39 AS col1 FROM tab0 GROUP BY col2
----
39
39
39

query I rowsort
SELECT DISTINCT + 8 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
8

query I rowsort
SELECT 73 FROM tab1 GROUP BY tab1.col2
----
73
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + 41 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
41
41
41

query I rowsort
SELECT - 31 * + col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-2542
-682
-868

query I rowsort
SELECT ALL - + 41 FROM tab1 GROUP BY tab1.col0
----
-41
-41
-41

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 78, tab1.col2 ) FROM tab1 GROUP BY tab1.col0
----
78
78
78

query I rowsort
SELECT DISTINCT + tab2.col2 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 88 col0 FROM tab0 GROUP BY tab0.col1
----
88
88

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col1 + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
2025

query I rowsort
SELECT ALL cor0.col0 + - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-29
16
38

query I rowsort
SELECT + + 53 FROM tab0 GROUP BY tab0.col0
----
53
53
53

onlyif mysql # DIV for integer division: 
query I rowsort label-6413
SELECT COALESCE ( + 76, + cor0.col0 DIV + cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col2, col0
----
76
76
76

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-6413
SELECT COALESCE ( + 76, + cor0.col0 / + cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col2, col0
----
76
76
76

query I rowsort
SELECT - 15 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1065
-120
-675

onlyif mysql # DIV for integer division: 
query I rowsort label-6415
SELECT - tab0.col0 DIV col0 FROM tab0 GROUP BY col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6415
SELECT - tab0.col0 / col0 FROM tab0 GROUP BY col0
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6416
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6416
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
164
44
56

onlyif mysql # DIV for integer division: 
query I rowsort label-6418
SELECT DISTINCT + + 38 + - tab1.col0 DIV - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
39

skipif mysql # not compatible
query I rowsort label-6418
SELECT DISTINCT + + 38 + - tab1.col0 / - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
39

query I rowsort
SELECT - 57 + + 5 FROM tab1 AS cor0 GROUP BY col0
----
-52
-52
-52

query I rowsort
SELECT ALL + 59 * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1534
2537
4897

onlyif mysql # DIV for integer division: 
query I rowsort label-6421
SELECT DISTINCT - cor0.col1 DIV - 94 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-6421
SELECT DISTINCT - cor0.col1 / - 94 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT DISTINCT cor0.col2 * + 68 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3060
4828
544

query I rowsort
SELECT DISTINCT + 25 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-16
-34
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 29 col2 FROM tab2 GROUP BY tab2.col1
----
29
29
29

query I rowsort
SELECT DISTINCT + cor0.col0 * 95 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1425
8645
8740

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT DISTINCT 3 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
3

query I rowsort
SELECT 77 * + 19 + + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1485
1491
1545

query I rowsort
SELECT ALL - 96 + + 85 FROM tab0 cor0 GROUP BY cor0.col1
----
-11
-11

query I rowsort
SELECT cor0.col0 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
102
150
170

query I rowsort
SELECT ALL - 0 AS col1 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT 60 * + 48 AS col2 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
2880
2880
2880

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT 50 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
50
50
50

query I rowsort
SELECT + col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

onlyif mysql # DIV for integer division: 
query I rowsort label-6436
SELECT ALL + cor0.col2 DIV 76 - cor0.col2 * + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

skipif mysql # not compatible
query I rowsort label-6436
SELECT ALL + cor0.col2 / 76 - cor0.col2 * + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

onlyif mysql # DIV for integer division: 
query I rowsort label-6437
SELECT cor0.col1 DIV + COALESCE ( + ( + 60 ), cor0.col1 + 71 ) col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6437
SELECT cor0.col1 / + COALESCE ( + ( + 60 ), cor0.col1 + 71 ) col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
1

query I rowsort
SELECT ALL 37 + 63 * tab2.col0 FROM tab2 GROUP BY col0
----
5770
5833
982

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 + cor0.col2 - + 90 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3889
-5085
-532

query I rowsort
SELECT + 16 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1328
416
688

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 78 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT ALL + + 6 * - 8 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-48
-48
-48

query I rowsort
SELECT DISTINCT ( 89 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
89

query I rowsort
SELECT DISTINCT - 9 + 76 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1815
2879
5995

query I rowsort
SELECT - 74 FROM tab1 GROUP BY tab1.col2
----
-74
-74
-74

query I rowsort
SELECT 13 FROM tab1 GROUP BY tab1.col2
----
13
13
13

query I rowsort
SELECT ALL - 53 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-53
-53
-53

query I rowsort
SELECT 91 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT - 82 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-82
-82
-82

query I rowsort
SELECT col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT 62 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
62

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6453
SELECT ALL + - CAST( NULL AS SIGNED ) * - tab1.col0 + 3 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6453
SELECT ALL + - CAST ( NULL AS INTEGER ) * - tab1.col0 + 3 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 95 AS col2 FROM tab2 GROUP BY tab2.col0
----
-95

query I rowsort
SELECT DISTINCT tab1.col2 * - ( tab1.col2 + + tab1.col2 * - tab1.col2 ) + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
352941
456
89145

query I rowsort
SELECT + 46 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
46
46
46

query I rowsort
SELECT 57 FROM tab0 AS cor0 GROUP BY cor0.col1
----
57
57

query I rowsort
SELECT 14 FROM tab1 AS cor0 GROUP BY col0
----
14
14
14

query I rowsort
SELECT - 53 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-53
-53
-53

query I rowsort
SELECT + NULLIF ( + 34, - cor0.col2 * + cor0.col1 ) * + cor0.col2 FROM tab1 AS cor0 GROUP BY col2, col1
----
1530
2414
272

query I rowsort
SELECT DISTINCT - 13 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1183
-1196
-195

query I rowsort
SELECT DISTINCT + 74 FROM tab2 cor0 GROUP BY cor0.col2
----
74

query I rowsort
SELECT - 18 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-18
-18
-18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT + - col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT ALL - 82 * col1 AS col1 FROM tab1 GROUP BY col1
----
-3608
-4674
-492

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( cor0.col1, - 88, + cor0.col1, cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT tab1.col2 * col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT - tab0.col2 + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - 20 FROM tab0 GROUP BY tab0.col1
----
-20
-20

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 50, tab2.col1 * tab2.col0 - - tab2.col1 ) + 62 AS col0 FROM tab2 GROUP BY tab2.col0
----
112
112
112

query I rowsort
SELECT + - 95 FROM tab1 GROUP BY tab1.col1
----
-95
-95
-95

query I rowsort
SELECT 64 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
64
64
64

onlyif mysql # DIV for integer division: 
query I rowsort label-6477
SELECT cor0.col2 DIV 86 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6477
SELECT cor0.col2 / 86 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 * + 47 col0 FROM tab0 GROUP BY tab0.col1
----
0
3807

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) >= NULL
----

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
2378
4661
5307

query I rowsort
SELECT ALL - + col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT + cor0.col1 * + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
6561

query I rowsort
SELECT - col1 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - 91 FROM tab0 GROUP BY tab0.col0
----
-91

query I rowsort
SELECT + COALESCE ( cor0.col0, - 90 * - 63 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col2 * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-1944
0
0

query I rowsort
SELECT 43 * + 59 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2537
2537
2537

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6489
SELECT ALL + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6489
SELECT ALL + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
164
44
56

query I rowsort
SELECT DISTINCT - cor0.col2 * + ( 62 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3596
-4898
-5394

query I rowsort
SELECT - tab0.col2 * 61 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1464
-2318
-4819

onlyif mysql # DIV for integer division: 
query I rowsort label-6493
SELECT - tab2.col0 DIV tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6493
SELECT - tab2.col0 / tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 77 col0 FROM tab1 GROUP BY col2
----
77
77
77

query I rowsort
SELECT col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
138
148
99

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 75 FROM tab2 GROUP BY tab2.col0
----
-75

query I rowsort
SELECT ALL + 9 AS col0 FROM tab0 GROUP BY tab0.col0
----
9
9
9

query I rowsort
SELECT DISTINCT - 28 FROM tab0 GROUP BY tab0.col0
----
-28

query I rowsort
SELECT ALL + COALESCE ( tab1.col0, col0 + 71 ) FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col0 FROM tab2 cor0 GROUP BY col0 HAVING NULL IS NULL
----
15
91
92

query I rowsort
SELECT DISTINCT tab1.col0 + - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT - - 55 FROM tab2 GROUP BY tab2.col2
----
55
55
55

query I rowsort
SELECT DISTINCT - 9 FROM tab1 GROUP BY col1
----
-9

query I rowsort
SELECT DISTINCT 37 + + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY col2
----
116
124
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6508
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6508
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 35 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
-35
-35
-35

query I rowsort
SELECT DISTINCT 19 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
19

query I rowsort
SELECT ALL + 35 FROM tab1 AS cor0 GROUP BY cor0.col0
----
35
35
35

query I rowsort
SELECT DISTINCT tab1.col1 + 17 FROM tab1 GROUP BY tab1.col1
----
23
61
74

query I rowsort
SELECT - cor0.col1 + - 85 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-126
-144
-146

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 * + 59 col2 FROM tab1 GROUP BY tab1.col0
----
1298
1652
4838

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 10 col1 FROM tab2 GROUP BY tab2.col0
----
10
10
10

query I rowsort
SELECT DISTINCT + 31 AS col1 FROM tab0 GROUP BY tab0.col0
----
31

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6517
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6517
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6519
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6519
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ( cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 35 col2 FROM tab1 GROUP BY tab1.col0
----
35
35
35

query I rowsort
SELECT DISTINCT 24 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT 35 FROM tab0 AS cor0 GROUP BY cor0.col0
----
35
35
35

query I rowsort
SELECT DISTINCT - 15 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-15

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6526
SELECT - CAST( 10 AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
-10
-10
-10

skipif mysql # not compatible
query I rowsort label-6526
SELECT - CAST ( 10 AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
-10
-10
-10

query I rowsort
SELECT ALL - 42 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-42
-42
-42

query I rowsort
SELECT - + 52 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-131
-76
-90

query I rowsort
SELECT ALL - cor0.col0 * + 33 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3003
-3036
-495

query I rowsort
SELECT ALL tab0.col0 + 23 AS col1 FROM tab0 GROUP BY tab0.col0
----
106
49
66

query I rowsort
SELECT 37 AS col1 FROM tab0 GROUP BY tab0.col2
----
37
37
37

onlyif mysql # DIV for integer division: 
query I rowsort label-6532
SELECT - + tab2.col2 DIV - 82 + 47 FROM tab2 GROUP BY col2
----
47
47
48

skipif mysql # not compatible
query I rowsort label-6532
SELECT - + tab2.col2 / - 82 + 47 FROM tab2 GROUP BY col2
----
47
47
48

query I rowsort
SELECT + tab0.col2 + - 80 * + 33 FROM tab0 GROUP BY col2
----
-2561
-2602
-2616

query I rowsort
SELECT - - 35 FROM tab0 GROUP BY tab0.col0
----
35
35
35

query I rowsort
SELECT - COALESCE ( cor0.col1, cor0.col0 ) AS col2 FROM tab1 cor0 GROUP BY col1, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT + 28 + 22 FROM tab2 GROUP BY tab2.col1
----
50
50
50

query I rowsort
SELECT - 67 FROM tab0 cor0 GROUP BY cor0.col2
----
-67
-67
-67

query I rowsort
SELECT ALL 20 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
20
20
20

onlyif mysql # DIV for integer division: 
query I rowsort label-6539
SELECT - 99 DIV + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-12
-2

skipif mysql # not compatible
query I rowsort label-6539
SELECT - 99 / + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-12
-2

query I rowsort
SELECT ALL ( col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT + 90 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
90
90
90

query I rowsort
SELECT ALL cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT - tab2.col1 * - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT - 53 FROM tab2 GROUP BY tab2.col1
----
-53
-53
-53

query I rowsort
SELECT ALL + - 15 + - 78 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1887
-2979
-6177

query I rowsort
SELECT - col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - tab2.col1 * 30 + + col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1189
-1711
-1769

query I rowsort
SELECT - 68 AS col2 FROM tab0 GROUP BY tab0.col0
----
-68
-68
-68

query I rowsort
SELECT DISTINCT ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT + + 60 FROM tab1 GROUP BY tab1.col1
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT tab2.col0 * + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT ALL - 68 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-68
-68

query I rowsort
SELECT DISTINCT + - col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + 6 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
6

query I rowsort
SELECT + tab1.col2 * 37 AS col1 FROM tab1 GROUP BY tab1.col2
----
1665
2627
296

query I rowsort
SELECT cor0.col0 + ( cor0.col0 + cor0.col0 * cor0.col0 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
1935
7055
728

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab0 cor0 GROUP BY col0, cor0.col1
----
26
43
83

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 cor0.col1 + + ( - cor0.col1 ) * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2337
-4602
-5246

query I rowsort
SELECT ALL 54 FROM tab0 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT - 77 + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-62
14
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT col0 + - col0 * - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1892
6972
702

query I rowsort
SELECT ALL + col0 AS col0 FROM tab0 WHERE ( NULL ) IS NULL GROUP BY tab0.col0 HAVING NOT ( NULL ) <= NULL
----

query I rowsort
SELECT - col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT + tab1.col1 * tab1.col1 + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1980
3306
42

query I rowsort
SELECT DISTINCT tab2.col1 + col1 AS col0 FROM tab2 GROUP BY col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * 9 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
729

query I rowsort
SELECT ( 23 ) FROM tab2, tab1 AS cor0 GROUP BY tab2.col0
----
23
23
23

query I rowsort
SELECT + + 17 + - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-27
-40
11

query I rowsort
SELECT DISTINCT + 55 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
5005
5060
825

query I rowsort
SELECT + 82 FROM tab0, tab1 cor0 GROUP BY tab0.col2
----
82
82
82

query I rowsort
SELECT ALL + col0 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
133
150
76

onlyif mysql # DIV for integer division: 
query I rowsort label-6575
SELECT tab1.col2 DIV - 10 FROM tab1 GROUP BY tab1.col2
----
-4
-7
0

skipif mysql # not compatible
query I rowsort label-6575
SELECT tab1.col2 / - 10 FROM tab1 GROUP BY tab1.col2
----
-4
-7
0

query I rowsort
SELECT ALL - col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 97 col2 FROM tab0 GROUP BY tab0.col1
----
-97

query I rowsort
SELECT - cor0.col1 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-57
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 18 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
18

query I rowsort
SELECT + 27 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1026
-2133
-648

query I rowsort
SELECT + + tab0.col1 + - 52 AS col2 FROM tab0 GROUP BY tab0.col1
----
-52
29

onlyif mysql # DIV for integer division: 
query I rowsort label-6582
SELECT DISTINCT - cor0.col0 DIV 45 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0

skipif mysql # not compatible
query I rowsort label-6582
SELECT DISTINCT - cor0.col0 / 45 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0

query I rowsort
SELECT DISTINCT - col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
0

query I rowsort
SELECT - - 62 FROM tab0 GROUP BY tab0.col2
----
62
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT + - 11 FROM tab1 GROUP BY tab1.col1
----
-11

query I rowsort
SELECT - 46 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-1104
-1748
-3634

query I rowsort
SELECT DISTINCT + 54 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
137
80
97

query I rowsort
SELECT 44 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
44
44
44

query I rowsort
SELECT ALL - cor0.col2 FROM tab2 cor0 GROUP BY col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT + col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + cor0.col2 * + 25 + - cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col0, col0, col2
----
1392
1896
2088

query I rowsort
SELECT ALL 58 FROM tab0 cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT + + tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT tab2.col1 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT 59 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
59
59
59

query I rowsort
SELECT 68 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
68
68
68

query I rowsort
SELECT ALL - + 84 FROM tab2 GROUP BY tab2.col2
----
-84
-84
-84

query I rowsort
SELECT cor0.col1 + - cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6600
SELECT ALL + CAST( NULL AS SIGNED ) AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6600
SELECT ALL + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT 29 FROM tab2 GROUP BY tab2.col1
----
29

query I rowsort
SELECT 13 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
13
13
13

query I rowsort
SELECT DISTINCT 49 AS col1 FROM tab1 GROUP BY col1
----
49

query I rowsort
SELECT DISTINCT + 51 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
134
77
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT - - 10 FROM tab1 GROUP BY tab1.col1
----
10
10
10

query I rowsort
SELECT - tab1.col1 + + 31 AS col0 FROM tab1 GROUP BY tab1.col1
----
-13
-26
25

query I rowsort
SELECT + 55 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
55
55
55

query I rowsort
SELECT 87 FROM tab2 GROUP BY col0
----
87
87
87

query I rowsort
SELECT 31 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
31
31

query I rowsort
SELECT DISTINCT - + 96 FROM tab0 GROUP BY col1
----
-96

query I rowsort
SELECT ALL + 81 FROM tab1 GROUP BY col1
----
81
81
81

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col1, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT + 27 FROM tab2 AS cor0 GROUP BY cor0.col1
----
27
27
27

query I rowsort
SELECT - col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-6616
SELECT - cor0.col0 DIV - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6616
SELECT - cor0.col0 / - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT - col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT - - col2 * tab1.col2 FROM tab1 GROUP BY col2
----
2025
5041
64

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 95, + col0 + + tab2.col2 * col2, + tab2.col1 + + tab2.col0 ) * - tab2.col0 FROM tab2 GROUP BY col0
----
1425
8645
8740

query I rowsort
SELECT ALL - 35 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-35
-35
-35

query I rowsort
SELECT + 17 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-27
-40
11

query I rowsort
SELECT DISTINCT tab2.col2 + - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT + 32 FROM tab2 GROUP BY col2
----
32
32
32

query I rowsort
SELECT cor0.col1 * - ( + 4 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-164
-236
-244

query I rowsort
SELECT - 43 AS col0 FROM tab0 GROUP BY tab0.col1
----
-43
-43

query I rowsort
SELECT - tab0.col0 * - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT + - 31 AS col0 FROM tab0 GROUP BY col1
----
-31
-31

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6628
SELECT DISTINCT CAST( 35 AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
35

skipif mysql # not compatible
query I rowsort label-6628
SELECT DISTINCT CAST ( 35 AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 62 col1 FROM tab0 GROUP BY col2
----
62
62
62

query I rowsort
SELECT - 8 FROM tab0 AS cor0 GROUP BY col1
----
-8
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 61 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-61

query I rowsort
SELECT DISTINCT + 63 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
63

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - + COALESCE ( 63, tab2.col1 ) FROM tab2 GROUP BY tab2.col2
----
-63
-63
-63

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col0 * 76 col1 FROM tab1 GROUP BY tab1.col0
----
-1672
-2128
-6232

query I rowsort
SELECT DISTINCT + 64 + cor0.col1 * - 54 FROM tab2 cor0 GROUP BY cor0.col1
----
-2150
-3122
-3230

query I rowsort
SELECT DISTINCT 46 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
46

query I rowsort
SELECT ALL - 3 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-3
-3
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col1 + + 96 col1 FROM tab1 GROUP BY tab1.col1
----
102
140
153

query I rowsort
SELECT 29 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
29
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 57 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-57

query I rowsort
SELECT ALL 50 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT - col2 * tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 55 col1 FROM tab1 GROUP BY tab1.col0
----
55
55
55

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 + 75 + - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-4
37
51

query I rowsort
SELECT ALL tab1.col1 * 5 FROM tab1 GROUP BY tab1.col1
----
220
285
30

onlyif mysql # DIV for integer division: 
query I rowsort label-6648
SELECT tab1.col0 DIV + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6648
SELECT tab1.col0 / + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT - tab2.col0 - - tab2.col0 FROM tab2 GROUP BY col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 + - tab2.col2 * - tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
3306
6162
7482

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT + 99 FROM tab0 GROUP BY tab0.col0
----
99
99
99

query I rowsort
SELECT ALL + 32 + - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-49
32

query I rowsort
SELECT DISTINCT + cor0.col1 + - 84 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-27
-40
-78

query I rowsort
SELECT ALL 35 AS col0 FROM tab1 GROUP BY tab1.col2
----
35
35
35

query I rowsort
SELECT - - 2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2
2
2

query I rowsort
SELECT ALL 30 FROM tab1 cor0 GROUP BY col2
----
30
30
30

query I rowsort
SELECT ALL 82 AS col0 FROM tab0 GROUP BY tab0.col0
----
82
82
82

query I rowsort
SELECT DISTINCT 91 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
91

query I rowsort
SELECT DISTINCT + 67 + + cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor0.col1
----
148
67

query I rowsort
SELECT ALL tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL 42 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT cor0.col1 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
102
115
14

query I rowsort
SELECT - 4 * - 91 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
364
445

onlyif mysql # DIV for integer division: 
query I rowsort label-6667
SELECT - cor0.col0 DIV cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6667
SELECT - cor0.col0 / cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col1 - + tab1.col1 * + col1 col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - + 72 FROM tab1 GROUP BY tab1.col2
----
-72
-72
-72

query I rowsort
SELECT DISTINCT + col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT - 27 FROM tab1 GROUP BY tab1.col0
----
-27
-27
-27

query I rowsort
SELECT + 46 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT - 16 FROM tab0 cor0 GROUP BY cor0.col0
----
-16
-16
-16

query I rowsort
SELECT DISTINCT + 29 FROM tab2 AS cor0 GROUP BY cor0.col2
----
29

query I rowsort
SELECT - 97 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-97
-97
-97

query I rowsort
SELECT ALL + 80 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
80
80
80

query I rowsort
SELECT cor0.col1 * 76 FROM tab0 AS cor0 GROUP BY col1
----
0
6156

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 77 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
77

onlyif mysql # DIV for integer division: 
query I rowsort label-6680
SELECT DISTINCT + + 33 DIV tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-6680
SELECT DISTINCT + + 33 / tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0
1

query I rowsort
SELECT DISTINCT cor0.col0 * col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
484
6724
784

query I rowsort
SELECT + 38 - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-43
38

onlyif mysql # DIV for integer division: 
query I rowsort label-6683
SELECT - COALESCE ( - 89, + cor0.col2 - + cor0.col0 ) DIV 25 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
3
3
3

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-6683
SELECT - COALESCE ( - 89, + cor0.col2 - + cor0.col0 ) / 25 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
3
3
3

query I rowsort
SELECT ALL - + 25 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-25
-25
-25

onlyif mysql # DIV for integer division: 
query I rowsort label-6685
SELECT DISTINCT 33 DIV + 2 AS col0 FROM tab1 GROUP BY tab1.col2
----
16

skipif mysql # not compatible
query I rowsort label-6685
SELECT DISTINCT 33 / + 2 AS col0 FROM tab1 GROUP BY tab1.col2
----
16

query I rowsort
SELECT DISTINCT + - 39 * + 78 FROM tab1 GROUP BY col1
----
-3042

query I rowsort
SELECT col0 * 47 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
1222
2021
3901

query I rowsort
SELECT 84 FROM tab2 AS cor0 GROUP BY cor0.col1
----
84
84
84

query I rowsort
SELECT - 81 FROM tab2 cor0 GROUP BY cor0.col1
----
-81
-81
-81

query I rowsort
SELECT DISTINCT NULLIF ( + tab1.col2, tab1.col2 ) * 18 FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT DISTINCT col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col1 + + cor0.col0 * 45 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
4154
4181
736

query I rowsort
SELECT + CASE cor0.col2 WHEN cor0.col1 THEN cor0.col1 ELSE NULL END FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT cor0.col1 * - cor0.col2 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-1863
0
0

query I rowsort
SELECT ALL - - ( 47 ) * tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
1222
2021
3901

query I rowsort
SELECT 83 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
83
83
83

query I rowsort
SELECT col2 + cor0.col2 * 36 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1406
2923
888

query I rowsort
SELECT - 8 FROM tab2 GROUP BY tab2.col1
----
-8
-8
-8

query I rowsort
SELECT 32 AS col2 FROM tab2 GROUP BY tab2.col1
----
32
32
32

query I rowsort
SELECT cor0.col2 - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6702
SELECT ALL cor0.col2 DIV - col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6702
SELECT ALL cor0.col2 / - col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 32 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
32

query I rowsort
SELECT + 34 + cor0.col2 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2059
5075
98

query I rowsort
SELECT + 31 * + 92 AS col0 FROM tab0 GROUP BY col1
----
2852
2852

query I rowsort
SELECT ALL - 35 * - 87 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3045
3045
3045

query I rowsort
SELECT DISTINCT 79 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
79

query I rowsort
SELECT DISTINCT + 85 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
85

query I rowsort
SELECT DISTINCT + 71 FROM tab2 GROUP BY tab2.col1
----
71

query I rowsort
SELECT ALL - 3 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-3
-3
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
6561

query I rowsort
SELECT ALL 20 * + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
1640
440
560

query I rowsort
SELECT DISTINCT tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NOT NULL
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col1 * tab2.col1 col2 FROM tab2 GROUP BY tab2.col1 HAVING NOT ( NULL ) = NULL
----

query I rowsort
SELECT DISTINCT - tab0.col0 * - tab0.col0 FROM tab0 WHERE NULL IS NULL GROUP BY tab0.col0 HAVING NOT - tab0.col0 IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * 85 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4930
6715
7395

query I rowsort
SELECT + cor0.col1 - - 86 FROM tab2 AS cor0 GROUP BY cor0.col1
----
127
145
147

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
8
8
8

onlyif mysql # DIV for integer division: 
query I rowsort label-6719
SELECT - + tab1.col0 DIV col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6719
SELECT - + tab1.col0 / col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

query I rowsort
SELECT + + 5 FROM tab0 GROUP BY tab0.col0
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 4 col0 FROM tab1 GROUP BY tab1.col0
----
4
4
4

query I rowsort
SELECT DISTINCT 3 AS col0 FROM tab2 GROUP BY tab2.col1
----
3

query I rowsort
SELECT DISTINCT 76 FROM tab0 GROUP BY tab0.col1
----
76

onlyif mysql # DIV for integer division: 
query I rowsort label-6724
SELECT + 26 DIV - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-6724
SELECT + 26 / - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3
0
0

query I rowsort
SELECT ALL 32 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
32
32
32

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-41
-59
-61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6728
SELECT + 19 * cor0.col0 + - CAST( NULL AS SIGNED ) col2 FROM tab1 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-6728
SELECT + 19 * cor0.col0 + - CAST ( NULL AS INTEGER ) col2 FROM tab1 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 97 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-97

query I rowsort
SELECT - 74 FROM tab0 GROUP BY col1
----
-74
-74

onlyif mysql # DIV for integer division: 
query I rowsort label-6731
SELECT ALL cor0.col0 DIV cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6731
SELECT ALL cor0.col0 / cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT + 87 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-3567
-5133
-5307

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-6734
SELECT - - 79 DIV tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-6734
SELECT - - 79 / tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0
1
1

query I rowsort
SELECT cor0.col2 * + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1444
576
6241

query I rowsort
SELECT + 34 AS col0 FROM tab2 GROUP BY tab2.col0
----
34
34
34

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT DISTINCT + 1 AS col2 FROM tab2 GROUP BY tab2.col0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col0 + - tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

query I rowsort
SELECT DISTINCT - - 66 FROM tab0 GROUP BY tab0.col1
----
66

onlyif mysql # DIV for integer division: 
query I rowsort label-6741
SELECT - cor0.col2 DIV + 28 FROM tab0 AS cor0 GROUP BY col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-6741
SELECT - cor0.col2 / + 28 FROM tab0 AS cor0 GROUP BY col2
----
-1
-2
0

query I rowsort
SELECT ALL - 41 * tab1.col2 + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-1800
-2840
-320

query I rowsort
SELECT ALL - 46 AS col2 FROM tab0 GROUP BY tab0.col2
----
-46
-46
-46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - tab0.col1 ) col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 53 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
53
53
53

query I rowsort
SELECT ALL - 25 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, col2
----
-25
-25
-25

query I rowsort
SELECT 60 + + 4 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
64
64
64

query I rowsort
SELECT 34 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
34
34
34

query I rowsort
SELECT - + col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - 63 AS col1 FROM tab2 GROUP BY col0
----
-63

query I rowsort
SELECT ALL + 28 FROM tab2 AS cor0 GROUP BY col0
----
28
28
28

query I rowsort
SELECT + cor0.col1 + ( 57 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
116
118
98

query I rowsort
SELECT ALL + 58 FROM tab0 GROUP BY tab0.col1
----
58
58

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-81
0
0

query I rowsort
SELECT + 13 FROM tab2 GROUP BY tab2.col2
----
13
13
13

onlyif mysql # DIV for integer division: 
query I rowsort label-6756
SELECT col2 DIV + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6756
SELECT col2 / + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
1

query I rowsort
SELECT DISTINCT - 72 AS col2 FROM tab1 GROUP BY tab1.col2
----
-72

query I rowsort
SELECT ALL - ( 7 ) * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-168
-266
-553

query I rowsort
SELECT ALL 74 + + 1 AS col2 FROM tab2 GROUP BY tab2.col0
----
75
75
75

query I rowsort
SELECT ALL 31 + + cor0.col0 * 45 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1201
1966
3766

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 2 - 16 col2 FROM tab2 GROUP BY tab2.col1
----
-18
-18
-18

query I rowsort
SELECT ALL + - NULLIF ( tab1.col2, 87 ) AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 57 FROM tab0 GROUP BY tab0.col2
----
57
57
57

query I rowsort
SELECT ALL 32 - 41 FROM tab1 GROUP BY tab1.col2
----
-9
-9
-9

query I rowsort
SELECT ALL - 43 AS col0 FROM tab1 GROUP BY tab1.col0
----
-43
-43
-43

query I rowsort
SELECT - - col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 68 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-68

query I rowsort
SELECT + 75 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
75
75
75

query I rowsort
SELECT DISTINCT + + col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - + 31 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-2821
-2852
-465

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6771
SELECT DISTINCT CAST( NULL AS SIGNED ) col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6771
SELECT DISTINCT CAST ( NULL AS INTEGER ) col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

query I rowsort
SELECT cor0.col1 + 95 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
136
154
156

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 * cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2610
3195
56

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT + 19 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1539

query I rowsort
SELECT DISTINCT - 75 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-75

query I rowsort
SELECT ALL + + col2 * 1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 91 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
91

query I rowsort
SELECT DISTINCT - col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT ALL cor0.col2 + + 96 * - 17 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1561
-1587
-1624

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING ( NULL ) < ( NULL )
----

query I rowsort
SELECT - cor0.col2 - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
-158
-48
-76

query I rowsort
SELECT tab2.col2 * + tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT tab2.col0 - + 61 AS col1 FROM tab2 GROUP BY tab2.col0
----
-46
30
31

query I rowsort
SELECT DISTINCT + - col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
41
59
61

query I rowsort
SELECT + tab0.col2 * + COALESCE ( + tab0.col2, 8 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT tab0.col1 + 92 AS col1 FROM tab0 GROUP BY tab0.col1
----
173
92

query I rowsort
SELECT - 10 + - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-32
-38
-92

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - col0 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-16
-38
29

query I rowsort
SELECT + 96 + 27 FROM tab0 GROUP BY col0
----
123
123
123

query I rowsort
SELECT ALL + 10 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
10
10
10

query I rowsort
SELECT + + 72 FROM tab0 GROUP BY tab0.col0
----
72
72
72

query I rowsort
SELECT ALL tab1.col2 * + COALESCE ( - col2, tab1.col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT - col2 + + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-17
-20
-26

query I rowsort
SELECT ALL 4 - cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3360
-6237
-7565

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 cor0 GROUP BY col0, col1
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 7 FROM tab2 AS cor0 GROUP BY col1
----
7

query I rowsort
SELECT - 44 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-44
-44
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col1 * tab2.col1 col1 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, col2
----
45
71
8

query I rowsort
SELECT ALL + tab0.col0 * - tab0.col0 + col0 FROM tab0 GROUP BY tab0.col0
----
-1806
-650
-6806

query I rowsort
SELECT - 91 * tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
-4004
-5187
-546

onlyif mysql # DIV for integer division: 
query I rowsort label-6808
SELECT + col0 + + tab1.col0 DIV tab1.col0 FROM tab1 GROUP BY tab1.col0
----
23
29
83

skipif mysql # not compatible
query I rowsort label-6808
SELECT + col0 + + tab1.col0 / tab1.col0 FROM tab1 GROUP BY tab1.col0
----
23
29
83

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
44
57
6

query I rowsort
SELECT DISTINCT + - col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 90 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
90

query I rowsort
SELECT ALL tab0.col1 * ( tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
0
6561

onlyif mysql # DIV for integer division: 
query I rowsort label-6813
SELECT ALL + 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-6813
SELECT ALL + cor0.col0 / + ( cor0.col0 ) AS col1 FROM tab0 AS cor0 GROUP BY col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - + 60 col0 FROM tab2 AS cor0 GROUP BY col1
----
-1
-19
1

query I rowsort
SELECT ALL 94 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
94
94
94

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT + 8 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
8

onlyif mysql # DIV for integer division: 
query I rowsort label-6819
SELECT DISTINCT - - col1 DIV 27 FROM tab0 GROUP BY tab0.col1
----
0
3

skipif mysql # not compatible
query I rowsort label-6819
SELECT DISTINCT - - col1 / 27 FROM tab0 GROUP BY tab0.col1
----
0
3

query I rowsort
SELECT DISTINCT + tab0.col1 + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT 85 * cor0.col2 + + 44 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3869
6079
724

query I rowsort
SELECT - 30 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-30
-30
-30

query I rowsort
SELECT ALL + 61 FROM tab1 AS cor0 GROUP BY col2
----
61
61
61

onlyif mysql # DIV for integer division: 
query I rowsort label-6824
SELECT DISTINCT tab2.col1 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1

skipif mysql # not compatible
query I rowsort label-6824
SELECT DISTINCT tab2.col1 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1

query I rowsort
SELECT + 24 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
24
24

query I rowsort
SELECT 7 AS col2 FROM tab2 GROUP BY tab2.col2
----
7
7
7

onlyif mysql # DIV for integer division: 
query I rowsort label-6827
SELECT - - col2 DIV + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6827
SELECT - - col2 / + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT DISTINCT + 19 FROM tab2 AS cor0 GROUP BY cor0.col2
----
19

query I rowsort
SELECT + 24 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
24
24
24

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 DISTINCT - + 1 FROM tab0 GROUP BY tab0.col2
----
-1

query I rowsort
SELECT ALL + tab0.col2 * col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT col2 * + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2565
3124
48

query I rowsort
SELECT DISTINCT + - 14 FROM tab0 GROUP BY tab0.col0
----
-14

query I rowsort
SELECT ALL - 25 * tab2.col2 FROM tab2 GROUP BY col2
----
-1450
-1975
-2175

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 18 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 39 col0 FROM tab0 AS cor0 GROUP BY col1
----
39
39

query I rowsort
SELECT 46 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
46
46
46

query I rowsort
SELECT - 79 AS col1 FROM tab0 GROUP BY tab0.col1
----
-79
-79

query I rowsort
SELECT - 75 FROM tab2 GROUP BY tab2.col1
----
-75
-75
-75

onlyif mysql # DIV for integer division: 
query I rowsort label-6841
SELECT + 27 DIV 80 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6841
SELECT + 27 / 80 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT 39 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
39
39
39

query I rowsort
SELECT ALL + 53 AS col1 FROM tab0 GROUP BY tab0.col2
----
53
53
53

query I rowsort
SELECT - 31 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-31
-31
-31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT 21 FROM tab2 AS cor0 GROUP BY col2
----
21
21
21

query I rowsort
SELECT + 55 * tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2475
3905
440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 98 col2 FROM tab2 AS cor0 GROUP BY col0
----
-98
-98
-98

query I rowsort
SELECT DISTINCT - tab2.col2 * + 18 FROM tab2, tab1 cor0 GROUP BY tab2.col2
----
-1044
-1422
-1566

query I rowsort
SELECT ALL - col0 + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL + col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL + cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT tab2.col2 * tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
3364
6241
7569

onlyif mysql # DIV for integer division: 
query I rowsort label-6854
SELECT - cor0.col0 DIV 70 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6854
SELECT - cor0.col0 / 70 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 76 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
76
76
76

query I rowsort
SELECT DISTINCT + 55 AS col1 FROM tab1 GROUP BY tab1.col2
----
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 2 col0 FROM tab0 GROUP BY tab0.col2
----
-2

query I rowsort
SELECT 80 FROM tab2 GROUP BY tab2.col2
----
80
80
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 30 col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
30
30
30

query I rowsort
SELECT + 22 AS col2 FROM tab0 GROUP BY col1
----
22
22

query I rowsort
SELECT + 16 FROM tab0 cor0 GROUP BY cor0.col2
----
16
16
16

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - NULLIF ( 30, col0 ) AS col0 FROM tab0 GROUP BY tab0.col0
----
-30
-30
-30

onlyif mysql # DIV for integer division: 
query I rowsort label-6864
SELECT - - tab2.col0 DIV - tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6864
SELECT - - tab2.col0 / - tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-1
-1
-1

query I rowsort
SELECT ALL - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT 34 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
34
34
34

query I rowsort
SELECT ALL - tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT - 98 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-98
-98
-98

query I rowsort
SELECT - 75 FROM tab2 cor0 GROUP BY col2
----
-75
-75
-75

query I rowsort
SELECT ALL + + 35 FROM tab1 GROUP BY tab1.col0
----
35
35
35

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT 49 - cor0.col0 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-1256
-5287
-7140

query I rowsort
SELECT DISTINCT + tab2.col0 - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT ALL + - col1 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT + 1 * cor0.col0 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-29
16
38

onlyif mysql # DIV for integer division: 
query I rowsort label-6877
SELECT cor0.col0 DIV cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6877
SELECT cor0.col0 / cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-6878
SELECT DISTINCT cor0.col0 DIV cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
1

skipif mysql # not compatible
query I rowsort label-6878
SELECT DISTINCT cor0.col0 / cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
1

query I rowsort
SELECT ALL 19 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT - tab2.col2 + - tab2.col2 FROM tab2 GROUP BY col2
----
-116
-158
-174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL tab2.col0 + + tab2.col0 * tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
240
8372
8556

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IN ( cor0.col1 * cor0.col1 )
----

query I rowsort
SELECT tab0.col0 + - tab0.col0 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1806
-650
-6806

query I rowsort
SELECT tab1.col1 * + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT + col2 - tab1.col2 AS col2 FROM tab1 WHERE NULL IS NULL GROUP BY tab1.col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6888
SELECT cor0.col2 DIV + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6888
SELECT cor0.col2 / + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
1

query I rowsort
SELECT ALL + + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL - tab2.col1 * - col1 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1640
3422
3660

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - 28 * + 29 AS col2 FROM tab1 GROUP BY tab1.col0
----
-812
-812
-812

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 72 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
72
72
72

query I rowsort
SELECT - 12 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1092
-1104
-180

query I rowsort
SELECT ALL - 43 AS col1 FROM tab0 GROUP BY col0
----
-43
-43
-43

query I rowsort
SELECT DISTINCT 95 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
95

query I rowsort
SELECT DISTINCT + col2 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

onlyif mysql # DIV for integer division: 
query I rowsort label-6898
SELECT DISTINCT tab2.col2 DIV + tab2.col2 + - 60 AS col1 FROM tab2 GROUP BY tab2.col2
----
-59

skipif mysql # not compatible
query I rowsort label-6898
SELECT DISTINCT tab2.col2 / + tab2.col2 + - 60 AS col1 FROM tab2 GROUP BY tab2.col2
----
-59

query I rowsort
SELECT ALL - cor0.col1 * 55 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-2420
-3135
-330

query I rowsort
SELECT DISTINCT + 72 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
72

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT 41 AS col0 FROM tab2 cor0 GROUP BY col0
----
41

query I rowsort
SELECT - col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT + - 14 AS col2 FROM tab2 GROUP BY tab2.col1
----
-14
-14
-14

query I rowsort
SELECT + 9 + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
9
90

query I rowsort
SELECT ( cor0.col0 ) * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1849
676
6889

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 88 col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
88
88
88

query I rowsort
SELECT + - 56 AS col1 FROM tab0, tab2 cor0 GROUP BY tab0.col2
----
-56
-56
-56

query I rowsort
SELECT - + 12 AS col0 FROM tab1 GROUP BY tab1.col2
----
-12
-12
-12

query I rowsort
SELECT DISTINCT 12 * + cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
572
741
78

query I rowsort
SELECT 17 * - tab2.col2 FROM tab2 GROUP BY col2
----
-1343
-1479
-986

query I rowsort
SELECT DISTINCT - 46 * ( + cor0.col2 ) + cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-2013
-3222
-362

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + tab0.col1 * 3 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
243

query I rowsort
SELECT - 86 - + tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
-167
-86

query I rowsort
SELECT ALL 99 FROM tab2 AS cor0 GROUP BY cor0.col0
----
99
99
99

query I rowsort
SELECT DISTINCT + cor0.col1 + - ( 11 ) * - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
492
708
732

query I rowsort
SELECT - - tab1.col0 * + 38 AS col1 FROM tab1 GROUP BY tab1.col0
----
1064
3116
836

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 87 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
87

query I rowsort
SELECT + 27 FROM tab2 AS cor0 GROUP BY cor0.col2
----
27
27
27

query I rowsort
SELECT 57 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
57
57
57

query I rowsort
SELECT + + 96 FROM tab1 GROUP BY tab1.col0
----
96
96
96

query I rowsort
SELECT ALL + + col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL - 67 FROM tab2 GROUP BY tab2.col1
----
-67
-67
-67

query I rowsort
SELECT DISTINCT + 36 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
36

query I rowsort
SELECT ALL + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT DISTINCT - 0 + - col1 AS col2 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT 10 AS col2 FROM tab1 GROUP BY tab1.col2
----
10
10
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 38 ) + col2 col0 FROM tab1 GROUP BY tab1.col2
----
109
46
83

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-6932
SELECT ALL + tab1.col2 DIV + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6932
SELECT ALL + tab1.col2 / + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT DISTINCT 50 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
50

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
118
122
82

query I rowsort
SELECT + 74 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
74
74

query I rowsort
SELECT DISTINCT 59 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
59

onlyif mysql # DIV for integer division: 
query I rowsort label-6937
SELECT DISTINCT - cor0.col1 DIV cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-1

skipif mysql # not compatible
query I rowsort label-6937
SELECT DISTINCT - cor0.col1 / cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-1

query I rowsort
SELECT DISTINCT - 90 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-90

query I rowsort
SELECT ALL - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + cor0.col0 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT DISTINCT - tab1.col0 * - 43 FROM tab1 GROUP BY col0
----
1204
3526
946

query I rowsort
SELECT ALL - 87 AS col1 FROM tab1 GROUP BY tab1.col2
----
-87
-87
-87

query I rowsort
SELECT ALL + 31 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
2511

query I rowsort
SELECT DISTINCT + 24 * + tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
1968
528
672

query I rowsort
SELECT DISTINCT + 91 FROM tab1 GROUP BY tab1.col1
----
91

query I rowsort
SELECT ALL + ( 69 ) + - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
10
28
8

query I rowsort
SELECT ALL - 44 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-4004
-4048
-660

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

query I rowsort
SELECT + 68 AS col2 FROM tab2 GROUP BY tab2.col0
----
68
68
68

query I rowsort
SELECT DISTINCT - 33 FROM tab1 GROUP BY col1
----
-33

query I rowsort
SELECT ALL ( - tab0.col1 ) AS col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT + col1 * - 69 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-2829
-4071
-4209

query I rowsort
SELECT DISTINCT - 94 FROM tab2 GROUP BY tab2.col1
----
-94

query I rowsort
SELECT DISTINCT 89 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
89

query I rowsort
SELECT ALL - cor0.col0 * 10 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
-220
-280
-820

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY col0 HAVING NOT NULL IS NOT NULL
----
-22
-28
-82

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 51 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 72 * + 85 col1 FROM tab0 GROUP BY tab0.col0
----
-6120
-6120
-6120

query I rowsort
SELECT + cor1.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6962
SELECT - tab0.col0 + - CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6962
SELECT - tab0.col0 + - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - tab1.col2 * 7 FROM tab1 GROUP BY tab1.col2
----
-315
-497
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 49 col2 FROM tab2 GROUP BY tab2.col1
----
49
49
49

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, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col0 + + 34 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
116
56
62

query I rowsort
SELECT - + tab0.col0 * 70 FROM tab0 GROUP BY col0
----
-1820
-3010
-5810

query I rowsort
SELECT ALL - 97 FROM tab1 GROUP BY tab1.col2
----
-97
-97
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 78 ) col2 FROM tab0 AS cor0 GROUP BY col0
----
78
78
78

query I rowsort
SELECT ALL + 24 FROM tab0 AS cor0 GROUP BY col0
----
24
24
24

query I rowsort
SELECT DISTINCT - 39 * cor0.col0 FROM tab0 cor0 GROUP BY col0, cor0.col1
----
-1014
-1677
-3237

query I rowsort
SELECT 24 + + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
30
68
81

query I rowsort
SELECT DISTINCT + 88 - + cor0.col1 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1003
3860
5457

query I rowsort
SELECT col1 * 63 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
2772
3591
378

query I rowsort
SELECT ALL cor0.col2 * - 95 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4275
-6745
-760

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT tab2.col2 * tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

onlyif mysql # DIV for integer division: 
query I rowsort label-6979
SELECT + tab2.col1 DIV - tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6979
SELECT + tab2.col1 / - tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

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, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL tab2.col1 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT ALL + 60 FROM tab2 AS cor0 GROUP BY cor0.col1
----
60
60
60

query I rowsort
SELECT DISTINCT cor0.col1 - + 58 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
-1
-14
-52

query I rowsort
SELECT DISTINCT 50 AS col2 FROM tab2 GROUP BY col1
----
50

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6985
SELECT DISTINCT - tab0.col0 * CAST( NULL AS SIGNED ) col1 FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6985
SELECT DISTINCT - tab0.col0 * CAST ( NULL AS INTEGER ) col1 FROM tab0 GROUP BY tab0.col0
----
NULL

query I rowsort
SELECT + 27 FROM tab0 GROUP BY col1
----
27
27

query I rowsort
SELECT DISTINCT 44 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
44

query I rowsort
SELECT 31 AS col2 FROM tab1 GROUP BY tab1.col2
----
31
31
31

query I rowsort
SELECT DISTINCT col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

onlyif mysql # DIV for integer division: 
query I rowsort label-6990
SELECT cor0.col1 DIV cor0.col1 + + 21 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
22
22
22

skipif mysql # not compatible
query I rowsort label-6990
SELECT cor0.col1 / cor0.col1 + + 21 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
22
22
22

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 54 col1 FROM tab0 GROUP BY tab0.col0
----
-54
-54
-54

onlyif mysql # DIV for integer division: 
query I rowsort label-6993
SELECT + cor0.col2 - cor0.col1 DIV - col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
46
72
9

skipif mysql # not compatible
query I rowsort label-6993
SELECT + cor0.col2 - cor0.col1 / - col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
46
72
9

query I rowsort
SELECT cor0.col1 * col1 + - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-38
-79
6537

query I rowsort
SELECT DISTINCT - 71 AS col1 FROM tab0 cor0 GROUP BY col2
----
-71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - cor0.col0 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col0, col1
----
-132
-1596
-3608

query I rowsort
SELECT + ( 26 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
26
26

query I rowsort
SELECT - 14 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-14
-14
-14

query I rowsort
SELECT 72 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
3240
5112
576

query I rowsort
SELECT - tab0.col1 + - tab0.col1 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6642
0

query I rowsort
SELECT + cor0.col0 + + 95 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
110
186
187

query I rowsort
SELECT 28 FROM tab2 GROUP BY col0
----
28
28
28

query I rowsort
SELECT 38 AS col2 FROM tab2 GROUP BY tab2.col1
----
38
38
38

query I rowsort
SELECT + + 18 * 85 AS col0 FROM tab0 GROUP BY tab0.col1
----
1530
1530

query I rowsort
SELECT - tab1.col0 * + 64 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1386
-1764
-5166

query I rowsort
SELECT DISTINCT - COALESCE ( - col2, - cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7008
SELECT CAST( NULL AS SIGNED ) col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7008
SELECT CAST ( NULL AS INTEGER ) col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + NULLIF ( + 37, tab0.col0 + 22 ) col2 FROM tab0 GROUP BY tab0.col0
----
37
37
37

query I rowsort
SELECT ALL + col2 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT - 85 FROM tab1 GROUP BY tab1.col2
----
-85
-85
-85

query I rowsort
SELECT ALL 36 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT DISTINCT 94 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
94

query I rowsort
SELECT ALL cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor1.col0, cor1.col2
----
9 values hashing to 7a3bee88c68cb011ab3d0cb5e0bd7e7c

query I rowsort
SELECT DISTINCT - + 36 FROM tab0 GROUP BY tab0.col1
----
-36

query I rowsort
SELECT DISTINCT + 28 FROM tab0 GROUP BY tab0.col0
----
28

query I rowsort
SELECT DISTINCT 82 FROM tab2 GROUP BY tab2.col0
----
82

onlyif mysql # DIV for integer division: 
query I rowsort label-7018
SELECT + - 76 DIV tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-12

skipif mysql # not compatible
query I rowsort label-7018
SELECT + - 76 / tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-12

query I rowsort
SELECT ALL 22 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
22
22
22

query I rowsort
SELECT ALL + 84 * tab0.col2 + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
2040
3230
6715

query I rowsort
SELECT ALL 42 FROM tab1 GROUP BY col0
----
42
42
42

query I rowsort
SELECT + - 18 * 92 FROM tab1 GROUP BY tab1.col2
----
-1656
-1656
-1656

query I rowsort
SELECT ALL - col1 AS col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
22
28
82

query I rowsort
SELECT 43 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
43
43
43

query I rowsort
SELECT 81 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
81
81
81

query I rowsort
SELECT ALL + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 6 AS col2 FROM tab2 GROUP BY col0
----
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 71 col2 FROM tab0 GROUP BY tab0.col0
----
71
71
71

query I rowsort
SELECT 54 FROM tab0 GROUP BY tab0.col2
----
54
54
54

query I rowsort
SELECT ALL + 37 FROM tab0 GROUP BY tab0.col1
----
37
37

query I rowsort
SELECT ( 35 ) + + 61 * col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
2719
3512
401

query I rowsort
SELECT - tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL < NULL
----

query I rowsort
SELECT ALL tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING ( NULL ) <> + col1 + tab1.col1
----

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NULL < NULL
----

query I rowsort
SELECT ALL + col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT - 78 FROM tab1 GROUP BY tab1.col1
----
-78

query I rowsort
SELECT - 30 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2460
-660
-840

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL 98 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT - + tab0.col2 * + 92 AS col2 FROM tab0 GROUP BY tab0.col2
----
-2208
-3496
-7268

query I rowsort
SELECT ALL - 97 FROM tab1 AS cor0 GROUP BY col2
----
-97
-97
-97

query I rowsort
SELECT DISTINCT 91 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
91

query I rowsort
SELECT - cor0.col1 * + col2 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2622
-3168
-54

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - cor0.col1 + + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-12
2
27

query I rowsort
SELECT - tab0.col0 * 34 FROM tab0 GROUP BY tab0.col0
----
-1462
-2822
-884

query I rowsort
SELECT cor0.col1 - 55 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-14
4
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col2 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL + 67 - - cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
125
146
154

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 26 col1 FROM tab2 AS cor0 GROUP BY col2
----
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 82 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1260
-176
-5822

query I rowsort
SELECT + 55 AS col1 FROM tab0 GROUP BY tab0.col0
----
55
55
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 4 col2 FROM tab2 cor0 GROUP BY cor0.col0, col0
----
4
4
4

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT ALL + - tab2.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 col2 col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT cor0.col1 * - cor0.col1 + + cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1 HAVING NULL = NULL
----

query I rowsort
SELECT DISTINCT 31 FROM tab1 cor0 GROUP BY cor0.col1
----
31

query I rowsort
SELECT col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT + cor0.col2 * + 15 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1185
360
570

onlyif mysql # DIV for integer division: 
query I rowsort label-7063
SELECT cor0.col0 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7063
SELECT cor0.col0 / - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-1
-1
-1

query I rowsort
SELECT - 15 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-15
-15
-15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + + cor0.col1 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
162

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7066
SELECT DISTINCT cor0.col0 / CAST( NULL AS SIGNED ) col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col0
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7066
SELECT DISTINCT cor0.col0 / CAST ( NULL AS INTEGER ) col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col0
----
NULL

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT + + 69 * - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-1035
-6279
-6348

query I rowsort
SELECT - 87 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-87
-87
-87

query I rowsort
SELECT + ( col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT 12 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
12
12
12

query I rowsort
SELECT DISTINCT 86 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
86

query I rowsort
SELECT DISTINCT - 88 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-88

query I rowsort
SELECT - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - col2 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT + 96 FROM tab0 GROUP BY tab0.col1
----
96
96

query I rowsort
SELECT DISTINCT - col2 * 26 FROM tab0 GROUP BY tab0.col2
----
-2054
-624
-988

query I rowsort
SELECT + 84 FROM tab1 AS cor0 GROUP BY col0
----
84
84
84

query I rowsort
SELECT - 39 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-39
-39
-39

query I rowsort
SELECT - col0 + 62 AS col1 FROM tab1 GROUP BY tab1.col0
----
-20
34
40

query I rowsort
SELECT + col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2378
4661
5307

query I rowsort
SELECT + 21 FROM tab0 GROUP BY tab0.col0
----
21
21
21

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7085
SELECT ALL - CAST( - 11 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
11
11
11

skipif mysql # not compatible
query I rowsort label-7085
SELECT ALL - CAST ( - 11 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
11
11
11

query I rowsort
SELECT DISTINCT 13 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
13

onlyif mysql # DIV for integer division: 
query I rowsort label-7087
SELECT + 64 + - cor0.col0 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
63
63
63

skipif mysql # not compatible
query I rowsort label-7087
SELECT + 64 + - cor0.col0 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
63
63
63

query I rowsort
SELECT - cor0.col1 + cor0.col1 * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
126
1539
3564

query I rowsort
SELECT DISTINCT - tab1.col2 + + tab1.col2 FROM tab1 GROUP BY col2
----
0

query I rowsort
SELECT tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT 52 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
109
58
96

query I rowsort
SELECT + 63 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
63
63
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 62 col0 FROM tab2 cor0 GROUP BY col0
----
62

query I rowsort
SELECT + col0 * - 2 AS col1 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

query I rowsort
SELECT + 80 FROM tab0 GROUP BY tab0.col0
----
80
80
80

onlyif mysql # DIV for integer division: 
query I rowsort label-7096
SELECT DISTINCT - cor0.col2 DIV 45 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-7096
SELECT DISTINCT - cor0.col2 / 45 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7097
SELECT - 67 DIV cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-7097
SELECT - 67 / cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-2
-3
0

query I rowsort
SELECT - 80 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-80
-80
-80

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7099
SELECT DISTINCT + CAST( NULL AS DECIMAL ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-7099
SELECT DISTINCT + CAST ( NULL AS REAL ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL

query I rowsort
SELECT ALL cor0.col2 * - 21 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1491
-168
-945

query I rowsort
SELECT DISTINCT - 64 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-64

query I rowsort
SELECT + 47 AS col2 FROM tab0 GROUP BY tab0.col1
----
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + cor0.col2 * + 44 FROM tab2 cor0 GROUP BY cor0.col2
----
2552
3476
3828

query I rowsort
SELECT - 75 FROM tab0 GROUP BY tab0.col1
----
-75
-75

query I rowsort
SELECT ALL cor0.col2 * cor0.col0 - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1232
154
5740

query I rowsort
SELECT DISTINCT + 92 AS col0 FROM tab2 cor0 GROUP BY col0
----
92

query I rowsort
SELECT ALL 80 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
80
80
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 * - col2 col0 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, col0
----
41
59
61

query I rowsort
SELECT ALL + 5 AS col0 FROM tab2 GROUP BY tab2.col2
----
5
5
5

query I rowsort
SELECT cor0.col1 * - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1, cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT - - tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - 2 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-2
-2
-2

query I rowsort
SELECT DISTINCT + col0 + - tab2.col0 * + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-210
-8190
-8372

query I rowsort
SELECT ALL + tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY col0 HAVING NULL IS NULL
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - 2 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-2

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + 99 + tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
180
99

onlyif mysql # DIV for integer division: 
query I rowsort label-7123
SELECT + 52 DIV tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-7123
SELECT + 52 / tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
3

query I rowsort
SELECT + - ( tab1.col2 ) FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT - 19 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-19
-19

query I rowsort
SELECT DISTINCT - - 65 FROM tab2 GROUP BY tab2.col0
----
65

query I rowsort
SELECT ALL 79 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-81
0
0

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT + 40 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
40

query I rowsort
SELECT - 16 * col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1136
-128
-720

query I rowsort
SELECT DISTINCT - 90 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-90

query I rowsort
SELECT 17 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
17
17
17

query I rowsort
SELECT - tab0.col0 * 71 FROM tab0 GROUP BY tab0.col0
----
-1846
-3053
-5893

query I rowsort
SELECT + + tab0.col1 * 65 FROM tab0 GROUP BY tab0.col1
----
0
5265

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * 93 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2232
3534
7347

query I rowsort
SELECT ALL - cor0.col1 * + 12 FROM tab2 AS cor0 GROUP BY col1
----
-492
-708
-732

query I rowsort
SELECT DISTINCT + - 99 AS col0 FROM tab2 GROUP BY tab2.col1
----
-99

onlyif mysql # DIV for integer division: 
query I rowsort label-7139
SELECT 49 DIV - col1 + + 53 FROM tab1 GROUP BY col1
----
45
52
53

skipif mysql # not compatible
query I rowsort label-7139
SELECT 49 / - col1 + + 53 FROM tab1 GROUP BY col1
----
45
52
53

query I rowsort
SELECT ALL - 34 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
-34
-34
-34

query I rowsort
SELECT ALL 13 FROM tab0 GROUP BY col2
----
13
13
13

query I rowsort
SELECT DISTINCT - 95 FROM tab2 GROUP BY tab2.col0
----
-95

query I rowsort
SELECT ALL - 30 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-30
-30
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col1 col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT - col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT - tab2.col0 * + 17 FROM tab2 GROUP BY tab2.col0
----
-1547
-1564
-255

query I rowsort
SELECT + + NULLIF ( - 33, + tab2.col0 ) FROM tab2 GROUP BY col0
----
-33
-33
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT 31 AS col1 FROM tab1 GROUP BY col2
----
31
31
31

query I rowsort
SELECT - 52 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2288
2964
312

query I rowsort
SELECT - col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT 1 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - 70 FROM tab1 GROUP BY tab1.col1
----
-70

query I rowsort
SELECT DISTINCT + NULLIF ( col1, 89 ) FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL - NULLIF ( cor0.col1, 29 / - col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - 22 * - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2002
2024
330

query I rowsort
SELECT ALL 69 FROM tab2 GROUP BY tab2.col2
----
69
69
69

query I rowsort
SELECT ALL 83 FROM tab0 GROUP BY col2
----
83
83
83

query I rowsort
SELECT 1 + + 61 AS col2 FROM tab2 GROUP BY col1
----
62
62
62

query I rowsort
SELECT DISTINCT - 60 * cor0.col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-3480
-4740
-5220

query I rowsort
SELECT DISTINCT 17 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
58
76
78

query I rowsort
SELECT - 97 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-97
-97
-97

query I rowsort
SELECT + 54 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
54
54
54

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7165
SELECT - CAST( NULL AS SIGNED ) - 5 AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7165
SELECT - CAST ( NULL AS INTEGER ) - 5 AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ( + tab2.col1 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + 25 AS col1 FROM tab0 GROUP BY tab0.col0
----
25
25
25

onlyif mysql # DIV for integer division: 
query I rowsort label-7168
SELECT DISTINCT - tab1.col1 DIV tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1

skipif mysql # not compatible
query I rowsort label-7168
SELECT DISTINCT - tab1.col1 / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1

query I rowsort
SELECT 66 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 17 * - cor0.col2 col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-1207
-136
-765

query I rowsort
SELECT + tab0.col1 * - tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT + tab0.col0 * col0 AS col2 FROM tab0 GROUP BY tab0.col0 HAVING NOT ( tab0.col0 ) < NULL
----

query I rowsort
SELECT DISTINCT ( - ( - 57 ) ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
57

query I rowsort
SELECT + tab2.col0 * col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 98 col1 FROM tab0 GROUP BY tab0.col1
----
-98

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 * col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
240
8372
8556

query I rowsort
SELECT DISTINCT 39 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
39

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
22
28
82

query I rowsort
SELECT cor0.col0 * 19 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1558
418
532

query I rowsort
SELECT + ( 27 ) FROM tab0 GROUP BY tab0.col0
----
27
27
27

query I rowsort
SELECT DISTINCT + COALESCE ( + tab1.col0, + tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + 66 FROM tab1 GROUP BY tab1.col0
----
66
66
66

query I rowsort
SELECT + 32 FROM tab0 GROUP BY tab0.col2
----
32
32
32

query I rowsort
SELECT DISTINCT + 86 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
86

query I rowsort
SELECT + 36 FROM tab0 GROUP BY tab0.col2
----
36
36
36

query I rowsort
SELECT - 4 AS col0 FROM tab0 GROUP BY tab0.col0
----
-4
-4
-4

query I rowsort
SELECT 62 AS col1 FROM tab0 GROUP BY tab0.col2
----
62
62
62

query I rowsort
SELECT 79 FROM tab2 GROUP BY tab2.col2
----
79
79
79

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT DISTINCT 31 * cor0.col1 + + 36 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1400
1803
222

query I rowsort
SELECT - 72 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-72
-72
-72

query I rowsort
SELECT + 70 AS col0 FROM tab1 GROUP BY tab1.col1
----
70
70
70

query I rowsort
SELECT ALL - 82 FROM tab0 GROUP BY tab0.col1
----
-82
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-7194
SELECT tab1.col1 DIV tab1.col1 FROM tab1 GROUP BY col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7194
SELECT tab1.col1 / tab1.col1 FROM tab1 GROUP BY col1
----
1
1
1

query I rowsort
SELECT ALL cor0.col0 * 95 FROM tab0 AS cor0 GROUP BY col0
----
2470
4085
7885

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 + + tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT ALL + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + tab1.col0 + 5 FROM tab1 GROUP BY tab1.col0
----
27
33
87

query I rowsort
SELECT ALL col2 + - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL + 93 AS col2 FROM tab0 cor0 GROUP BY col1
----
93
93

query I rowsort
SELECT ALL + - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT 78 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
78
78
78

query I rowsort
SELECT DISTINCT 40 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
40

onlyif mysql # DIV for integer division: 
query I rowsort label-7204
SELECT - 52 DIV col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7204
SELECT - 52 / col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 52 AS col1 FROM tab2 GROUP BY tab2.col2
----
52

query I rowsort
SELECT - 60 FROM tab1 GROUP BY col1
----
-60
-60
-60

query I rowsort
SELECT ALL 77 * - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
-3157
-4543
-4697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * cor0.col1 col0 FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT NULLIF ( 30, - col2 + cor0.col2 ) * 8 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
240
240
240

query I rowsort
SELECT DISTINCT + 31 * cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
2542
682
868

query I rowsort
SELECT tab0.col1 - + tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6480
0

query I rowsort
SELECT ALL cor0.col0 + - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 20 FROM tab0 cor0 GROUP BY cor0.col0
----
20

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7214
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-7214
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT 6 - - cor0.col0 * - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-219
-8275
-8458

query I rowsort
SELECT DISTINCT col0 * - col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-132
-1596
-3608

query I rowsort
SELECT - 25 FROM tab1 GROUP BY tab1.col1
----
-25
-25
-25

query I rowsort
SELECT ALL + cor0.col0 + + col0 FROM tab2 cor0 GROUP BY col0
----
182
184
30

query I rowsort
SELECT 90 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT ALL + cor1.col2 AS col2 FROM tab2 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 + tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - tab1.col2 * + 33 FROM tab1 GROUP BY tab1.col2
----
-1485
-2343
-264

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 31 col2 FROM tab0 cor0 GROUP BY col0
----
31
31
31

query I rowsort
SELECT DISTINCT 87 * col1 - 17 * - 73 FROM tab0 GROUP BY tab0.col1
----
1241
8288

query I rowsort
SELECT DISTINCT + 77 AS col2 FROM tab2 GROUP BY tab2.col1
----
77

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT + tab0.col1 - col1 * - tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT ( tab0.col1 + col1 ) IS NULL
----
0
6642

query I rowsort
SELECT - tab0.col1 + col1 AS col0 FROM tab0 GROUP BY tab0.col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL - col1 * - 80 FROM tab2 cor0 GROUP BY cor0.col1
----
3280
4720
4880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + NULLIF ( cor0.col0, + cor0.col1 ) col1 FROM tab0 AS cor0 GROUP BY col0, col1
----
26
43
83

query I rowsort
SELECT DISTINCT 14 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
14

query I rowsort
SELECT ALL - 90 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-90
-90
-90

query I rowsort
SELECT + 31 AS col2 FROM tab2 GROUP BY tab2.col0
----
31
31
31

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
162

query I rowsort
SELECT - 68 AS col1 FROM tab0 GROUP BY tab0.col2
----
-68
-68
-68

onlyif mysql # DIV for integer division: 
query I rowsort label-7236
SELECT ALL - 18 + + cor0.col2 DIV ( - 79 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-18
-19
-19

skipif mysql # not compatible
query I rowsort label-7236
SELECT ALL - 18 + + cor0.col2 / ( - 79 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-18
-19
-19

query I rowsort
SELECT + 94 FROM tab0 AS cor0 GROUP BY cor0.col1
----
94
94

query I rowsort
SELECT ALL - 25 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-25
-25
-25

query I rowsort
SELECT + - 6 + 77 * tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
1688
2150
6308

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7240
SELECT + - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7240
SELECT + - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT tab2.col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT ALL - 39 AS col1 FROM tab1 GROUP BY tab1.col1
----
-39
-39
-39

query I rowsort
SELECT - cor0.col0 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT tab2.col1 AS col1 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + 57 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
57

query I rowsort
SELECT + 6 FROM tab2 GROUP BY tab2.col2
----
6
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 26 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT - 51 - + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-132
-51

query I rowsort
SELECT ALL + - 30 FROM tab1 GROUP BY col0
----
-30
-30
-30

query I rowsort
SELECT 99 + - 96 FROM tab0 GROUP BY tab0.col1
----
3
3

query I rowsort
SELECT ALL + 10 FROM tab0 GROUP BY col2
----
10
10
10

query I rowsort
SELECT ALL 11 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
11
11
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
0
0
0

query I rowsort
SELECT DISTINCT - tab2.col1 AS col0 FROM tab2 WHERE NOT NULL = NULL GROUP BY tab2.col1
----

query I rowsort
SELECT 36 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT 34 FROM tab2 GROUP BY tab2.col2
----
34
34
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 98 col0 FROM tab1 AS cor0 GROUP BY col1
----
98
98
98

query I rowsort
SELECT tab2.col2 * 30 AS col2 FROM tab2 GROUP BY tab2.col2
----
1740
2370
2610

query I rowsort
SELECT DISTINCT 24 FROM tab1 GROUP BY tab1.col0
----
24

query I rowsort
SELECT tab1.col1 * + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL - 42 - 62 FROM tab1 GROUP BY tab1.col1
----
-104
-104
-104

query I rowsort
SELECT 92 FROM tab0 cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT DISTINCT - 70 FROM tab1 GROUP BY tab1.col2
----
-70

query I rowsort
SELECT 36 + + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
115
60
74

query I rowsort
SELECT ALL + 37 FROM tab1 AS cor0 GROUP BY cor0.col1
----
37
37
37

query I rowsort
SELECT DISTINCT + 60 FROM tab0 AS cor0 GROUP BY cor0.col1
----
60

query I rowsort
SELECT 89 FROM tab0 AS cor0 GROUP BY col1
----
89
89

onlyif mysql # DIV for integer division: 
query I rowsort label-7268
SELECT - tab0.col1 DIV 99 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-7268
SELECT - tab0.col1 / 99 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT - tab0.col0 + - 14 AS col0 FROM tab0 GROUP BY tab0.col0
----
-40
-57
-97

query I rowsort
SELECT ALL - + tab0.col0 + 90 AS col2 FROM tab0 GROUP BY tab0.col0
----
47
64
7

query I rowsort
SELECT + 52 FROM tab2 GROUP BY tab2.col0
----
52
52
52

onlyif mysql # DIV for integer division: 
query I rowsort label-7272
SELECT - + ( - 96 ) DIV tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1
1
6

skipif mysql # not compatible
query I rowsort label-7272
SELECT - + ( - 96 ) / tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1
1
6

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT + 56 + cor0.col2 * + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1500
6297
632

query I rowsort
SELECT + 47 FROM tab0 cor0 GROUP BY cor0.col0
----
47
47
47

query I rowsort
SELECT DISTINCT + 2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2

query I rowsort
SELECT ALL - col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + 72 AS col0 FROM tab0 GROUP BY tab0.col2
----
72

query I rowsort
SELECT - + col2 + - 7 FROM tab1 GROUP BY col2
----
-15
-52
-78

query I rowsort
SELECT ALL cor0.col0 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1305
5336
7189

query I rowsort
SELECT - 27 AS col2 FROM tab0 GROUP BY tab0.col2
----
-27
-27
-27

query I rowsort
SELECT 43 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
134
135
58

query I rowsort
SELECT 6 FROM tab1 AS cor0 GROUP BY col2
----
6
6
6

onlyif mysql # DIV for integer division: 
query I rowsort label-7284
SELECT cor0.col1 DIV col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7284
SELECT cor0.col1 / col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT + 8 FROM tab2 GROUP BY tab2.col2
----
8
8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 44 * + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1056
1672
3476

query I rowsort
SELECT DISTINCT + 26 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
26

query I rowsort
SELECT - 34 AS col1 FROM tab1 GROUP BY tab1.col2
----
-34
-34
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col1 * - 15 col2 FROM tab0 GROUP BY tab0.col1
----
0
1215

query I rowsort
SELECT DISTINCT - cor0.col2 - 73 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-118
-144
-81

query I rowsort
SELECT - cor0.col1 * - cor0.col1 + - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
1640
3422
3660

onlyif mysql # DIV for integer division: 
query I rowsort label-7293
SELECT DISTINCT 45 DIV 92 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-7293
SELECT DISTINCT 45 / 92 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT + 62 - - 34 FROM tab0 AS cor0 GROUP BY cor0.col0
----
96
96
96

query I rowsort
SELECT ALL - 29 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-29
-29
-29

query I rowsort
SELECT ALL + 39 AS col0 FROM tab0 GROUP BY tab0.col1
----
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 6 col1 FROM tab2 GROUP BY tab2.col0
----
-6
-6
-6

query I rowsort
SELECT - 99 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-99
-99
-99

query I rowsort
SELECT DISTINCT 69 FROM tab2 AS cor0 GROUP BY cor0.col2
----
69

query I rowsort
SELECT 93 FROM tab2 cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab2.col0 * + tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL tab2.col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT ALL 17 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
17
17

query I rowsort
SELECT ALL - cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-484
-6724
-784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 79 * + cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
0
0
6399

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7307
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7307
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 * col0 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT + CASE cor0.col1 WHEN - cor0.col2 THEN + cor0.col2 WHEN + cor0.col1 THEN - cor0.col2 ELSE NULL END FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT + 7 + 39 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
46
46
46

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 DISTINCT cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL + 84 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
84
84
84

query I rowsort
SELECT DISTINCT + 71 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
71

query I rowsort
SELECT ALL col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT + + col2 * + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT + 70 AS col1 FROM tab2 GROUP BY tab2.col2
----
70
70
70

query I rowsort
SELECT 20 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
20
20
20

query I rowsort
SELECT - tab2.col1 * tab2.col1 + - 85 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1766
-3566
-3806

query I rowsort
SELECT - - 16 AS col0 FROM tab1 GROUP BY tab1.col2
----
16
16
16

query I rowsort
SELECT DISTINCT - 79 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-7324
SELECT ALL NULLIF ( - cor0.col1, cor0.col1 DIV cor0.col1 ) + col1 DIV + 70 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

skipif mysql # not compatible
query I rowsort label-7324
SELECT ALL NULLIF ( - cor0.col1, cor0.col1 / cor0.col1 ) + col1 / + 70 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - 91 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-76
0
1

query I rowsort
SELECT ALL + col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 85 AS col2 FROM tab0 GROUP BY tab0.col1
----
85
85

query I rowsort
SELECT NULLIF ( - cor0.col0, - cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col0 * - 10 FROM tab0 cor0 GROUP BY cor0.col0
----
-260
-430
-830

onlyif mysql # DIV for integer division: 
query I rowsort label-7331
SELECT - + tab1.col1 DIV tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7331
SELECT - + tab1.col1 / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT 64 AS col1 FROM tab0 GROUP BY tab0.col1
----
64

query I rowsort
SELECT DISTINCT - 8 FROM tab2 GROUP BY tab2.col2
----
-8

query I rowsort
SELECT - 7 * - col1 + - 46 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1716
-2223
-234

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT + tab0.col0 - + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 94 col2 FROM tab2 GROUP BY col1
----
-94
-94
-94

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT - + tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-7341
SELECT 10 DIV cor0.col1 col0 FROM tab2 cor0 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7341
SELECT 10 / cor0.col1 col0 FROM tab2 cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT DISTINCT ( - 67 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-67

query I rowsort
SELECT - + 41 AS col0 FROM tab1 GROUP BY tab1.col1
----
-41
-41
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 26 col1 FROM tab0 GROUP BY tab0.col0
----
-26
-26
-26

query I rowsort
SELECT DISTINCT - 91 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-91

query I rowsort
SELECT DISTINCT + cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT - 44 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-44
-44
-44

query I rowsort
SELECT + 56 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
56
56
56

query I rowsort
SELECT 65 FROM tab1 GROUP BY tab1.col0
----
65
65
65

query I rowsort
SELECT 82 FROM tab0 GROUP BY tab0.col1
----
82
82

query I rowsort
SELECT ALL tab1.col2 * + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT ALL cor0.col2 + + cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT col1 + col1 FROM tab2 GROUP BY col1
----
118
122
82

query I rowsort
SELECT DISTINCT - tab0.col0 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT - + 84 FROM tab1 GROUP BY tab1.col0
----
-84
-84
-84

query I rowsort
SELECT 14 * 58 AS col2 FROM tab1 GROUP BY tab1.col1
----
812
812
812

query I rowsort
SELECT 68 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
68
68
68

query I rowsort
SELECT DISTINCT 9 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
9

query I rowsort
SELECT ALL + cor0.col0 * + 2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

onlyif mysql # DIV for integer division: 
query I rowsort label-7360
SELECT DISTINCT - 66 DIV cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-7360
SELECT DISTINCT - 66 / cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-1

query I rowsort
SELECT - - tab1.col1 + 52 * - col1 AS col2 FROM tab1 GROUP BY col1
----
-2244
-2907
-306

query I rowsort
SELECT DISTINCT cor0.col1 + 76 * col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
6237

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-7364
SELECT COALESCE ( 82, tab2.col1 + - NULLIF ( - tab2.col0, tab2.col2 ) DIV tab2.col2, tab2.col2 + + 98 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
82
82
82

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-7364
SELECT COALESCE ( 82, tab2.col1 + - NULLIF ( - tab2.col0, tab2.col2 ) / tab2.col2, tab2.col2 + + 98 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
82
82
82

query I rowsort
SELECT DISTINCT + + CASE + tab1.col2 WHEN + tab1.col2 THEN NULL ELSE ( col2 ) + tab1.col2 * + tab1.col2 END AS col1 FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT - + 47 FROM tab0 GROUP BY tab0.col0
----
-47
-47
-47

query I rowsort
SELECT 22 * - col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1298
-1342
-902

query I rowsort
SELECT - + 41 * - 33 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1394
1412
1414

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7369
SELECT + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7369
SELECT + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT 88 FROM tab0 GROUP BY tab0.col0
----
88

query I rowsort
SELECT ALL 70 + + 6 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
418
544
592

onlyif mysql # DIV for integer division: 
query I rowsort label-7372
SELECT ALL - col1 * + COALESCE ( 14, - col0 DIV tab2.col2 ) FROM tab2 GROUP BY tab2.col1
----
-574
-826
-854

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-7372
SELECT ALL - col1 * + COALESCE ( 14, - col0 / tab2.col2 ) FROM tab2 GROUP BY tab2.col1
----
-574
-826
-854

query I rowsort
SELECT ALL 62 - - 5 FROM tab0 GROUP BY tab0.col1
----
67
67

query I rowsort
SELECT ALL + 45 FROM tab1 GROUP BY tab1.col1
----
45
45
45

query I rowsort
SELECT ALL - - tab2.col1 + col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT cor0.col0 - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-17
11
14

query I rowsort
SELECT ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
24
38
79

query I rowsort
SELECT + 58 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
58
58

query I rowsort
SELECT ALL 35 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
35
35
35

query I rowsort
SELECT ALL col2 + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT + 67 FROM tab2 cor0 GROUP BY cor0.col1
----
67
67
67

onlyif mysql # DIV for integer division: 
query I rowsort label-7382
SELECT + 76 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
9

skipif mysql # not compatible
query I rowsort label-7382
SELECT + 76 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
9

query I rowsort
SELECT DISTINCT + tab0.col1 + + 1 AS col1 FROM tab0 GROUP BY tab0.col1
----
1
82

query I rowsort
SELECT cor0.col0 - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 * - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT + 2 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
2
2
2

query I rowsort
SELECT + 72 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
72
72
72

query I rowsort
SELECT ALL 89 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
115
132
172

query I rowsort
SELECT ALL - - 15 FROM tab2 GROUP BY tab2.col2
----
15
15
15

query I rowsort
SELECT ALL + 71 + + col0 FROM tab1 GROUP BY tab1.col0
----
153
93
99

query I rowsort
SELECT DISTINCT 42 - - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
113
50
87

query I rowsort
SELECT cor0.col2 * cor0.col2 + 40 FROM tab2 AS cor0 GROUP BY col2
----
3404
6281
7609

query I rowsort
SELECT DISTINCT - 29 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-29

query I rowsort
SELECT ALL cor0.col1 FROM tab0 cor0 GROUP BY col1, cor0.col0, cor0.col2
----
0
0
81

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 + col0 * ( 16 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1312
352
448

query I rowsort
SELECT DISTINCT 58 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col0
----
58

query I rowsort
SELECT DISTINCT 66 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
66

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-7400
SELECT DISTINCT col2 DIV tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
1

skipif mysql # not compatible
query I rowsort label-7400
SELECT DISTINCT col2 / tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
1

query I rowsort
SELECT + - tab1.col1 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT + NULLIF ( cor0.col0, ( cor0.col2 ) ) FROM tab2 AS cor0 GROUP BY cor0.col2, col0, col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-7403
SELECT col2 DIV 40 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7403
SELECT col2 / 40 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
1

query I rowsort
SELECT DISTINCT + 84 FROM tab2 GROUP BY tab2.col0
----
84

query I rowsort
SELECT 55 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
55
55
55

query I rowsort
SELECT ALL + NULLIF ( + tab2.col1, + tab2.col1 ) * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-7408
SELECT + - 1 DIV tab2.col1 FROM tab2 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7408
SELECT + - 1 / tab2.col1 FROM tab2 GROUP BY col1
----
0
0
0

query I rowsort
SELECT ALL + tab2.col2 + + 30 FROM tab2 GROUP BY tab2.col2
----
109
117
88

query I rowsort
SELECT + + tab2.col2 * 81 AS col1 FROM tab2 GROUP BY tab2.col2
----
4698
6399
7047

query I rowsort
SELECT - + tab2.col0 - + 68 * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1005
6097
6164

query I rowsort
SELECT 72 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
72
72
72

onlyif mysql # DIV for integer division: 
query I rowsort label-7413
SELECT - - tab1.col1 DIV + 99 AS col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7413
SELECT - - tab1.col1 / + 99 AS col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT - tab2.col1 * + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT - col2 * col2 + 11 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-4002
-7110
-8526

query I rowsort
SELECT ALL 65 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT DISTINCT 24 AS col2 FROM tab1 GROUP BY tab1.col0
----
24

query I rowsort
SELECT 41 FROM tab2 GROUP BY tab2.col0
----
41
41
41

query I rowsort
SELECT 24 FROM tab0 GROUP BY tab0.col0
----
24
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 + - tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL tab0.col1 * tab0.col1 AS col1 FROM tab0 WHERE NOT NULL > NULL GROUP BY tab0.col1
----

onlyif mysql # DIV for integer division: 
query I rowsort label-7422
SELECT ALL - cor0.col1 * col1 - col1 DIV - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
-1680
-3480
-3720

skipif mysql # not compatible
query I rowsort label-7422
SELECT ALL - cor0.col1 * col1 - col1 / - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
-1680
-3480
-3720

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + 25 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
25
25
25

query I rowsort
SELECT DISTINCT - tab2.col0 * - tab2.col0 + + 65 AS col2 FROM tab2 GROUP BY tab2.col0
----
290
8346
8529

onlyif mysql # DIV for integer division: 
query I rowsort label-7427
SELECT + NULLIF ( cor0.col0, 54 ) DIV cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7427
SELECT + NULLIF ( cor0.col0, 54 ) / cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * - col2 col2 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT + 15 FROM tab2 GROUP BY tab2.col1
----
15
15
15

query I rowsort
SELECT + + 49 FROM tab0 GROUP BY tab0.col1
----
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 col0 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT ALL cor0.col1 + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
118
122
82

query I rowsort
SELECT ALL - 94 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-94
-94
-94

query I rowsort
SELECT ALL - 9 AS col0 FROM tab1 GROUP BY tab1.col1
----
-9
-9
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col0 FROM tab2 AS cor0 GROUP BY col0, col1
----
41
59
61

query I rowsort
SELECT ALL tab1.col2 + 38 AS col0 FROM tab1 GROUP BY tab1.col2
----
109
46
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL 53 AS col2 FROM tab0 GROUP BY tab0.col1
----
53
53

query I rowsort
SELECT ALL - 17 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-17
-17
-17

query I rowsort
SELECT DISTINCT + + 24 + - 14 AS col0 FROM tab2 GROUP BY tab2.col0
----
10

query I rowsort
SELECT DISTINCT - + 16 AS col0 FROM tab0 GROUP BY col0
----
-16

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab2 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.col0, - cor0.col0 * cor0.col0 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
26
43
83

query I rowsort
SELECT + col2 * 63 FROM tab1 GROUP BY tab1.col2
----
2835
4473
504

query I rowsort
SELECT ALL + 16 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
16
16
16

query I rowsort
SELECT + - col0 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col2 FROM tab0 GROUP BY col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT + tab1.col2 + - col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( + 64, col0 ) AS col2 FROM tab2 AS cor0 GROUP BY col1
----
64
64
64

query I rowsort
SELECT ALL + cor0.col1 * - 15 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-1215
0

query I rowsort
SELECT + 76 + - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
19
32
70

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT - + 56 FROM tab0 GROUP BY tab0.col1
----
-56

onlyif mysql # DIV for integer division: 
query I rowsort label-7455
SELECT DISTINCT + tab2.col0 DIV + 49 FROM tab2 GROUP BY tab2.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-7455
SELECT DISTINCT + tab2.col0 / + 49 FROM tab2 GROUP BY tab2.col0
----
0
1

query I rowsort
SELECT ALL - 24 AS col0 FROM tab2 GROUP BY tab2.col0
----
-24
-24
-24

query I rowsort
SELECT DISTINCT 86 * + cor1.col0 AS col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
2236
3698
7138

query I rowsort
SELECT DISTINCT tab1.col0 + 16 FROM tab1 GROUP BY tab1.col0
----
38
44
98

query I rowsort
SELECT DISTINCT + cor0.col0 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
182
184
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 24 col0 FROM tab2 GROUP BY tab2.col2
----
24

query I rowsort
SELECT ALL + - 29 AS col1 FROM tab2 GROUP BY tab2.col1
----
-29
-29
-29

query I rowsort
SELECT DISTINCT - ( tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + - 49 * - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1176
1862
3871

query I rowsort
SELECT DISTINCT + - 62 * 76 AS col0 FROM tab0 GROUP BY tab0.col1
----
-4712

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 91 col0 FROM tab1 cor0 GROUP BY cor0.col0
----
91

query I rowsort
SELECT + - tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT - ( + tab2.col2 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT + 71 FROM tab1 GROUP BY tab1.col2
----
71
71
71

query I rowsort
SELECT + 0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-7471
SELECT ALL - 47 DIV cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7471
SELECT ALL - 47 / cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
0
0

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 50 - + 51 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1

query I rowsort
SELECT + 90 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
5220
7110
7830

onlyif mysql # DIV for integer division: 
query I rowsort label-7475
SELECT DISTINCT + 30 DIV tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
0
2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7475
SELECT DISTINCT + 30 / tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
0
2

query I rowsort
SELECT + ( + 7 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
7
7
7

query I rowsort
SELECT DISTINCT - ( col1 ) FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT 81 FROM tab0 GROUP BY tab0.col1
----
81

query I rowsort
SELECT + cor0.col1 * - 88 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-7128
0

query I rowsort
SELECT + 20 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
20
20
20

query I rowsort
SELECT + 39 FROM tab1 GROUP BY tab1.col2
----
39
39
39

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-7482
SELECT ALL + + CAST( - 34 AS SIGNED ) DIV tab1.col2 + - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-12
-45
-71

skipif mysql # not compatible
query I rowsort label-7482
SELECT ALL + + CAST ( - 34 AS INTEGER ) / tab1.col2 + - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-12
-45
-71

query I rowsort
SELECT DISTINCT - + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 93 AS col1 FROM tab1 GROUP BY col0
----
93

query I rowsort
SELECT - tab2.col0 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 94 * + col0 FROM tab0 cor0 GROUP BY cor0.col0
----
2444
4042
7802

query I rowsort
SELECT ALL - 41 FROM tab2 GROUP BY col2
----
-41
-41
-41

query I rowsort
SELECT DISTINCT 27 AS col0 FROM tab0 GROUP BY tab0.col0
----
27

query I rowsort
SELECT ALL - 31 + - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-102
-39
-76

query I rowsort
SELECT - ( cor1.col2 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.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 - 34 + cor0.col2 * + 56 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
3214
4390
4838

query I rowsort
SELECT ( + cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7494
SELECT - CAST( - 82 AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
82
82
82

skipif mysql # not compatible
query I rowsort label-7494
SELECT - CAST ( - 82 AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT ALL - NULLIF ( - 56, - cor1.col2 - 34 ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
56
56
56

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col1
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 68 + + 64 col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-4

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 - + cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-182
-184
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col1 FROM tab1 AS cor0 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT 70 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * cor0.col2 + - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-3422
-6320
-7656

onlyif mysql # DIV for integer division: 
query I rowsort label-7504
SELECT ALL 5 DIV + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7504
SELECT ALL 5 / + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + 31 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
31
31
31

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 73 * col0 FROM tab1 AS cor0 GROUP BY col0
----
-1606
-2044
-5986

query I rowsort
SELECT ALL 97 + col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
119
125
179

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT tab0.col0 + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL + 17 * - cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
-1377
0

query I rowsort
SELECT DISTINCT + + tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL 55 AS col1 FROM tab1 GROUP BY tab1.col1
----
55
55
55

query I rowsort
SELECT ALL - - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL 74 AS col1 FROM tab2 GROUP BY tab2.col1
----
74
74
74

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0, cor0.col1
----
58
79
87

query I rowsort
SELECT + tab2.col1 - 13 AS col0 FROM tab2 GROUP BY col1
----
28
46
48

query I rowsort
SELECT ALL 20 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
20
20
20

query I rowsort
SELECT - 57 FROM tab2 cor0 GROUP BY cor0.col0
----
-57
-57
-57

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 DISTINCT + + tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL 2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
158
48
76

query I rowsort
SELECT + + 39 FROM tab2 GROUP BY tab2.col1
----
39
39
39

query I rowsort
SELECT ALL tab1.col2 * tab1.col2 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - + tab1.col1 * - tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT 7 AS col2 FROM tab0 GROUP BY tab0.col1
----
7
7

query I rowsort
SELECT + cor0.col2 + - col2 FROM tab0 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT DISTINCT 13 AS col0 FROM tab1 GROUP BY tab1.col2
----
13

query I rowsort
SELECT DISTINCT - 76 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
-76

query I rowsort
SELECT ALL - 95 AS col2 FROM tab1 GROUP BY tab1.col0
----
-95
-95
-95

query I rowsort
SELECT ALL + 73 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
73
73
73

query I rowsort
SELECT cor0.col2 * + 1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 6 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-6
-6
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT - 57 AS col2 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
-57
-57
-57

query I rowsort
SELECT ALL - 96 * + cor1.col0 AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-1440
-8736
-8832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT col0 IS NULL
----
15
91
92

query I rowsort
SELECT DISTINCT + tab0.col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NOT NULL
----
158
48
76

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL 3 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3
3
3

query I rowsort
SELECT ALL 45 AS col2 FROM tab0 GROUP BY col0
----
45
45
45

query I rowsort
SELECT DISTINCT + - tab1.col1 * tab1.col1 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL + tab0.col0 + - tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1806
-650
-6806

query I rowsort
SELECT - 64 * - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
5184

query I rowsort
SELECT cor0.col1 + cor0.col1 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
6642

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT DISTINCT col0 * 87 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1914
2436
7134

query I rowsort
SELECT DISTINCT + tab2.col0 * - tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT + 30 AS col1 FROM tab0 GROUP BY col1
----
30

query I rowsort
SELECT ALL + ( + 40 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
40
40
40

query I rowsort
SELECT ALL + 42 AS col1 FROM tab0 GROUP BY tab0.col1
----
42
42

query I rowsort
SELECT 25 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT ALL + 41 FROM tab1 AS cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT + 29 AS col2 FROM tab2 GROUP BY tab2.col2
----
29
29
29

query I rowsort
SELECT + 24 FROM tab1 GROUP BY tab1.col2
----
24
24
24

query I rowsort
SELECT ALL + + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT 47 + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
129
69
75

query I rowsort
SELECT ALL + col0 * 5 FROM tab2 GROUP BY tab2.col0
----
455
460
75

query I rowsort
SELECT 98 FROM tab1 AS cor0 GROUP BY col2
----
98
98
98

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 - 65 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-65
-65
-65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL tab1.col0 + + 10 FROM tab1 GROUP BY col0
----
32
38
92

query I rowsort
SELECT + tab2.col1 * 41 AS col0 FROM tab2 GROUP BY tab2.col1
----
1681
2419
2501

query I rowsort
SELECT ALL cor0.col2 * + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
1944

query I rowsort
SELECT DISTINCT + tab1.col1 - + tab1.col1 * + tab1.col1 FROM tab1 GROUP BY col1
----
-1892
-30
-3192

onlyif mysql # DIV for integer division: 
query I rowsort label-7571
SELECT ALL - - tab1.col1 DIV - 93 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7571
SELECT ALL - - tab1.col1 / - 93 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT 19 AS col1 FROM tab1 GROUP BY col2
----
19
19
19

query I rowsort
SELECT + 78 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT cor0.col1 + NULLIF ( cor0.col1, + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 48 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-48
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 70 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
70
70
70

query I rowsort
SELECT ALL + NULLIF ( tab2.col1, tab2.col1 * + tab2.col1 ) AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT 66 - - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
124
145
153

query I rowsort
SELECT DISTINCT - cor0.col0 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-164
-44
-56

query I rowsort
SELECT + 38 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1634
-3154
-988

query I rowsort
SELECT - 39 * + NULLIF ( cor0.col2, + cor0.col0 + + 69 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-1482
-3081
-936

query I rowsort
SELECT - 16 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-16
-16
-16

query I rowsort
SELECT ALL 27 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1215
1917
216

query I rowsort
SELECT COALESCE ( + cor0.col0, + cor0.col0 ) * + 57 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
5187
5244
855

query I rowsort
SELECT + cor0.col0 - 50 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-24
-7
33

query I rowsort
SELECT col2 * + col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT - 79 FROM tab0 GROUP BY col0
----
-79
-79
-79

query I rowsort
SELECT ALL + 82 FROM tab1 GROUP BY tab1.col1
----
82
82
82

query I rowsort
SELECT 40 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
40
40
40

query I rowsort
SELECT 98 FROM tab1 GROUP BY tab1.col2
----
98
98
98

query I rowsort
SELECT ALL + - tab2.col2 * + col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL 83 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
105
111
165

query I rowsort
SELECT 23 AS col0 FROM tab0 GROUP BY tab0.col1
----
23
23

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7594
SELECT ALL cor0.col0 + - CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7594
SELECT ALL cor0.col0 + - CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT 34 - 76 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-42

query I rowsort
SELECT ALL + cor0.col0 + col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
153
30
73

query I rowsort
SELECT ( 40 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
40
40
40

query I rowsort
SELECT - + tab2.col2 * + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT - 66 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-66

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab2 cor0 GROUP BY col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab0.col0 * + 94 col0 FROM tab0 GROUP BY tab0.col0
----
2444
4042
7802

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
41
59
61

query I rowsort
SELECT ALL col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT DISTINCT 90 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
90

query I rowsort
SELECT DISTINCT 91 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5278
7189
7917

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL tab2.col1 - COALESCE ( 60, + tab2.col0, CASE + 87 WHEN tab2.col2 THEN - col2 END * - 64, + tab2.col1 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
-1
-19
1

query I rowsort
SELECT ALL 13 + + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
39
56
96

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7609
SELECT DISTINCT - CAST( + 52 AS SIGNED ) FROM tab2 AS cor0 GROUP BY col1
----
-52

skipif mysql # not compatible
query I rowsort label-7609
SELECT DISTINCT - CAST ( + 52 AS INTEGER ) FROM tab2 AS cor0 GROUP BY col1
----
-52

query I rowsort
SELECT + 85 * + col0 FROM tab2 GROUP BY tab2.col0
----
1275
7735
7820

query I rowsort
SELECT 20 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
102
42
48

onlyif mysql # DIV for integer division: 
query I rowsort label-7612
SELECT DISTINCT tab2.col1 DIV - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1

skipif mysql # not compatible
query I rowsort label-7612
SELECT DISTINCT tab2.col1 / - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col1 FROM tab1 WHERE NOT ( NULL ) IS NULL GROUP BY tab1.col2
----

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT DISTINCT + - 63 FROM tab1 GROUP BY tab1.col2
----
-63

onlyif mysql # DIV for integer division: 
query I rowsort label-7617
SELECT + 93 DIV 68 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7617
SELECT + 93 / 68 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
1

query I rowsort
SELECT + 87 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT 3 + 10 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
13
13
13

query I rowsort
SELECT 71 * cor0.col2 - - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4176
5688
6264

query I rowsort
SELECT - ( 36 ) AS col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-36
-36
-36

query I rowsort
SELECT ALL - 21 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1218
1659
1827

query I rowsort
SELECT 91 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT DISTINCT + 84 FROM tab1 GROUP BY tab1.col1
----
84

query I rowsort
SELECT + 49 FROM tab0 cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT + 0 AS col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 42 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
42

query I rowsort
SELECT + col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT + - tab1.col1 + 33 * - 25 FROM tab1 GROUP BY col1
----
-831
-869
-882

query I rowsort
SELECT + tab0.col2 - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + + 78 AS col1 FROM tab0 GROUP BY tab0.col0
----
78

onlyif mysql # DIV for integer division: 
query I rowsort label-7632
SELECT DISTINCT - cor0.col0 DIV 55 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-1
0

skipif mysql # not compatible
query I rowsort label-7632
SELECT DISTINCT - cor0.col0 / 55 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-1
0

query I rowsort
SELECT 64 * + 37 + - col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
2307
2309
2327

query I rowsort
SELECT + tab1.col0 * tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT ALL - - 91 FROM tab2 GROUP BY col0
----
91
91
91

query I rowsort
SELECT 76 + + col2 * + 71 FROM tab2 AS cor0 GROUP BY col2
----
4194
5685
6253

query I rowsort
SELECT DISTINCT - tab0.col1 * - col1 AS col1 FROM tab0 GROUP BY col1
----
0
6561

query I rowsort
SELECT DISTINCT + 41 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
41

query I rowsort
SELECT - tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT + tab0.col1 FROM tab1 cor0 CROSS JOIN tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT - 70 AS col1 FROM tab2 GROUP BY tab2.col0
----
-70
-70
-70

query I rowsort
SELECT DISTINCT + + 32 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1376
2656
832

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - 6 * - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
144
228
474

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 DISTINCT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-7648
SELECT + 10 DIV cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7648
SELECT + 10 / cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
1

query I rowsort
SELECT ALL NULLIF ( + 49, tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
49
49
49

query I rowsort
SELECT - col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - cor0.col2 FROM tab0 AS cor0 WHERE NOT NULL IS NOT NULL GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - col0 * - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL NOT IN ( tab1.col0 )
----

query I rowsort
SELECT col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT ( 88 ) * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
2288
3784
7304

query I rowsort
SELECT 11 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-891
0

query I rowsort
SELECT ( cor0.col1 ) * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, col2
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 68 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-68
-68
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 80 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-80
-80
-80

query I rowsort
SELECT - 30 FROM tab1 AS cor0 GROUP BY col1
----
-30
-30
-30

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 ALL 75 FROM tab1 GROUP BY col0
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
-45
-71
-8

query I rowsort
SELECT 26 * - 40 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1040
-1040
-1040

query I rowsort
SELECT DISTINCT 10 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
10

query I rowsort
SELECT ALL - 93 FROM tab1 GROUP BY tab1.col2
----
-93
-93
-93

query I rowsort
SELECT - 95 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-95
-95
-95

query I rowsort
SELECT ALL + tab2.col2 * + 98 FROM tab2 GROUP BY tab2.col2
----
5684
7742
8526

query I rowsort
SELECT ALL NULLIF ( ( + 0 ), tab1.col1 * tab1.col1 + + 94 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT + - NULLIF ( tab2.col2, - col2 ) + 79 AS col0 FROM tab2 GROUP BY tab2.col2
----
-8
0
21

query I rowsort
SELECT ALL + tab0.col2 + + ( + tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT - tab1.col2 * ( 73 ) + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-3240
-5112
-576

query I rowsort
SELECT + 24 + 84 FROM tab1 AS cor0 GROUP BY col1
----
108
108
108

query I rowsort
SELECT DISTINCT - 77 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
-77

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL 3 * - COALESCE ( + 92, + cor0.col2 - + ( + col1 + - cor0.col1 ) * 58 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-276
-276
-276

query I rowsort
SELECT DISTINCT + 88 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
88

query I rowsort
SELECT DISTINCT 61 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
140
85
99

query I rowsort
SELECT 77 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
77
77
77

query I rowsort
SELECT - + 34 FROM tab1 GROUP BY col2
----
-34
-34
-34

query I rowsort
SELECT - 29 + + tab0.col2 FROM tab0 GROUP BY col2
----
-5
50
9

query I rowsort
SELECT tab0.col0 * - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT + 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 + col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT - cor0.col0 - 37 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-128
-129
-52

query I rowsort
SELECT cor0.col1 + col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
114
12
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 col1 FROM tab0 GROUP BY col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-7688
SELECT ALL + col0 DIV + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7688
SELECT ALL + col0 / + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6480
0

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 46 - tab1.col1 * ( tab1.col1 ) col2 FROM tab1 GROUP BY tab1.col1
----
-1982
-3295
-82

query I rowsort
SELECT ALL - 32 AS col0 FROM tab1 GROUP BY tab1.col1
----
-32
-32
-32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 4 col2 FROM tab1 GROUP BY tab1.col1
----
4
4
4

query I rowsort
SELECT - 68 AS col0 FROM tab2 GROUP BY tab2.col1
----
-68
-68
-68

query I rowsort
SELECT + 76 FROM tab1 AS cor0 GROUP BY col0
----
76
76
76

onlyif mysql # DIV for integer division: 
query I rowsort label-7696
SELECT ALL + col1 DIV tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7696
SELECT ALL + col1 / tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT col2 * cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT 19 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
19
19

query I rowsort
SELECT DISTINCT 55 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
55

query I rowsort
SELECT ALL + cor0.col1 AS 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 - - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT tab2.col2 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT 58 AS col0 FROM tab0 GROUP BY tab0.col1
----
58

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
3483

query I rowsort
SELECT ( + 27 ) AS col1 FROM tab1 AS cor0 GROUP BY col2
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 73 col1 FROM tab1 GROUP BY tab1.col0
----
73
73
73

query I rowsort
SELECT DISTINCT col2 + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT - - 97 AS col0 FROM tab0 GROUP BY tab0.col1
----
97
97

onlyif mysql # DIV for integer division: 
query I rowsort label-7709
SELECT ALL + - tab2.col1 DIV - col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7709
SELECT ALL + - tab2.col1 / - col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT DISTINCT 19 * + col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1121
1159
779

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7711
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-7711
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT - 84 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-84
-84
-84

query I rowsort
SELECT + - 6 FROM tab1 GROUP BY tab1.col2
----
-6
-6
-6

query I rowsort
SELECT ALL ( + tab1.col2 ) * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT 6 AS col0 FROM tab0 GROUP BY tab0.col2
----
6
6
6

query I rowsort
SELECT ALL 62 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
62
62
62

query I rowsort
SELECT + 94 AS col0 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0
----
94
94
94

query I rowsort
SELECT - ( tab1.col1 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-7719
SELECT - tab0.col0 DIV + 32 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-7719
SELECT - tab0.col0 / + 32 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1
-2
0

query I rowsort
SELECT - cor0.col0 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + 44 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
44
44
44

onlyif mysql # DIV for integer division: 
query I rowsort label-7722
SELECT DISTINCT - - tab2.col1 * - tab2.col1 + tab2.col1 DIV col1 FROM tab2 GROUP BY col1
----
-1680
-3480
-3720

skipif mysql # not compatible
query I rowsort label-7722
SELECT DISTINCT - - tab2.col1 * - tab2.col1 + tab2.col1 / col1 FROM tab2 GROUP BY col1
----
-1680
-3480
-3720

query I rowsort
SELECT DISTINCT - 60 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
-60

query I rowsort
SELECT cor0.col1 + 93 * - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-4048
-5244
-552

query I rowsort
SELECT ALL cor0.col2 * + col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0
0
1944

query I rowsort
SELECT - 53 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-53
-53

query I rowsort
SELECT DISTINCT 8 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
328
472
488

query I rowsort
SELECT - + 61 FROM tab0 GROUP BY tab0.col2
----
-61
-61
-61

query I rowsort
SELECT - 2 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-2
-2
-2

query I rowsort
SELECT DISTINCT 31 FROM tab1 GROUP BY col0
----
31

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2565
3124
48

query I rowsort
SELECT + 86 - + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
48
62
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 25 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT ALL cor0.col2 - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
17
20
26

query I rowsort
SELECT DISTINCT - NULLIF ( cor0.col1, - cor0.col1 ) FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL + col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT - col2 * + 61 + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY col2, cor0.col1
----
-3497
-4760
-5246

query I rowsort
SELECT ALL + col2 * - 12 FROM tab0 cor0 GROUP BY cor0.col2
----
-288
-456
-948

query I rowsort
SELECT - - 26 FROM tab1 GROUP BY tab1.col0
----
26
26
26

query I rowsort
SELECT DISTINCT + - 93 FROM tab2 GROUP BY tab2.col2
----
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 28 col0 FROM tab0 GROUP BY tab0.col2
----
28

query I rowsort
SELECT DISTINCT 79 + col2 FROM tab1 GROUP BY tab1.col2
----
124
150
87

query I rowsort
SELECT + col0 * COALESCE ( - cor0.col1 * + col0, cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
-149769
0
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ( + COALESCE ( - 26, tab2.col0 - ( 73 ) ) ) AS col1 FROM tab2 GROUP BY tab2.col2
----
-26
-26
-26

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
3364
6241
7569

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-15
-91
-92

query I rowsort
SELECT col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT - 63 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-63
-63
-63

query I rowsort
SELECT ALL + 54 FROM tab0 AS cor0 GROUP BY cor0.col0
----
54
54
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
182
184
30

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 cor0.col0
----
0

query I rowsort
SELECT - tab1.col0 * + tab1.col0 AS col1 FROM tab1 WHERE NULL IS NULL GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT ALL + 32 AS col2 FROM tab2 GROUP BY tab2.col1
----
32
32
32

query I rowsort
SELECT DISTINCT 64 * tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
1408
1792
5248

query I rowsort
SELECT DISTINCT + 51 AS col2 FROM tab2 GROUP BY tab2.col0
----
51

query I rowsort
SELECT DISTINCT - - tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT 78 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
78
78
78

onlyif mysql # DIV for integer division: 
query I rowsort label-7759
SELECT 12 DIV + cor0.col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7759
SELECT 12 / + cor0.col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
0
0
1

query I rowsort
SELECT - 37 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-37
-37
-37

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( + 55, col1, cor0.col1 + cor0.col2 * cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
55

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7762
SELECT DISTINCT CAST( NULL AS SIGNED ) * 80 - tab1.col2 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-7762
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 80 - tab1.col2 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT - 87 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-87
-87
-87

query I rowsort
SELECT DISTINCT - + 53 FROM tab0 GROUP BY tab0.col0
----
-53

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL tab2.col1 * 35 AS col2 FROM tab2 GROUP BY tab2.col1
----
1435
2065
2135

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7767
SELECT DISTINCT - tab1.col2 * CAST( NULL AS DECIMAL ) AS col1 FROM tab1 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-7767
SELECT DISTINCT - tab1.col2 * CAST ( NULL AS REAL ) AS col1 FROM tab1 GROUP BY col2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 76 col2 FROM tab2 GROUP BY tab2.col2
----
76
76
76

query I rowsort
SELECT DISTINCT - - 27 FROM tab2 GROUP BY tab2.col1
----
27

onlyif mysql # DIV for integer division: 
query I rowsort label-7770
SELECT - 43 DIV + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-7
0
0

skipif mysql # not compatible
query I rowsort label-7770
SELECT - 43 / + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-7
0
0

query I rowsort
SELECT cor0.col1 * + 67 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2948
3819
402

query I rowsort
SELECT DISTINCT tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NULL
----
44
57
6

query I rowsort
SELECT ALL tab1.col2 FROM tab1 AS cor0 CROSS JOIN tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 4 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
4

query I rowsort
SELECT 18 * + 24 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
432
432

query I rowsort
SELECT DISTINCT 4 FROM tab0 AS cor0 GROUP BY cor0.col0
----
4

query I rowsort
SELECT ALL - tab2.col2 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT + 75 FROM tab1 GROUP BY col1
----
75
75
75

query I rowsort
SELECT DISTINCT + 89 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
89

query I rowsort
SELECT ALL 4 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
4
4
4

query I rowsort
SELECT ALL + 87 FROM tab0 AS cor0 GROUP BY col2
----
87
87
87

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT - 44 * + tab1.col1 + tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
-1892
-2451
-258

query I rowsort
SELECT 56 FROM tab2 GROUP BY col1
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 18 col1 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
18
18
18

query I rowsort
SELECT ALL 34 + + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
75
93
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 - + col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + 10 FROM tab1 AS cor0 GROUP BY col2
----
10
10
10

query I rowsort
SELECT DISTINCT - ( + cor0.col2 ) FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT + + 1 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT + + NULLIF ( tab1.col2, ( tab1.col2 ) ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 13 * col2 FROM tab2 GROUP BY tab2.col2
----
1027
1131
754

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * cor0.col0 col1 FROM tab2 cor0 GROUP BY cor0.col0, col1
----
225
8281
8464

query I rowsort
SELECT DISTINCT 73 * - tab0.col1 FROM tab0 GROUP BY col1
----
-5913
0

query I rowsort
SELECT - cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT 89 FROM tab0 GROUP BY tab0.col0
----
89

query I rowsort
SELECT DISTINCT 75 FROM tab2 AS cor0 GROUP BY col0
----
75

query I rowsort
SELECT - 94 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-94
-94
-94

query I rowsort
SELECT ALL 26 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
67
85
87

query I rowsort
SELECT + cor0.col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

onlyif mysql # DIV for integer division: 
query I rowsort label-7802
SELECT ALL - + tab2.col2 * - COALESCE ( - 53, tab2.col1 DIV - tab2.col1 + - tab2.col0 DIV tab2.col1, - tab2.col0 ) FROM tab2 GROUP BY tab2.col2
----
-3074
-4187
-4611

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-7802
SELECT ALL - + tab2.col2 * - COALESCE ( - 53, tab2.col1 / - tab2.col1 + - tab2.col0 / tab2.col1, - tab2.col0 ) FROM tab2 GROUP BY tab2.col2
----
-3074
-4187
-4611

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 28 col0 FROM tab0 GROUP BY tab0.col2
----
-28
-28
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col1 col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-3483
0

query I rowsort
SELECT DISTINCT + 69 * + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
4002
5451
6003

query I rowsort
SELECT NULLIF ( 28, cor0.col2 * cor0.col0 - cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
28
28
28

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 81 - + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - 10 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-10
-10
-10

query I rowsort
SELECT DISTINCT + 90 FROM tab0 GROUP BY tab0.col2
----
90

query I rowsort
SELECT 54 FROM tab1 AS cor0 GROUP BY cor0.col0
----
54
54
54

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7813
SELECT ALL + + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7813
SELECT ALL + + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7814
SELECT CAST( 17 AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
17
17
17

skipif mysql # not compatible
query I rowsort label-7814
SELECT CAST ( 17 AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
17
17
17

query I rowsort
SELECT + tab2.col2 * 4 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
290
395
435

query I rowsort
SELECT DISTINCT 71 FROM tab0 AS cor0 GROUP BY col1
----
71

query I rowsort
SELECT DISTINCT - - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL 41 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1066
-1763
-3403

query I rowsort
SELECT - 8 AS col2 FROM tab2 GROUP BY tab2.col0
----
-8
-8
-8

query I rowsort
SELECT ALL - tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT 27 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
27
27
27

query I rowsort
SELECT - + 42 AS col2 FROM tab1 GROUP BY tab1.col1
----
-42
-42
-42

query I rowsort
SELECT DISTINCT + - 20 FROM tab0 GROUP BY tab0.col1
----
-20

query I rowsort
SELECT ALL + - 65 AS col0 FROM tab2 GROUP BY tab2.col1
----
-65
-65
-65

query I rowsort
SELECT ALL + + tab2.col1 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT cor0.col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT + tab2.col2 * 57 FROM tab2 GROUP BY tab2.col2
----
3306
4503
4959

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - 87, cor0.col0 * + COALESCE ( cor0.col0 * cor0.col2, col1 * - cor0.col2, 91 * - cor0.col1 ), cor0.col1 * cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-7829
SELECT - 26 DIV 58 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7829
SELECT - 26 / 58 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + 3 ) col2 FROM tab0 GROUP BY tab0.col0
----
-3

query I rowsort
SELECT ALL ( 93 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
93
93

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7832
SELECT - CAST( NULL AS SIGNED ) + + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7832
SELECT - CAST ( NULL AS INTEGER ) + + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 1 * - cor0.col2 col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-7834
SELECT + cor0.col1 + + cor0.col1 DIV col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
60
62

skipif mysql # not compatible
query I rowsort label-7834
SELECT + cor0.col1 + + cor0.col1 / col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
60
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 74 col2 FROM tab0 GROUP BY tab0.col0
----
-74
-74
-74

query I rowsort
SELECT - col1 * - col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
58
79
87

query I rowsort
SELECT DISTINCT + - 73 FROM tab0 GROUP BY tab0.col0
----
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 21 * 10 col2 FROM tab2 GROUP BY tab2.col1
----
210
210
210

query I rowsort
SELECT DISTINCT - cor0.col2 + 37 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1
-42
13

query I rowsort
SELECT + ( - 26 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
-26
-26
-26

query I rowsort
SELECT 75 AS col0 FROM tab1 GROUP BY tab1.col2
----
75
75
75

query I rowsort
SELECT NULLIF ( + cor0.col2, - cor0.col2 ) - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 49 col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
49
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col2 * - 0 col2 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT DISTINCT cor0.col2 + + 22 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1334
1817
2001

query I rowsort
SELECT tab0.col1 - - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT cor0.col1 * + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 92 FROM tab1 GROUP BY tab1.col1
----
-92

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
114
12
88

query I rowsort
SELECT DISTINCT + COALESCE ( - cor0.col0, cor0.col0 ) * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT - tab1.col2 * - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

onlyif mysql # DIV for integer division: 
query I rowsort label-7855
SELECT ALL cor0.col2 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
0
0
5

skipif mysql # not compatible
query I rowsort label-7855
SELECT ALL cor0.col2 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
0
0
5

query I rowsort
SELECT ALL + 76 AS col2 FROM tab2 GROUP BY tab2.col1
----
76
76
76

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7857
SELECT DISTINCT + CAST( + col0 AS SIGNED ) col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7857
SELECT DISTINCT + CAST ( + col0 AS INTEGER ) col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT DISTINCT 70 AS col1 FROM tab0 GROUP BY col2
----
70

query I rowsort
SELECT 79 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
79
79
79

query I rowsort
SELECT ALL - - col0 * 8 + CASE + col0 WHEN + tab0.col0 * COALESCE ( + 96, tab0.col0 ) THEN + tab0.col0 END * 37 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 26 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-26
-26
-26

query I rowsort
SELECT - + 26 FROM tab2 GROUP BY tab2.col0
----
-26
-26
-26

query I rowsort
SELECT ALL 60 FROM tab1 GROUP BY tab1.col1
----
60
60
60

query I rowsort
SELECT ALL tab1.col0 + tab1.col0 * + col0 AS col0 FROM tab1 GROUP BY col0
----
506
6806
812

query I rowsort
SELECT + tab0.col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT col2 * - cor0.col2 + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-3456
-6332
-7584

onlyif mysql # DIV for integer division: 
query I rowsort label-7868
SELECT DISTINCT + 6 DIV + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0

skipif mysql # not compatible
query I rowsort label-7868
SELECT DISTINCT + 6 / + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT DISTINCT 38 FROM tab2 GROUP BY tab2.col0
----
38

query I rowsort
SELECT cor0.col2 * + 66 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2970
4686
528

query I rowsort
SELECT ALL - 1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT - 18 + + 40 FROM tab2 AS cor0 GROUP BY cor0.col2
----
22
22
22

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 83 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-83
-83
-83

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT 51 FROM tab2 AS cor0 GROUP BY col1
----
51
51
51

query I rowsort
SELECT - ( 50 ) + + col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
29
37
8

query I rowsort
SELECT DISTINCT - 77 FROM tab1 AS cor0 GROUP BY col1
----
-77

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( 30, + cor0.col2 * - CASE - cor0.col0 WHEN cor0.col0 THEN + cor0.col0 END, + ( + cor0.col1 ) * - cor0.col1 - col0 ) + + 99 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
4425
6999
762

query I rowsort
SELECT - 91 FROM tab1 GROUP BY tab1.col1
----
-91
-91
-91

query I rowsort
SELECT 6 FROM tab0 GROUP BY tab0.col1
----
6
6

query I rowsort
SELECT DISTINCT 26 AS col2 FROM tab2 GROUP BY tab2.col0
----
26

query I rowsort
SELECT ALL + 2 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
142
16
90

query I rowsort
SELECT ALL + cor0.col0 + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT 13 FROM tab2 GROUP BY tab2.col2
----
13

query I rowsort
SELECT + tab0.col1 * 31 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
2511

query I rowsort
SELECT DISTINCT - ( tab0.col2 ) * tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL - - 82 FROM tab2 GROUP BY tab2.col0
----
82
82
82

query I rowsort
SELECT DISTINCT - + 40 AS col2 FROM tab0 GROUP BY tab0.col0
----
-40

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7890
SELECT + CAST( NULL AS SIGNED ) - + 6 AS col2 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7890
SELECT + CAST ( NULL AS INTEGER ) - + 6 AS col2 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-7891
SELECT DISTINCT - - 71 DIV + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7891
SELECT DISTINCT - - 71 / + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
1
2

query I rowsort
SELECT ALL 30 FROM tab2 GROUP BY tab2.col0
----
30
30
30

onlyif mysql # DIV for integer division: 
query I rowsort label-7893
SELECT + cor0.col0 DIV + col0 FROM tab1 AS cor0 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7893
SELECT + cor0.col0 / + col0 FROM tab1 AS cor0 GROUP BY col0
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-7894
SELECT col1 DIV - 24 - - ( 77 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
74
77

skipif mysql # not compatible
query I rowsort label-7894
SELECT col1 / - 24 - - ( 77 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
74
77

query I rowsort
SELECT ALL + tab1.col1 * + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT 82 + 53 FROM tab0 AS cor0 GROUP BY cor0.col1
----
135
135

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 38 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
38
38
38

query I rowsort
SELECT ALL - tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL 96 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-4320
-6816
-768

query I rowsort
SELECT 61 * cor0.col1 - - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
2728
3534
372

query I rowsort
SELECT - 14 AS col1 FROM tab0 GROUP BY tab0.col2
----
-14
-14
-14

query I rowsort
SELECT cor0.col1 * + 1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT 70 FROM tab1 GROUP BY tab1.col1
----
70

query I rowsort
SELECT DISTINCT 38 FROM tab1 GROUP BY tab1.col1
----
38

query I rowsort
SELECT DISTINCT + + 22 AS col1 FROM tab0 GROUP BY tab0.col0
----
22

query I rowsort
SELECT ALL 18 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
18
18
18

query I rowsort
SELECT - ( + 3 ) * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-114
-237
-72

query I rowsort
SELECT + - 18 AS col2 FROM tab2 GROUP BY tab2.col2
----
-18
-18
-18

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7909
SELECT ALL CAST( NULL AS SIGNED ) col0 FROM tab2 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-7909
SELECT ALL CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7910
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7910
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL CASE + 19 WHEN 5 THEN - tab2.col0 * - tab2.col2 ELSE NULL END AS col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 29 FROM tab2 GROUP BY tab2.col2
----
29
29
29

query I rowsort
SELECT DISTINCT + + ( - 28 ) + 48 AS col0 FROM tab0 GROUP BY tab0.col1
----
20

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor1.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - + tab1.col2 * + 7 AS col1 FROM tab1 GROUP BY tab1.col2
----
-315
-497
-56

query I rowsort
SELECT DISTINCT + 85 AS col2 FROM tab2 GROUP BY col0
----
85

query I rowsort
SELECT + + 82 AS col1 FROM tab1 GROUP BY tab1.col0
----
82
82
82

query I rowsort
SELECT ALL - col2 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - 46 FROM tab1 GROUP BY col1
----
-46

query I rowsort
SELECT ALL + - 7 AS col1 FROM tab0 GROUP BY tab0.col2
----
-7
-7
-7

query I rowsort
SELECT col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 67 FROM tab2 GROUP BY tab2.col2
----
-67

query I rowsort
SELECT - 22 * + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-1276
-1738
-1914

query I rowsort
SELECT DISTINCT - NULLIF ( 28, + tab1.col0 * tab1.col0 ) + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-6
0
54

query I rowsort
SELECT + + col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - + 65 AS col2 FROM tab2 GROUP BY tab2.col0
----
-65
-65
-65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT 21 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
21
21
21

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + - tab1.col2 + - 0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - 5 FROM tab0 GROUP BY tab0.col0
----
-5
-5
-5

query I rowsort
SELECT ALL - tab1.col2 * col2 - - 43 FROM tab1 GROUP BY tab1.col2
----
-1982
-21
-4998

query I rowsort
SELECT ALL - - 89 AS col0 FROM tab0 GROUP BY tab0.col2
----
89
89
89

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7934
SELECT ALL CAST( NULL AS SIGNED ) * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7934
SELECT ALL CAST ( NULL AS INTEGER ) * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL <> ( NULL )
----

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NULL
----
24
38
79

query I rowsort
SELECT - col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NULL
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT ( ( NULL ) IS NOT NULL ) AND NOT NULL IS NULL OR NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT 59 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
59

query I rowsort
SELECT tab0.col1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT + 54 FROM tab2 AS cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT ALL - 50 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-50
-50
-50

query I rowsort
SELECT DISTINCT 67 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
67

query I rowsort
SELECT - - 7 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT DISTINCT - col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT ALL + 67 FROM tab1 GROUP BY tab1.col0
----
67
67
67

query I rowsort
SELECT cor0.col0 * - 43 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3913
-3956
-645

query I rowsort
SELECT DISTINCT 23 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
23

query I rowsort
SELECT ALL + 59 - - cor0.col0 FROM tab2 cor0 GROUP BY col0
----
150
151
74

query I rowsort
SELECT ALL + col2 * 21 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1491
168
945

query I rowsort
SELECT + 43 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
43
43
43

query I rowsort
SELECT ALL - 27 + col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-21
17
30

query I rowsort
SELECT ALL - 13 + cor0.col2 FROM tab1 cor0 GROUP BY col2
----
-5
32
58

query I rowsort
SELECT ALL - 69 AS col0 FROM tab0 GROUP BY tab0.col2
----
-69
-69
-69

query I rowsort
SELECT ALL tab1.col2 * col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7957
SELECT cor0.col0 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7957
SELECT cor0.col0 * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + + cor0.col2 col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 cor0 GROUP BY col2, col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-7960
SELECT ALL - cor0.col2 DIV cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7960
SELECT ALL - cor0.col2 / cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-7961
SELECT ALL tab0.col0 DIV - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7961
SELECT ALL tab0.col0 / - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 + - cor0.col0 * cor0.col0 col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-1825
-597
-6851

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col1 + - tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT tab1.col1 + - ( tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 * tab2.col1 + tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
1722
3540
3782

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-7967
SELECT DISTINCT tab2.col1 DIV + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1

skipif mysql # not compatible
query I rowsort label-7967
SELECT DISTINCT tab2.col1 / + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1

query I rowsort
SELECT DISTINCT tab1.col0 FROM tab1 WHERE NOT NULL = ( tab1.col2 / - col2 ) GROUP BY tab1.col0
----

onlyif mysql # DIV for integer division: 
query I rowsort label-7969
SELECT DISTINCT tab0.col2 DIV tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1

skipif mysql # not compatible
query I rowsort label-7969
SELECT DISTINCT tab0.col2 / tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1

query I rowsort
SELECT 19 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT ALL 19 FROM tab0 AS cor0 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT DISTINCT 10 FROM tab1 AS cor0 GROUP BY cor0.col2
----
10

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT DISTINCT + 3 AS col0 FROM tab2 GROUP BY tab2.col1
----
3

onlyif mysql # DIV for integer division: 
query I rowsort label-7975
SELECT ALL - cor0.col2 DIV cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7975
SELECT ALL - cor0.col2 / cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-1
-1

query I rowsort
SELECT 17 * 64 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1088
1088
1088

query I rowsort
SELECT ALL + + 88 FROM tab1 GROUP BY tab1.col2
----
88
88
88

query I rowsort
SELECT ALL col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT DISTINCT + tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - 92 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-92
-92
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 21 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-21
-21
-21

query I rowsort
SELECT - + col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL - 82 * + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1804
-2296
-6724

query I rowsort
SELECT ALL + 69 AS col0 FROM tab1 GROUP BY col1
----
69
69
69

query I rowsort
SELECT 28 FROM tab1 AS cor0 GROUP BY col1
----
28
28
28

query I rowsort
SELECT + 39 FROM tab1 AS cor0 GROUP BY cor0.col1
----
39
39
39

query I rowsort
SELECT - + 79 AS col2 FROM tab2 GROUP BY tab2.col2
----
-79
-79
-79

query I rowsort
SELECT ALL + 63 * 87 - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
5398
5438
5455

query I rowsort
SELECT + - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL ( 90 ) * cor0.col1 AS col1 FROM tab1 cor0 GROUP BY col1
----
3960
5130
540

query I rowsort
SELECT + 62 * tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
5642
5704
930

query I rowsort
SELECT + 92 FROM tab1 GROUP BY col2
----
92
92
92

query I rowsort
SELECT + - tab1.col0 - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

query I rowsort
SELECT 38 AS col0 FROM tab2 GROUP BY tab2.col0
----
38
38
38

query I rowsort
SELECT DISTINCT 40 FROM tab2 cor0 GROUP BY cor0.col2
----
40

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7997
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7997
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - - 73 FROM tab0 GROUP BY tab0.col1
----
73
73

query I rowsort
SELECT DISTINCT - 85 FROM tab0 cor0 GROUP BY cor0.col0
----
-85

query I rowsort
SELECT - - tab1.col2 * tab1.col2 + 18 AS col0 FROM tab1 GROUP BY tab1.col2
----
2043
5059
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 - - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT - + 38 FROM tab1 GROUP BY tab1.col0
----
-38
-38
-38

query I rowsort
SELECT ALL + 57 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
57
57

query I rowsort
SELECT 46 AS col2 FROM tab1 GROUP BY tab1.col0
----
46
46
46

query I rowsort
SELECT 7 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
7
7
7

query I rowsort
SELECT + 75 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
75
75
75

query I rowsort
SELECT DISTINCT 39 FROM tab0 GROUP BY col0
----
39

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
26
43
83

query I rowsort
SELECT + tab1.col1 * + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL + tab1.col2 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

onlyif mysql # DIV for integer division: 
query I rowsort label-8011
SELECT DISTINCT 79 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-8011
SELECT DISTINCT 79 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1

query I rowsort
SELECT DISTINCT 60 FROM tab1 GROUP BY tab1.col0
----
60

query I rowsort
SELECT 3 FROM tab0 AS cor0 GROUP BY cor0.col1
----
3
3

query I rowsort
SELECT + tab0.col1 * 92 FROM tab0 GROUP BY tab0.col1
----
0
7452

query I rowsort
SELECT ALL - + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT tab1.col1 * + 51 FROM tab1 GROUP BY col1
----
2244
2907
306

query I rowsort
SELECT DISTINCT tab2.col0 + tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
182
184
30

onlyif mysql # DIV for integer division: 
query I rowsort label-8018
SELECT DISTINCT - cor0.col2 DIV 78 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
78

skipif mysql # not compatible
query I rowsort label-8018
SELECT DISTINCT - cor0.col2 / 78 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 34 col1 FROM tab2 GROUP BY tab2.col1
----
34
34
34

query I rowsort
SELECT ALL tab2.col2 + tab2.col2 FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT DISTINCT col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT 38 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
38
38
38

query I rowsort
SELECT + 89 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
89
89
89

query I rowsort
SELECT ALL + 47 + + 46 FROM tab0 AS cor0 GROUP BY cor0.col2
----
93
93
93

query I rowsort
SELECT ALL - 9 AS col1 FROM tab1 GROUP BY tab1.col0
----
-9
-9
-9

query I rowsort
SELECT ALL ( + tab1.col1 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT 85 * - 81 FROM tab0 GROUP BY tab0.col1
----
-6885
-6885

query I rowsort
SELECT DISTINCT col1 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
3483

query I rowsort
SELECT 7 + - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-34
-52
-54

query I rowsort
SELECT DISTINCT 14 FROM tab1 AS cor0 GROUP BY cor0.col1
----
14

query I rowsort
SELECT 17 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
17
17
17

query I rowsort
SELECT DISTINCT + cor0.col2 + + 24 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
103
48
62

query I rowsort
SELECT DISTINCT tab2.col0 * col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT + 73 FROM tab0 AS cor0 GROUP BY cor0.col2
----
73

onlyif mysql # DIV for integer division: 
query I rowsort label-8035
SELECT tab0.col2 + - tab0.col2 DIV + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
23
37
78

skipif mysql # not compatible
query I rowsort label-8035
SELECT tab0.col2 + - tab0.col2 / + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
23
37
78

query I rowsort
SELECT ALL - + tab2.col0 + col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col1 FROM tab2 AS cor0 WHERE NOT NULL NOT IN ( - cor0.col1 ) OR NOT NULL IS NULL GROUP BY cor0.col0
----

query I rowsort
SELECT + tab1.col0 + + tab1.col0 * tab1.col0 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
506
6806
812

query I rowsort
SELECT ALL + 35 * + cor0.col2 + - cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
1972
2686
2958

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 60 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT DISTINCT + 20 * 52 + - cor0.col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
953
961
982

onlyif mysql # DIV for integer division: 
query I rowsort label-8042
SELECT + col2 DIV - cor0.col2 AS col2 FROM tab1 cor0 GROUP BY col0, cor0.col1, cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8042
SELECT + col2 / - cor0.col2 AS col2 FROM tab1 cor0 GROUP BY col0, cor0.col1, cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL 4 FROM tab0 GROUP BY tab0.col0
----
4
4
4

query I rowsort
SELECT ALL 64 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
64
64

query I rowsort
SELECT + 2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
2
2
2

query I rowsort
SELECT ALL + 49 + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
132
75
92

query I rowsort
SELECT DISTINCT 71 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
71

query I rowsort
SELECT + 68 + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
109
127
129

onlyif mysql # DIV for integer division: 
query I rowsort label-8049
SELECT DISTINCT + tab2.col1 DIV - 34 FROM tab2 GROUP BY col1
----
-1

skipif mysql # not compatible
query I rowsort label-8049
SELECT DISTINCT + tab2.col1 / - 34 FROM tab2 GROUP BY col1
----
-1

query I rowsort
SELECT + 43 * + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
2494
3397
3741

onlyif mysql # DIV for integer division: 
query I rowsort label-8051
SELECT DISTINCT cor0.col2 DIV cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-8051
SELECT DISTINCT cor0.col2 / cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1

query I rowsort
SELECT ALL - cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
6561

query I rowsort
SELECT - 87 + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-5
-59
-65

query I rowsort
SELECT - 46 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-46
-46
-46

query I rowsort
SELECT + + tab0.col1 + + 10 FROM tab0 GROUP BY tab0.col1
----
10
91

query I rowsort
SELECT ALL tab1.col2 * 43 AS col0 FROM tab1 GROUP BY tab1.col2
----
1935
3053
344

onlyif mysql # DIV for integer division: 
query I rowsort label-8057
SELECT DISTINCT cor0.col1 DIV - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-8057
SELECT DISTINCT cor0.col1 / - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1

query I rowsort
SELECT DISTINCT 9 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
9

query I rowsort
SELECT ALL tab1.col0 + 47 FROM tab1 GROUP BY tab1.col0
----
129
69
75

query I rowsort
SELECT DISTINCT + + col2 + + 74 FROM tab0 GROUP BY col2
----
112
153
98

query I rowsort
SELECT - ( + 46 ) FROM tab0 cor0 GROUP BY cor0.col1
----
-46
-46

query I rowsort
SELECT DISTINCT - 51 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-23
-29
31

query I rowsort
SELECT cor0.col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT - tab0.col1 * col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT ALL - 44 FROM tab2 GROUP BY tab2.col2
----
-44
-44
-44

onlyif mysql # DIV for integer division: 
query I rowsort label-8068
SELECT ALL - 80 DIV + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-8068
SELECT ALL - 80 / + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-1
-1
0

query I rowsort
SELECT 6 FROM tab0 AS cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT ALL 65 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT DISTINCT 0 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
0

query I rowsort
SELECT + tab0.col0 + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - tab2.col0 * + tab2.col0 + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-210
-8190
-8372

query I rowsort
SELECT ALL - col0 AS col2 FROM tab0 GROUP BY tab0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - 69 FROM tab2 GROUP BY tab2.col1
----
-69
-69
-69

query I rowsort
SELECT ALL + 53 AS col0 FROM tab0 GROUP BY tab0.col2
----
53
53
53

query I rowsort
SELECT ALL + - 41 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-33
30
4

onlyif mysql # DIV for integer division: 
query I rowsort label-8078
SELECT ALL - 67 DIV - 87 AS col1 FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8078
SELECT ALL - 67 / - 87 AS col1 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT - + ( + 10 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
-10
-10
-10

onlyif mysql # DIV for integer division: 
query I rowsort label-8080
SELECT + 10 DIV tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8080
SELECT + 10 / tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT - - tab0.col0 * + 66 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1742
2881
5561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 + + tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
3364
6241
7569

query I rowsort
SELECT - + 21 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-1701
0

query I rowsort
SELECT ALL 39 AS col2 FROM tab1 GROUP BY tab1.col1
----
39
39
39

query I rowsort
SELECT tab2.col1 + + 62 FROM tab2 GROUP BY col1
----
103
121
123

query I rowsort
SELECT ALL + col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT 56 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
56
56
56

query I rowsort
SELECT - 0 FROM tab0 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT tab0.col0 * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 91 col0 FROM tab0 GROUP BY tab0.col0
----
-91

query I rowsort
SELECT DISTINCT - 82 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-82

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-8094
SELECT + tab1.col0 DIV 87 FROM tab1 GROUP BY tab1.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8094
SELECT + tab1.col0 / 87 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT ALL - - col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL 69 AS col2 FROM tab2 GROUP BY tab2.col1
----
69
69
69

query I rowsort
SELECT + - 96 * + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-4224
-5472
-576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * + 49 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1274
-2107
-4067

query I rowsort
SELECT 41 * + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
1066
1763
3403

onlyif mysql # DIV for integer division: 
query I rowsort label-8100
SELECT ALL tab0.col2 DIV - col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NOT NULL
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8100
SELECT ALL tab0.col2 / - col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NOT NULL
----
-1
-1
-1

query I rowsort
SELECT - tab1.col0 * tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT tab0.col1 - - col1 AS col2 FROM tab0 GROUP BY tab0.col1 HAVING NOT ( NULL ) NOT IN ( tab0.col1 )
----

query I rowsort
SELECT DISTINCT tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT ( NULL ) IS NOT NULL
----
44
57
6

query I rowsort
SELECT DISTINCT tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT ALL - 2 AS col2 FROM tab0 GROUP BY col1
----
-2
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col2 col2 FROM tab2 GROUP BY tab2.col2