sqllogictest
Artifact Content
Not logged in

Artifact a92d7502f1aa2d6b6de3058a38b27dc7031677be:


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)

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-3
SELECT col0 * col0 + col0 DIV cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
226
8282
8465

skipif mysql # not compatible
query I rowsort label-3
SELECT col0 * col0 + col0 / cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
226
8282
8465

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col0 col1 FROM tab2 GROUP BY col0 HAVING NOT NULL IS NULL
----

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

query I rowsort
SELECT cor0.col0 * + 25 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1075
2075
650

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - tab2.col2 + - 11 AS col0 FROM tab2 GROUP BY tab2.col2
----
-69
-90
-98

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

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

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

query I rowsort
SELECT ALL 10 * + 70 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
700
700
700

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

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

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

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

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

query I rowsort
SELECT 29 * 68 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1972
1972

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

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

query I rowsort
SELECT - ( - 33 ) + + 59 FROM tab0 GROUP BY tab0.col2
----
92
92
92

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

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

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

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

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

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

query I rowsort
SELECT - tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NULL
----
-41
-59
-61

query I rowsort
SELECT - 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 ALL + cor0.col0 col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
15
91
92

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

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

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

query I rowsort
SELECT DISTINCT - 7 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-168
-266
-553

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - + 79 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-3555
-5609
-632

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col2 + + 46 FROM tab0 AS cor0 GROUP BY cor0.col2
----
125
70
84

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-74
SELECT 65 DIV 40 AS col1 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-74
SELECT 65 / 40 AS col1 FROM tab1 GROUP BY tab1.col0
----
1
1
1

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-77
SELECT + CAST( - 15 AS SIGNED ) + - col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-23
-60
-86

skipif mysql # not compatible
query I rowsort label-77
SELECT + CAST ( - 15 AS INTEGER ) + - col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-23
-60
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 92 + - tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
21
47
84

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

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

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

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

query I rowsort
SELECT ALL + 82 + 96 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2578
4210
8050

query I rowsort
SELECT + 99 * tab1.col0 - + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
2156
2744
8036

query I rowsort
SELECT + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

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

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-86
SELECT cor0.col0 / cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

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

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

skipif mysql # not compatible
query I rowsort label-88
SELECT ALL CAST ( NULL AS INTEGER ) / - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT tab2.col2 + - tab2.col2 * + 84 FROM tab2 GROUP BY tab2.col2
----
-4814
-6557
-7221

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

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 WHERE NOT NULL > NULL GROUP BY cor0.col1
----

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * ( + cor0.col2 * cor0.col2 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-195112
-493039
-658503

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

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

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

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

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

query I rowsort
SELECT ALL + 63 - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, col1, cor0.col0
----
2
22
4

query I rowsort
SELECT + cor0.col0 * - 18 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1638
-1656
-270

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

onlyif mysql # DIV for integer division: 
query I rowsort label-101
SELECT cor0.col1 + - col1 DIV 16 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
42
54
6

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-101
SELECT cor0.col1 + - col1 / 16 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
42
54
6

onlyif mysql # DIV for integer division: 
query I rowsort label-102
SELECT 9 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-102
SELECT 9 / cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

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

query I rowsort
SELECT DISTINCT + - 59 * 49 FROM tab2 GROUP BY tab2.col0
----
-2891

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

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

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

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 cor0.col1 + cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1, cor0.col0
----
124
26
83

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

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

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

query I rowsort
SELECT DISTINCT 7 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
406
553
609

query I rowsort
SELECT ALL + cor0.col2 + 37 * + 59 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2207
2221
2262

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

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 24, + cor0.col1 + + cor0.col1, + cor0.col2 * + col1, - cor0.col2 * - 79 ) * 75 + + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1717
-1757
-1774

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

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

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

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

query I rowsort
SELECT 43 FROM tab0 GROUP BY col1
----
43
43

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT + col0 * - 55 + - 22 FROM tab2 GROUP BY col0
----
-5027
-5082
-847

query I rowsort
SELECT ALL - + 70 AS col1 FROM tab0 GROUP BY col2
----
-70
-70
-70

query I rowsort
SELECT ALL 35 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
76
94
96

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 67 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4
22
59

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

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

query I rowsort
SELECT DISTINCT - 74 * 4 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-296

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

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

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

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

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

query I rowsort
SELECT - ( 74 ) + col1 FROM tab0 GROUP BY tab0.col1
----
-74
7

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

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-152
SELECT ALL - cor0.col0 / - 36 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
0
2
2

query I rowsort
SELECT DISTINCT + tab0.col0 * 59 AS col2 FROM tab0 GROUP BY tab0.col0
----
1534
2537
4897

query I rowsort
SELECT 14 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
40
57
97

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

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

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

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

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

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

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

query I rowsort
SELECT tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT ( tab2.col2 ) IS NULL
----
58
79
87

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

query I rowsort
SELECT DISTINCT + 80 * cor0.col0 - 97 FROM tab2 AS cor0 GROUP BY col0
----
1103
7183
7263

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 32 * - 8 FROM tab0 GROUP BY tab0.col1
----
256

query I rowsort
SELECT + ( 84 ) + + cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
129
155
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-171
SELECT + - CAST( col1 AS SIGNED ) * col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-6561
0

skipif mysql # not compatible
query I rowsort label-171
SELECT + - CAST ( col1 AS INTEGER ) * col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT + cor0.col2 + + 68 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
113
139
76

query I rowsort
SELECT - 65 * cor0.col1 + + cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-354
-456
-924

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

query I rowsort
SELECT - col2 * + 45 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-2610
-3555
-3915

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

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

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

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

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 - + tab0.col0 - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

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

query I rowsort
SELECT + 47 * + col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1222
2021
3901

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

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

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

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

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( - cor0.col2, 71, + cor0.col1, + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + 13 * 8 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
104
104
104

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-193
SELECT - tab2.col2 DIV - tab2.col2 + col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
59
80
88

skipif mysql # not compatible
query I rowsort label-193
SELECT - tab2.col2 / - tab2.col2 + col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
59
80
88

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

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

query I rowsort
SELECT DISTINCT + cor1.col0 * 2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + + 89 col0 FROM tab0 AS cor0 GROUP BY col2
----
10
51
65

query I rowsort
SELECT ALL + col0 + 81 FROM tab2 GROUP BY tab2.col0
----
172
173
96

query I rowsort
SELECT - tab0.col1 * - 11 FROM tab0 GROUP BY tab0.col1
----
0
891

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

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

query I rowsort
SELECT DISTINCT - ( 23 ) FROM tab0 GROUP BY tab0.col2
----
-23

query I rowsort
SELECT + tab2.col0 * COALESCE ( + 51, + tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
4641
4692
765

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

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * 90 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2160
3420
7110

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

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

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

query I rowsort
SELECT 70 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1050
6370
6440

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT ( NULL ) IS NOT NULL
----
-58
-79
-87

query I rowsort
SELECT - col1 AS col1 FROM tab2 GROUP BY col1 HAVING ( - tab2.col1 ) IN ( tab2.col1 )
----

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

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

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

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

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

query I rowsort
SELECT col1 * - cor0.col1 + 85 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
-1851
-3164
49

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 66 * + 95 FROM tab0 GROUP BY tab0.col1
----
6270
6270

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

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-244
SELECT DISTINCT - - tab2.col0 DIV CAST( 27 AS SIGNED ) + 50 col2 FROM tab2 GROUP BY tab2.col0
----
50
53

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-244
SELECT DISTINCT - - tab2.col0 / CAST ( 27 AS INTEGER ) + 50 col2 FROM tab2 GROUP BY tab2.col0
----
50
53

query I rowsort
SELECT + ( - 12 ) * + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-528
-684
-72

query I rowsort
SELECT - 50 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2250
-3550
-400

query I rowsort
SELECT - - 39 + col0 * + col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1888
6928
715

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

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT - 21 * 11 AS col1 FROM tab0 GROUP BY tab0.col2
----
-231

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

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

query I rowsort
SELECT ALL 94 + 22 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
116
116
116

onlyif mysql # DIV for integer division: 
query I rowsort label-254
SELECT + COALESCE ( - 43, cor0.col2 ) DIV 6 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-7
-7
-7

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

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col2 * 85 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
-4930
-6715
-7395

query I rowsort
SELECT - tab2.col0 + 47 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
4186
4232
690

onlyif mysql # DIV for integer division: 
query I rowsort label-260
SELECT - cor0.col2 DIV + 42 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-2

skipif mysql # not compatible
query I rowsort label-260
SELECT - cor0.col2 / + 42 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-2

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-266
SELECT - tab1.col2 * CASE + tab1.col2 WHEN - tab1.col2 THEN NULL ELSE - NULLIF ( 18, + tab1.col2 ) * + tab1.col2 + - tab1.col2 DIV - 83 END FROM tab1 GROUP BY tab1.col2
----
1152
36450
90738

skipif mysql # not compatible
query I rowsort label-266
SELECT - tab1.col2 * CASE + tab1.col2 WHEN - tab1.col2 THEN NULL ELSE - NULLIF ( 18, + tab1.col2 ) * + tab1.col2 + - tab1.col2 / - 83 END FROM tab1 GROUP BY tab1.col2
----
1152
36450
90738

query I rowsort
SELECT cor0.col1 * 42 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1848
2394
252

query I rowsort
SELECT cor0.col2 + + 5 FROM tab1 cor0 GROUP BY cor0.col2
----
13
50
76

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-272
SELECT DISTINCT + cor0.col0 DIV cor0.col0 + - col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-25
-42
-82

skipif mysql # not compatible
query I rowsort label-272
SELECT DISTINCT + cor0.col0 / cor0.col0 + - col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-25
-42
-82

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

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

query I rowsort
SELECT cor0.col1 * 87 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3828
4959
522

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

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

query I rowsort
SELECT + 82 * + cor0.col2 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
3633
5778
650

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

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

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

query I rowsort
SELECT DISTINCT - col2 + - 30 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-101
-38
-75

query I rowsort
SELECT + tab0.col2 + 47 FROM tab0 GROUP BY tab0.col2
----
126
71
85

query I rowsort
SELECT + tab0.col2 * + col2 FROM tab0 GROUP BY col2 HAVING NOT NULL > col2
----

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

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

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

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

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

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

query I rowsort
SELECT ALL 6 FROM tab1 GROUP BY col2
----
6
6
6

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

query I rowsort
SELECT DISTINCT - tab1.col1 + tab1.col1 * col1 FROM tab1 GROUP BY tab1.col1
----
1892
30
3192

query I rowsort
SELECT - - tab2.col1 + + col1 * 25 AS col1 FROM tab2 GROUP BY tab2.col1
----
1066
1534
1586

query I rowsort
SELECT + + 32 + - 90 FROM tab1 GROUP BY tab1.col0
----
-58
-58
-58

query I rowsort
SELECT DISTINCT - 65 * - 15 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
892
932
949

query I rowsort
SELECT DISTINCT - cor0.col1 - + 48 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-105
-54
-92

query I rowsort
SELECT + 44 + 42 FROM tab0 GROUP BY tab0.col1
----
86
86

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-300
SELECT ALL 69 / - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-8
0

onlyif mysql # DIV for integer division: 
query I rowsort label-301
SELECT + - tab2.col1 - - COALESCE ( 22, + tab2.col0 DIV - tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col1
----
-19
-37
-39

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-301
SELECT + - tab2.col1 - - COALESCE ( 22, + tab2.col0 / - tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col1
----
-19
-37
-39

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

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

query I rowsort
SELECT ALL 2 + 22 FROM tab2 cor0 GROUP BY col1
----
24
24
24

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

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

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

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

query I rowsort
SELECT 54 + cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
3418
6295
7623

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL COALESCE ( cor0.col1, - 53 ) - col0 * cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3402
0
0

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

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

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

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

query I rowsort
SELECT tab2.col2 AS col2 FROM tab2 WHERE tab2.col2 NOT IN ( tab2.col0 ) GROUP BY tab2.col2
----
58
79
87

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

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT + col0 IS NULL
----
15
91
92

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

query I rowsort
SELECT DISTINCT - 40 - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-101
-81
-99

query I rowsort
SELECT DISTINCT 81 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3564
4617
486

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

query I rowsort
SELECT DISTINCT - + 21 * 41 FROM tab0 GROUP BY tab0.col2
----
-861

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

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

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

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

query I rowsort
SELECT DISTINCT - ( - 97 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * 40 + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
1558
3239
984

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

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

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

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

query I rowsort
SELECT ALL + col0 * - NULLIF ( 33 + - col0, + 63 ) FROM tab1 GROUP BY tab1.col0
----
-140
-242
4018

query I rowsort
SELECT tab0.col0 / tab0.col0 AS col1 FROM tab0 GROUP BY col0 HAVING - tab0.col0 IS NULL
----

query I rowsort
SELECT cor0.col0 + - 78 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-35
-52
5

query I rowsort
SELECT ALL + tab2.col1 + + 34 FROM tab2 GROUP BY tab2.col1
----
75
93
95

onlyif mysql # DIV for integer division: 
query I rowsort label-334
SELECT + ( - 95 ) DIV - cor0.col1 col2 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-334
SELECT + ( - 95 ) / - cor0.col1 col2 FROM tab1 cor0 GROUP BY cor0.col1
----
1
15
2

query I rowsort
SELECT - - 61 * col0 FROM tab1 GROUP BY col0
----
1342
1708
5002

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

query I rowsort
SELECT cor0.col0 * 11 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
286
473
913

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

query I rowsort
SELECT DISTINCT + 92 - cor0.col2 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
156
2117
5133

query I rowsort
SELECT - col2 + 37 AS col0 FROM tab2 GROUP BY col2
----
-21
-42
-50

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

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

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

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

query I rowsort
SELECT DISTINCT - + 32 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-2912
-2944
-480

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

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

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

query I rowsort
SELECT ALL - - 62 * + tab2.col1 FROM tab2 GROUP BY col1
----
2542
3658
3782

query I rowsort
SELECT ( 64 ) FROM tab1 GROUP BY tab1.col0
----
64
64
64

query I rowsort
SELECT DISTINCT 19 * - 20 AS col1 FROM tab0 cor0 GROUP BY col2
----
-380

onlyif mysql # DIV for integer division: 
query I rowsort label-351
SELECT DISTINCT - 95 DIV + cor0.col0 + - col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-29
-45
-84

skipif mysql # not compatible
query I rowsort label-351
SELECT DISTINCT - 95 / + cor0.col0 + - col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-29
-45
-84

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 37 + 53 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor0.col2
----
90

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 35 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
41
79
92

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

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

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

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

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

query I rowsort
SELECT ALL - col0 * - 95 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1425
8645
8740

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

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

query I rowsort
SELECT DISTINCT - tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT ( NULL ) IS NOT NULL
----
-45
-71
-8

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

query I rowsort
SELECT DISTINCT - 33 * + tab2.col1 + - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1394
-2006
-2074

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

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

query I rowsort
SELECT + tab1.col0 + + 10 * - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-198
-252
-738

query I rowsort
SELECT ALL - tab1.col0 * - 41 FROM tab1 GROUP BY tab1.col0
----
1148
3362
902

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

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

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

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

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

query I rowsort
SELECT + cor0.col2 + + 10 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
18
55
81

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

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

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

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-399
SELECT - CAST( - 57 AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col0
----
57
57
57

skipif mysql # not compatible
query I rowsort label-399
SELECT - CAST ( - 57 AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col0
----
57
57
57

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

query I rowsort
SELECT - 88 + 5 FROM tab2 GROUP BY tab2.col2
----
-83
-83
-83

query I rowsort
SELECT - 52 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-110
-131
-139

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

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

query I rowsort
SELECT - tab0.col0 + 30 FROM tab0 GROUP BY tab0.col0
----
-13
-53
4

query I rowsort
SELECT ALL col0 * + cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

onlyif mysql # DIV for integer division: 
query I rowsort label-407
SELECT - cor0.col2 DIV + col2 + - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-46
-72
-9

skipif mysql # not compatible
query I rowsort label-407
SELECT - cor0.col2 / + col2 + - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-46
-72
-9

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

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 55 + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
113
134
142

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

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

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

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

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-421
SELECT - 9 DIV - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-421
SELECT - 9 / - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
1

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

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

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

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

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

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

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

query I rowsort
SELECT 7 * 92 AS col2 FROM tab1 GROUP BY tab1.col0
----
644
644
644

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

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

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

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

query I rowsort
SELECT + ( 38 ) + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
79
97
99

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

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

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

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

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

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

query I rowsort
SELECT - 3 * col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-135
-213
-24

query I rowsort
SELECT - 58 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1508
-2494
-4814

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

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

query I rowsort
SELECT - - 60 + 74 * tab0.col2 FROM tab0 GROUP BY col2
----
1836
2872
5906

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

query I rowsort
SELECT ALL col2 * - 95 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2280
-3610
-7505

query I rowsort
SELECT 60 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, col0
----
104
117
66

query I rowsort
SELECT tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING tab1.col0 >= ( NULL )
----

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

query I rowsort
SELECT DISTINCT tab0.col0 * 67 FROM tab0 GROUP BY col0
----
1742
2881
5561

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

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

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

query I rowsort
SELECT ALL cor0.col0 * 17 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1411
442
731

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col2 * - 89 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-4005
-6319
-712

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( + 31, - cor0.col1 * col1 + cor0.col2, - 14 * cor0.col1 ) + 37 * + 91 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3336

query I rowsort
SELECT - 38 * - col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1672
2166
228

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * cor0.col2 + - ( 38 ) col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1406
538
6203

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

query I rowsort
SELECT - 32 * + 89 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2848
-2848
-2848

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-472
SELECT ALL cor0.col1 * COALESCE ( + 65 DIV cor0.col1, 68 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

skipif mysql # not compatible
query I rowsort label-472
SELECT ALL cor0.col1 * COALESCE ( + 65 / cor0.col1, 68 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

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

query I rowsort
SELECT + 93 - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
14
55
69

query I rowsort
SELECT col1 * - tab1.col1 + - 48 FROM tab1 GROUP BY tab1.col1
----
-1984
-3297
-84

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

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

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

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

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

query I rowsort
SELECT - tab2.col2 FROM tab2 WHERE NOT ( NULL ) IS NOT NULL GROUP BY tab2.col2 HAVING NULL IS NOT NULL
----

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

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

query I rowsort
SELECT ALL col2 + + ( 90 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
135
161
98

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

query I rowsort
SELECT DISTINCT - 29 * + col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-2378
-638
-812

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * - cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - - 87 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
2088
3306
6873

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

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

query I rowsort
SELECT ALL - 89 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-4005
-6319
-712

query I rowsort
SELECT - 58 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-15
-32
25

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

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

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

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

query I rowsort
SELECT DISTINCT - - 28 - 38 * + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1606
-3126
-960

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

query I rowsort
SELECT DISTINCT 21 * + col1 - + cor0.col2 * + 89 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-4301
-5792
-6462

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

query I rowsort
SELECT - - col1 - 50 FROM tab2 GROUP BY tab2.col1
----
-9
11
9

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

query I rowsort
SELECT + 28 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-1260
-1988
-224

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

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

query I rowsort
SELECT + + 69 FROM tab2 GROUP BY col1
----
69
69
69

query I rowsort
SELECT ALL ( 93 ) FROM tab0 GROUP BY tab0.col0
----
93
93
93

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

query I rowsort
SELECT ALL + COALESCE ( col1, + 12 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

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

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

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

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

query I rowsort
SELECT ALL 7 + + 92 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col2
----
99
99
99

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

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

query I rowsort
SELECT DISTINCT + tab0.col2 + 12 FROM tab0 GROUP BY tab0.col2
----
36
50
91

query I rowsort
SELECT ALL 27 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1188
1539
162

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

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

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

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

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

query I rowsort
SELECT - tab2.col1 * - 46 AS col2 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
1886
2714
2806

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

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

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

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

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

query I rowsort
SELECT + tab0.col0 + tab0.col0 * 80 AS col2 FROM tab0 GROUP BY tab0.col0
----
2106
3483
6723

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

query I rowsort
SELECT tab2.col1 FROM tab2 WHERE NOT NULL > NULL GROUP BY tab2.col1
----

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-541
SELECT - + tab1.col2 DIV 92 AS col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-541
SELECT - + tab1.col2 / 92 AS col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

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

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

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

query I rowsort
SELECT DISTINCT - 56 FROM tab0 GROUP BY col1
----
-56

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

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

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

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

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

query I rowsort
SELECT + tab1.col2 * 2 + - 34 AS col1 FROM tab1 GROUP BY tab1.col2
----
-18
108
56

query I rowsort
SELECT + + tab0.col2 * 7 AS col1 FROM tab0 GROUP BY tab0.col2
----
168
266
553

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

query I rowsort
SELECT ALL - - 77 AS col0 FROM tab2 GROUP BY col1
----
77
77
77

query I rowsort
SELECT - cor0.col1 * - 93 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7533

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

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

query I rowsort
SELECT DISTINCT - 62 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-2542
-3658
-3782

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-562
SELECT - cor0.col0 + cor0.col2 DIV - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-29
-43
-83

skipif mysql # not compatible
query I rowsort label-562
SELECT - cor0.col0 + cor0.col2 / - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-29
-43
-83

query I rowsort
SELECT ALL - 42 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-36
15
2

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

query I rowsort
SELECT DISTINCT - 81 - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-126
-152
-89

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

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

query I rowsort
SELECT 6 * 14 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
84
84
84

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

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

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

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( 8, cor1.col0 * + 25 ) FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
8

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

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

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

query I rowsort
SELECT ALL 38 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
38
38
38

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

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

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

query I rowsort
SELECT ALL + 13 * + 17 FROM tab0 GROUP BY tab0.col0
----
221
221
221

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-591
SELECT tab0.col0 DIV + tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
27
44
84

skipif mysql # not compatible
query I rowsort label-591
SELECT tab0.col0 / + tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
27
44
84

query I rowsort
SELECT + tab2.col0 + 24 FROM tab2 GROUP BY tab2.col0
----
115
116
39

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

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

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

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

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

query I rowsort
SELECT + cor0.col1 + NULLIF ( + 83, - cor0.col1 * 63 ) * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-6642
0
0

query I rowsort
SELECT tab2.col1 - 36 FROM tab2 GROUP BY tab2.col1
----
23
25
5

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

query I rowsort
SELECT cor0.col1 * 63 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2583
3717
3843

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

onlyif mysql # DIV for integer division: 
query I rowsort label-603
SELECT cor0.col0 + + cor0.col0 DIV - 43 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
22
28
81

skipif mysql # not compatible
query I rowsort label-603
SELECT cor0.col0 + + cor0.col0 / - 43 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
22
28
81

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

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

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

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

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

query I rowsort
SELECT ALL + col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NULL
----

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

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

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

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

query I rowsort
SELECT tab0.col1 FROM tab0 GROUP BY col1 HAVING ( NULL ) NOT BETWEEN NULL AND ( tab0.col1 )
----

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

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

query I rowsort
SELECT DISTINCT 49 * + cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
2205
3479
392

query I rowsort
SELECT DISTINCT - - 42 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
125
68
85

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col1 * 77 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
3157
4543
4697

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

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

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

query I rowsort
SELECT DISTINCT + 96 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
17
38
9

query I rowsort
SELECT ALL 29 + + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
35
73
86

query I rowsort
SELECT 74 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1110
6734
6808

query I rowsort
SELECT ALL - tab2.col0 * + 23 FROM tab2 GROUP BY tab2.col0
----
-2093
-2116
-345

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-645
SELECT ALL - cor0.col2 DIV - 86 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-645
SELECT ALL - cor0.col2 / - 86 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL + + 52 AS col2 FROM tab1 GROUP BY col1
----
52
52
52

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + 45 * tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
4095
4140
675

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

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

query I rowsort
SELECT - 5 * + 38 AS col2 FROM tab2 GROUP BY col0
----
-190
-190
-190

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

query I rowsort
SELECT + + 52 FROM tab2 GROUP BY col1
----
52
52
52

query I rowsort
SELECT - cor0.col1 * + 2 + + cor0.col1 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2451
3036
36

query I rowsort
SELECT ALL 28 + cor0.col2 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1060
2082
3182

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-667
SELECT - 86 * cor0.col0 + cor0.col0 DIV + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
-2235
-3697
-7137

skipif mysql # not compatible
query I rowsort label-667
SELECT - 86 * cor0.col0 + cor0.col0 / + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
-2235
-3697
-7137

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

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

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

query I rowsort
SELECT cor0.col2 + ( - 67 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-9
12
20

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

query I rowsort
SELECT 93 FROM tab1 cor0 GROUP BY col1
----
93
93
93

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

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

query I rowsort
SELECT ALL + NULLIF ( col2, tab2.col2 ) AS col0 FROM tab2 GROUP BY col2
----
NULL
NULL
NULL

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

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

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

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

query I rowsort
SELECT DISTINCT + tab0.col2 AS col0 FROM tab0 WHERE NOT ( NULL ) IS NULL GROUP BY tab0.col2
----

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

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

query I rowsort
SELECT DISTINCT 16 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-22
-63
-8

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-688
SELECT + 29 DIV + col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
27
43
83

skipif mysql # not compatible
query I rowsort label-688
SELECT + 29 / + col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
27
43
83

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

query I rowsort
SELECT 9 * 61 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
549
549

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

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

query I rowsort
SELECT + 71 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
115
128
77

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-697
SELECT DISTINCT - tab2.col0 / - 11 FROM tab2 GROUP BY tab2.col0
----
1
8

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

query I rowsort
SELECT - tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT ( NULL ) < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col2 ) * cor0.col1 + - 89 col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-89
-89
1855

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

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

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

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

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

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

query I rowsort
SELECT ALL - 23 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-15
22
48

onlyif mysql # DIV for integer division: 
query I rowsort label-707
SELECT DISTINCT cor0.col0 DIV + cor0.col0 - cor0.col2 * - 45 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2026
3196
361

skipif mysql # not compatible
query I rowsort label-707
SELECT DISTINCT cor0.col0 / + cor0.col0 - cor0.col2 * - 45 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2026
3196
361

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

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

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

query I rowsort
SELECT - cor0.col1 - 68 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-112
-125
-74

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

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

query I rowsort
SELECT DISTINCT - NULLIF ( - col0, 91 ) AS col0 FROM tab2 GROUP BY col0
----
15
91
92

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

query I rowsort
SELECT 2 + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
46
59
8

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

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

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

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

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

query I rowsort
SELECT ALL + tab2.col1 * 91 FROM tab2 GROUP BY col1
----
3731
5369
5551

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

query I rowsort
SELECT 31 + 91 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
3762
5400
5582

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 28 * - 73 + + 14 col0 FROM tab1 GROUP BY tab1.col0
----
2058
2058
2058

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

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

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

query I rowsort
SELECT - - 9 * 82 AS col0 FROM tab1 GROUP BY tab1.col0
----
738
738
738

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-737
SELECT + tab0.col1 DIV + 28 FROM tab0 GROUP BY tab0.col1
----
0
2

skipif mysql # not compatible
query I rowsort label-737
SELECT + tab0.col1 / + 28 FROM tab0 GROUP BY tab0.col1
----
0
2

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

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

query I rowsort
SELECT DISTINCT + ( 70 ) FROM tab1 GROUP BY tab1.col2
----
70

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

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

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

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

query I rowsort
SELECT DISTINCT - 22 + tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
19
37
39

query I rowsort
SELECT ALL 17 + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
104
75
96

query I rowsort
SELECT 83 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2158
3569
6889

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - CASE 2 WHEN tab2.col2 THEN NULL WHEN 28 THEN tab2.col1 + - tab2.col0 END AS col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

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

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

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

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

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

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

query I rowsort
SELECT + - tab1.col2 * 25 FROM tab1 GROUP BY tab1.col2
----
-1125
-1775
-200

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

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

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

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

query I rowsort
SELECT 26 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-18
-31
20

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

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

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

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

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

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

query I rowsort
SELECT - 85 * + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3740
-4845
-510

query I rowsort
SELECT + col2 FROM tab1 GROUP BY tab1.col2 HAVING NULL NOT BETWEEN - col2 AND ( tab1.col2 )
----

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

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

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

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

query I rowsort
SELECT DISTINCT 24 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
1080
1704
192

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

query I rowsort
SELECT DISTINCT + - 44 * 4 + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-133
-150
-93

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-782
SELECT DISTINCT tab2.col0 + 58 DIV 63 FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif mysql # not compatible
query I rowsort label-782
SELECT DISTINCT tab2.col0 + 58 / 63 FROM tab2 GROUP BY tab2.col0
----
15
91
92

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

query I rowsort
SELECT - 84 + col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-1
-41
-58

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

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

query I rowsort
SELECT DISTINCT - tab1.col0 * 31 FROM tab1 GROUP BY col0
----
-2542
-682
-868

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

skipif mysql # not compatible
query I rowsort label-788
SELECT col0 / 21 FROM tab1 GROUP BY tab1.col0
----
1
1
3

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

query I rowsort
SELECT - NULLIF ( - tab2.col0, - tab2.col0 * 16 ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 85 * cor0.col0 + - 52 * + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, col0
----
-10803
-4447
-9952

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

query I rowsort
SELECT DISTINCT + + 87 FROM tab0 GROUP BY col0
----
87

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

query I rowsort
SELECT ALL + tab2.col0 * tab2.col0 + + 65 FROM tab2 GROUP BY col0
----
290
8346
8529

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + tab0.col0 * - 46 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1196
-1978
-3818

query I rowsort
SELECT cor0.col2 + 87 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
132
158
95

query I rowsort
SELECT + 21 + - 54 FROM tab0 GROUP BY tab0.col1
----
-33
-33

query I rowsort
SELECT ALL + 97 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
-2328
-3686
-7663

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col0 * 20 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1640
-440
-560

onlyif mysql # DIV for integer division: 
query I rowsort label-817
SELECT - cor0.col2 DIV - cor0.col2 + + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
25
39
80

skipif mysql # not compatible
query I rowsort label-817
SELECT - cor0.col2 / - cor0.col2 + + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
25
39
80

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

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

query I rowsort
SELECT 99 + - 47 * + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-1029
-1687
-3614

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

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

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

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

query I rowsort
SELECT + + ( - 79 ) FROM tab0 GROUP BY tab0.col2
----
-79
-79
-79

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-829
SELECT CASE - cor0.col0 WHEN CAST( NULL AS SIGNED ) THEN cor0.col2 END AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-829
SELECT CASE - cor0.col0 WHEN CAST ( NULL AS INTEGER ) THEN cor0.col2 END AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT col1 * + cor0.col2 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2, cor0.col1
----
2419
4720
5368

query I rowsort
SELECT 93 * + cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1410
8554
8648

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

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

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

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

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

query I rowsort
SELECT ALL + 18 * + 66 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1188
1188

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

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

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

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

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

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

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

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

query I rowsort
SELECT + + 54 * 88 AS col0 FROM tab0 GROUP BY tab0.col2
----
4752
4752
4752

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

query I rowsort
SELECT DISTINCT - 28 * - 72 FROM tab2 cor0 GROUP BY col2
----
2016

query I rowsort
SELECT ALL + 90 + 97 FROM tab0 AS cor0 GROUP BY cor0.col2
----
187
187
187

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

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

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

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

query I rowsort
SELECT ALL + - 61 * - tab0.col2 FROM tab0 GROUP BY col2
----
1464
2318
4819

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

query I rowsort
SELECT + cor0.col2 + 41 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
112
49
86

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

query I rowsort
SELECT tab0.col2 + + 47 FROM tab0 GROUP BY tab0.col2
----
126
71
85

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT tab0.col2 * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2 HAVING NULL < NULL
----

query I rowsort
SELECT ALL - - tab0.col0 * - 3 AS col2 FROM tab0 GROUP BY tab0.col0
----
-129
-249
-78

query I rowsort
SELECT ALL 91 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col2
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

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

query I rowsort
SELECT ALL - cor0.col2 + - cor0.col2 * 60 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-2745
-4331
-488

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( 21 ) + tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
62
80
82

query I rowsort
SELECT DISTINCT - 20 + - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-28
-65
-91

query I rowsort
SELECT + 68 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1768
-2924
-5644

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col1 * cor0.col1 + - 59 * 68 FROM tab0 AS cor0 GROUP BY col1
----
-10573
-4012

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-884
SELECT DISTINCT 33 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
5

skipif mysql # not compatible
query I rowsort label-884
SELECT DISTINCT 33 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
5

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

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

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

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

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

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

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

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

query I rowsort
SELECT - - 69 + 56 AS col2 FROM tab2 GROUP BY tab2.col2
----
125
125
125

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

onlyif mysql # DIV for integer division: 
query I rowsort label-894
SELECT - cor0.col2 DIV col2 + cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
40
58
60

skipif mysql # not compatible
query I rowsort label-894
SELECT - cor0.col2 / col2 + cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
40
58
60

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + + 30 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
109
117
88

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

query I rowsort
SELECT - cor0.col1 + - 47 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-106
-108
-88

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

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

query I rowsort
SELECT 70 + 62 * col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1000
5712
5774

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

query I rowsort
SELECT ALL 86 + + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
130
143
92

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

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

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

query I rowsort
SELECT + 82 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
123
141
143

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

query I rowsort
SELECT - ( - 96 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
96
96
96

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

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

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

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

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

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

query I rowsort
SELECT ALL + - 77 + 82 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
3285
4761
4925

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

query I rowsort
SELECT ALL cor0.col0 * 28 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
2296
616
784

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 + 97 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
133
2033
3346

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 14 FROM tab2 AS cor0 GROUP BY cor0.col0
----
14
14
14

query I rowsort
SELECT ALL + cor0.col2 * 98 + - 88 FROM tab0 cor0 GROUP BY cor0.col2
----
2264
3636
7654

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

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

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

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

query I rowsort
SELECT ALL 37 * col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
1665
2627
296

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

query I rowsort
SELECT ALL cor0.col2 + - 98 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col2
----
9 values hashing to e3c68e5848cebe179af62a667a10c52f

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-941
SELECT DISTINCT + col0 - tab0.col0 DIV + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
25
42
82

skipif mysql # not compatible
query I rowsort label-941
SELECT DISTINCT + col0 - tab0.col0 / + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
25
42
82

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

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

query I rowsort
SELECT ALL cor0.col0 * + 71 FROM tab0 AS cor0 GROUP BY col0
----
1846
3053
5893

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

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

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

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

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

query I rowsort
SELECT ALL 42 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1, cor1.col0
----
42
42
42

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

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

skipif mysql # not compatible
query I rowsort label-951
SELECT DISTINCT - cor0.col0 / - 78 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1

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

query I rowsort
SELECT ALL - - 40 FROM tab2 GROUP BY col0
----
40
40
40

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

query I rowsort
SELECT DISTINCT 86 - 2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
84

query I rowsort
SELECT col1 + 86 FROM tab2 GROUP BY col1
----
127
145
147

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

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

query I rowsort
SELECT - 30 - - 6 AS col1 FROM tab1 GROUP BY tab1.col0
----
-24
-24
-24

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-962
SELECT + - COALESCE ( 50, - tab2.col2, - tab2.col1 - CASE - tab2.col2 WHEN - tab2.col1 THEN + col2 DIV tab2.col0 WHEN 26 DIV col0 THEN NULL ELSE NULL END ) col2 FROM tab2 GROUP BY tab2.col2
----
-50
-50
-50

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-962
SELECT + - COALESCE ( 50, - tab2.col2, - tab2.col1 - CASE - tab2.col2 WHEN - tab2.col1 THEN + col2 / tab2.col0 WHEN 26 / col0 THEN NULL ELSE NULL END ) col2 FROM tab2 GROUP BY tab2.col2
----
-50
-50
-50

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

query I rowsort
SELECT - tab2.col0 + 37 AS col1 FROM tab2 GROUP BY tab2.col0
----
-54
-55
22

onlyif mysql # DIV for integer division: 
query I rowsort label-965
SELECT - 71 DIV 96 AS col1 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-965
SELECT - 71 / 96 AS col1 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT + - 33 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
26
28
8

query I rowsort
SELECT + 7 + tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
48
66
68

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

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

query I rowsort
SELECT - - ( - 99 ) FROM tab0 GROUP BY tab0.col0
----
-99
-99
-99

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 52 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
2288
2964
312

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-982
SELECT DISTINCT + 78 DIV + 90 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
0

skipif mysql # not compatible
query I rowsort label-982
SELECT DISTINCT + 78 / + 90 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
0

query I rowsort
SELECT + cor0.col0 * + cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

query I rowsort
SELECT - 97 * + 57 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5529
-5529
-5529

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

query I rowsort
SELECT cor0.col0 + 64 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
155
156
79

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

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col2 * 62 AS col2 FROM tab2 cor0 GROUP BY col2
----
-3596
-4898
-5394

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

query I rowsort
SELECT DISTINCT + tab1.col1 * + 35 FROM tab1 GROUP BY tab1.col1
----
1540
1995
210

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

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

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

query I rowsort
SELECT ALL - col0 + - 15 AS col0 FROM tab0 GROUP BY tab0.col0
----
-41
-58
-98

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

query I rowsort
SELECT DISTINCT + cor0.col1 * - cor0.col1 + + 43 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-1638
-3438
-3678

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

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

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

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

query I rowsort
SELECT + 94 * 64 AS col1 FROM tab0 GROUP BY tab0.col0
----
6016
6016
6016

query I rowsort
SELECT + - 62 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-2542
-3658
-3782

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

query I rowsort
SELECT 39 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
130
131
54

query I rowsort
SELECT ALL + ( - 43 ) FROM tab2 GROUP BY tab2.col1
----
-43
-43
-43

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + 75 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
119
132
81

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

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

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

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 90, + cor0.col1 + + 2 * - cor1.col1, + cor0.col1 * + cor1.col0 ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
90
90
90

onlyif mysql # DIV for integer division: 
query I rowsort label-1020
SELECT ALL 47 - 25 DIV - col2 FROM tab2 GROUP BY tab2.col2
----
47
47
47

skipif mysql # not compatible
query I rowsort label-1020
SELECT ALL 47 - 25 / - col2 FROM tab2 GROUP BY tab2.col2
----
47
47
47

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1022
SELECT 74 + + tab0.col2 DIV ( 97 ) FROM tab0 GROUP BY tab0.col2
----
74
74
74

skipif mysql # not compatible
query I rowsort label-1022
SELECT 74 + + tab0.col2 / ( 97 ) FROM tab0 GROUP BY tab0.col2
----
74
74
74

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

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

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

query I rowsort
SELECT ALL - tab2.col1 + 59 FROM tab2 GROUP BY col1
----
-2
0
18

query I rowsort
SELECT DISTINCT + 21 * 28 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
588

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

query I rowsort
SELECT ALL + 49 * 5 FROM tab2 GROUP BY tab2.col2
----
245
245
245

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

query I rowsort
SELECT DISTINCT - 39 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1599
-2301
-2379

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

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

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

query I rowsort
SELECT + tab2.col1 * 83 FROM tab2 GROUP BY tab2.col1
----
3403
4897
5063

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

query I rowsort
SELECT + 7 + 99 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
106
106
106

query I rowsort
SELECT DISTINCT + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL > NULL
----

query I rowsort
SELECT col2 * 9 FROM tab0 AS cor0 GROUP BY col2
----
216
342
711

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1045
SELECT DISTINCT - cor0.col0 DIV + 18 col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-2
-4

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1045
SELECT DISTINCT - cor0.col0 / + 18 col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-2
-4

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

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

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

query I rowsort
SELECT ALL + NULLIF ( tab2.col1, + tab2.col1 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

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

query I rowsort
SELECT DISTINCT - 38 * + 40 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1520

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

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

query I rowsort
SELECT ALL + tab1.col2 * - 9 AS col1 FROM tab1 GROUP BY tab1.col2
----
-405
-639
-72

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

query I rowsort
SELECT ( - cor0.col1 ) * - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, col0, cor0.col1
----
0
0
3483

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

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

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

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

query I rowsort
SELECT - 87 * + 19 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1561
-1562
-1638

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

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

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

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

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

query I rowsort
SELECT 4 * cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
364
368
60

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1067
SELECT + 45 DIV - 14 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-3
-3
-3

skipif mysql # not compatible
query I rowsort label-1067
SELECT + 45 / - 14 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-3
-3
-3

query I rowsort
SELECT - cor1.col0 * 91 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-2002
-2548
-7462

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

query I rowsort
SELECT - 30 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1230
-1770
-1830

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

query I rowsort
SELECT + col1 AS col0 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL NOT IN ( col1 )
----

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + 37 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
128
129
52

query I rowsort
SELECT ALL cor0.col1 + 80 FROM tab0 cor0 GROUP BY cor0.col1
----
161
80

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

query I rowsort
SELECT ALL + tab1.col1 FROM tab1 WHERE NOT NULL NOT IN ( tab1.col2 * + tab1.col2 ) GROUP BY tab1.col1
----

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + NULLIF ( 76, cor0.col0 ) col1 FROM tab2 cor0 GROUP BY cor0.col0
----
76
76
76

query I rowsort
SELECT DISTINCT + 98 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
98

query I rowsort
SELECT DISTINCT - 85 FROM tab1 GROUP BY tab1.col0
----
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 67 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-67

query I rowsort
SELECT - 95 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-95
-95

query I rowsort
SELECT col0 AS col2 FROM tab1 WHERE NOT NULL IS NULL GROUP BY col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT 6 AS col2 FROM tab0 GROUP BY tab0.col2
----
6

query I rowsort
SELECT 74 AS col1 FROM tab0 cor0 GROUP BY col2
----
74
74
74

onlyif mysql # DIV for integer division: 
query I rowsort label-1103
SELECT DISTINCT - cor0.col2 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-1103
SELECT DISTINCT - cor0.col2 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1

query I rowsort
SELECT + - 63 AS col2 FROM tab0 GROUP BY tab0.col2
----
-63
-63
-63

query I rowsort
SELECT 23 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
23
23
23

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - 54 FROM tab1 GROUP BY tab1.col0
----
-54
-54
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 53 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-53
-53
-53

query I rowsort
SELECT DISTINCT + - tab2.col1 + - 98 FROM tab2 GROUP BY tab2.col1
----
-139
-157
-159

query I rowsort
SELECT ALL - + 92 FROM tab0 GROUP BY tab0.col1
----
-92
-92

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
1008
1975
3116

query I rowsort
SELECT DISTINCT 99 + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
114
190
191

query I rowsort
SELECT ALL - tab1.col2 + - tab1.col2 * - 17 AS col1 FROM tab1 GROUP BY tab1.col2
----
1136
128
720

query I rowsort
SELECT - cor0.col2 - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-153
-30
-73

onlyif mysql # DIV for integer division: 
query I rowsort label-1115
SELECT DISTINCT cor0.col2 DIV cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-1115
SELECT DISTINCT cor0.col2 / cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT - - 84 FROM tab0 GROUP BY col1
----
84
84

query I rowsort
SELECT - + col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + 13 FROM tab0 GROUP BY tab0.col2
----
13

query I rowsort
SELECT ALL + 19 FROM tab1 GROUP BY tab1.col2
----
19
19
19

query I rowsort
SELECT ALL + 75 - + 87 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-12
-12
-12

query I rowsort
SELECT 23 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT ALL 14 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
14
14
14

onlyif mysql # DIV for integer division: 
query I rowsort label-1123
SELECT - + tab1.col0 DIV tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1123
SELECT - + tab1.col0 / tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col1 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + + tab0.col2 + 18 FROM tab0 GROUP BY tab0.col2
----
42
56
97

query I rowsort
SELECT - - col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL - 24 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-24
-24
-24

query I rowsort
SELECT DISTINCT + 89 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
89

query I rowsort
SELECT ALL 79 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT ALL + 21 FROM tab0 GROUP BY col2
----
21
21
21

query I rowsort
SELECT - tab1.col1 * 46 FROM tab1 GROUP BY tab1.col1
----
-2024
-2622
-276

query I rowsort
SELECT DISTINCT + tab0.col1 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT + - 78 FROM tab2 GROUP BY col1
----
-78

query I rowsort
SELECT + 26 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col1
----
26
26
26
26
26
26

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
15
91
92

query I rowsort
SELECT DISTINCT + col0 + cor0.col0 * cor0.col0 AS col2 FROM tab0 AS cor0 WHERE ( + col2 ) IS NOT NULL GROUP BY col0
----
1892
6972
702

query I rowsort
SELECT ALL - tab0.col0 * tab0.col0 FROM tab0 WHERE ( - col1 * + tab0.col2 ) IN ( - col2 ) GROUP BY tab0.col0
----

onlyif mysql # DIV for integer division: 
query I rowsort label-1138
SELECT - col0 + 6 DIV tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif mysql # not compatible
query I rowsort label-1138
SELECT - col0 + 6 / tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1139
SELECT DISTINCT - CAST( NULL AS SIGNED ) / 1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1139
SELECT DISTINCT - CAST ( NULL AS INTEGER ) / 1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT ALL - - tab1.col1 + - col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1141
SELECT ALL cor0.col0 DIV cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1141
SELECT ALL cor0.col0 / cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT + 26 + + 11 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT DISTINCT - tab0.col0 + + 43 * - 73 AS col2 FROM tab0 GROUP BY col0
----
-3165
-3182
-3222

query I rowsort
SELECT - tab1.col2 * - col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT ALL cor0.col0 + - col0 FROM tab0 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + + tab1.col1 + + col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
0
0
81

query I rowsort
SELECT 60 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
60
60
60

query I rowsort
SELECT ALL - 5 - col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-20
-96
-97

onlyif mysql # DIV for integer division: 
query I rowsort label-1150
SELECT ALL 21 DIV 69 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1150
SELECT ALL 21 / 69 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT + tab1.col1 * - 83 FROM tab1 GROUP BY tab1.col1
----
-3652
-4731
-498

query I rowsort
SELECT 78 * cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
2028
3354
6474

query I rowsort
SELECT col1 + + 35 AS col2 FROM tab2 GROUP BY tab2.col1
----
76
94
96

query I rowsort
SELECT - 86 FROM tab0 GROUP BY col1
----
-86
-86

query I rowsort
SELECT DISTINCT - col0 * - 35 AS col2 FROM tab0 GROUP BY tab0.col0
----
1505
2905
910

query I rowsort
SELECT DISTINCT - 24 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-24

query I rowsort
SELECT 9 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-72
9

query I rowsort
SELECT DISTINCT + 70 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
70

query I rowsort
SELECT 10 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
36
53
93

query I rowsort
SELECT 37 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
37
37
37

onlyif mysql # DIV for integer division: 
query I rowsort label-1161
SELECT ALL cor0.col2 DIV - 76 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1161
SELECT ALL cor0.col2 / - 76 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
0
0

query I rowsort
SELECT DISTINCT 95 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
95

query I rowsort
SELECT cor0.col2 * ( col2 ) FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-1165
SELECT DISTINCT col1 + + 63 DIV + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
16
45
58

skipif mysql # not compatible
query I rowsort label-1165
SELECT DISTINCT col1 + + 63 / + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
16
45
58

query I rowsort
SELECT ALL + cor0.col0 * col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0, cor0.col1
----
1032
2054
3154

onlyif mysql # DIV for integer division: 
query I rowsort label-1167
SELECT ALL - 77 DIV - cor0.col2 col0 FROM tab2 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-1167
SELECT ALL - 77 / - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
1

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab2 cor0 GROUP BY col2, cor0.col0, cor0.col0
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL 37 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
37
37
37

query I rowsort
SELECT + 25 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT ALL 98 - 25 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
73
73
73

query I rowsort
SELECT ALL 22 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-23
-49
14

query I rowsort
SELECT tab0.col2 * tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT ALL - + 16 AS col1 FROM tab0 GROUP BY tab0.col2
----
-16
-16
-16

query I rowsort
SELECT + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT NULLIF ( + col2, cor0.col2 * cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 34 col0 FROM tab2 GROUP BY col2
----
34
34
34

query I rowsort
SELECT 94 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
94
94
94

query I rowsort
SELECT + ( + 1 ) * - cor0.col1 + 78 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3
78

query I rowsort
SELECT DISTINCT 99 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
99

query I rowsort
SELECT - 95 - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-117
-123
-177

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1184
SELECT DISTINCT + CAST( 80 AS SIGNED ) * - 17 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1360

skipif mysql # not compatible
query I rowsort label-1184
SELECT DISTINCT + CAST ( 80 AS INTEGER ) * - 17 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1360

query I rowsort
SELECT - 54 AS col1 FROM tab0 GROUP BY tab0.col0
----
-54
-54
-54

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
118
122
82

query I rowsort
SELECT ALL 32 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1408
1824
192

query I rowsort
SELECT + 21 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT 64 FROM tab0 GROUP BY col1
----
64
64

query I rowsort
SELECT - tab1.col2 AS col2 FROM tab1 WHERE col0 NOT IN ( tab1.col2 + tab1.col1 ) GROUP BY tab1.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT 73 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
73
73
73

query I rowsort
SELECT + 31 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
31
31
31

query I rowsort
SELECT DISTINCT 32 FROM tab2 AS cor0 GROUP BY cor0.col1
----
32

query I rowsort
SELECT ALL + cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-1195
SELECT DISTINCT 13 DIV cor0.col0 - + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

skipif mysql # not compatible
query I rowsort label-1195
SELECT DISTINCT 13 / cor0.col0 - + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL - col1 * + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1936
-3249
-36

query I rowsort
SELECT + 31 FROM tab0 GROUP BY tab0.col0
----
31
31
31

query I rowsort
SELECT DISTINCT - 71 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-71

query I rowsort
SELECT 47 AS col2 FROM tab0 GROUP BY tab0.col1
----
47
47

query I rowsort
SELECT NULLIF ( + col1, cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - cor0.col1 + 82 FROM tab1 AS cor0 GROUP BY cor0.col1
----
25
38
76

onlyif mysql # DIV for integer division: 
query I rowsort label-1203
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-1203
SELECT ALL - tab2.col1 / tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 37 + col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
118
37
37

query I rowsort
SELECT DISTINCT cor0.col2 + + 24 AS col2 FROM tab0 cor0 GROUP BY col2, cor0.col2, col2
----
103
48
62

query I rowsort
SELECT 75 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT 4 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-364
-368
-60

query I rowsort
SELECT ALL - cor0.col0 + + 96 * + 15 FROM tab0 AS cor0 GROUP BY col0
----
1357
1397
1414

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + col2 * col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 6 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT cor0.col2 + - 6 * col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-120
-190
-395

query I rowsort
SELECT + - ( - col1 ) FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT 71 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
71

query I rowsort
SELECT DISTINCT - 29 AS col2 FROM tab1 GROUP BY tab1.col1
----
-29

query I rowsort
SELECT 63 + - 44 AS col0 FROM tab0 GROUP BY tab0.col2
----
19
19
19

query I rowsort
SELECT DISTINCT 9 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
9

query I rowsort
SELECT ALL 63 * col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
2583
3717
3843

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 57, + tab0.col0 ) FROM tab0 GROUP BY tab0.col2
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 40 col1 FROM tab2 GROUP BY tab2.col2
----
-40
-40
-40

query I rowsort
SELECT cor0.col0 - - 81 FROM tab2 cor0 GROUP BY cor0.col0
----
172
173
96

query I rowsort
SELECT DISTINCT - 77 + 20 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-57

query I rowsort
SELECT - - tab1.col2 + 59 AS col1 FROM tab1 GROUP BY tab1.col2
----
104
130
67

query I rowsort
SELECT DISTINCT - 50 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 44 * - 90 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-3960

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, col0
----
26
43
83

query I rowsort
SELECT + - tab0.col0 + ( 7 ) FROM tab0 GROUP BY tab0.col0
----
-19
-36
-76

query I rowsort
SELECT - col1 + 3 FROM tab1 AS cor0 GROUP BY col1
----
-3
-41
-54

query I rowsort
SELECT tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT DISTINCT - col2 + - tab1.col2 AS col1 FROM tab1 GROUP BY col2 HAVING NULL < NULL
----

query I rowsort
SELECT - 4 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4
-4
-4

query I rowsort
SELECT ALL 74 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
74
74
74

query I rowsort
SELECT + tab2.col1 * + 65 AS col0 FROM tab2 GROUP BY tab2.col1
----
2665
3835
3965

query I rowsort
SELECT 86 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
86
86
86

query I rowsort
SELECT cor0.col0 * 10 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
220
280
820

query I rowsort
SELECT ALL + 96 AS col1 FROM tab0 GROUP BY tab0.col1
----
96
96

query I rowsort
SELECT ALL - 80 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-80
-80
-80

onlyif mysql # DIV for integer division: 
query I rowsort label-1241
SELECT DISTINCT + 92 + - cor0.col1 DIV - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
92
93

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1241
SELECT DISTINCT + 92 + - cor0.col1 / - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
92
93

query I rowsort
SELECT 71 * - 62 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4402
-4402
-4402

query I rowsort
SELECT + 34 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
34
34
34

onlyif mysql # DIV for integer division: 
query I rowsort label-1244
SELECT DISTINCT cor0.col2 DIV + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-1244
SELECT DISTINCT cor0.col2 / + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT - 48 FROM tab0 GROUP BY tab0.col1
----
-48
-48

query I rowsort
SELECT ALL 20 FROM tab0 cor0 GROUP BY col1
----
20
20

query I rowsort
SELECT - tab0.col1 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT - cor0.col1 * 95 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3895
-5605
-5795

onlyif mysql # DIV for integer division: 
query I rowsort label-1249
SELECT + cor0.col2 DIV + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1249
SELECT + cor0.col2 / + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
1

query I rowsort
SELECT ALL - col0 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab0 AS cor0 WHERE ( NULL ) IS NULL GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

onlyif mysql # DIV for integer division: 
query I rowsort label-1253
SELECT + cor0.col0 DIV + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-1253
SELECT + cor0.col0 / + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
0
1
1

query I rowsort
SELECT ALL col0 + - 7 AS col2 FROM tab2 GROUP BY tab2.col0
----
8
84
85

query I rowsort
SELECT DISTINCT + 98 * + col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
2548
4214
8134

query I rowsort
SELECT 25 - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-3
-57
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 50 col0 FROM tab1 GROUP BY tab1.col0
----
50
50
50

query I rowsort
SELECT ALL 13 + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
13
94

query I rowsort
SELECT ALL 23 * - 94 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2162
-2162
-2162

query I rowsort
SELECT + + tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 16 + + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
103
74
95

query I rowsort
SELECT - cor0.col2 * - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT tab2.col0 + + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT 77 * - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-1848
-2926
-6083

query I rowsort
SELECT ALL 96 - col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
4
5
81

query I rowsort
SELECT - col1 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - 40 AS col0 FROM tab0 GROUP BY col2
----
-40
-40
-40

query I rowsort
SELECT + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT + + ( - tab2.col0 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT col1 * tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT 37 * tab1.col2 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1710
2698
304

query I rowsort
SELECT ALL - 38 FROM tab0 GROUP BY col1
----
-38
-38

query I rowsort
SELECT DISTINCT - ( 66 ) FROM tab2 GROUP BY tab2.col2
----
-66

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1275
SELECT DISTINCT CAST( NULL AS DECIMAL ) FROM tab1 cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1275
SELECT DISTINCT CAST ( NULL AS REAL ) FROM tab1 cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT - ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-24
-38
-79

query I rowsort
SELECT ALL + - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT 73 FROM tab1 AS cor0 GROUP BY cor0.col2
----
73
73
73

onlyif mysql # DIV for integer division: 
query I rowsort label-1279
SELECT DISTINCT - CASE cor0.col2 WHEN + cor0.col2 THEN 52 DIV + cor0.col2 WHEN + cor0.col2 * col2 THEN cor0.col2 + cor0.col2 END AS col0 FROM tab2 AS cor0 GROUP BY col2
----
0

skipif mysql # not compatible
query I rowsort label-1279
SELECT DISTINCT - CASE cor0.col2 WHEN + cor0.col2 THEN 52 / + cor0.col2 WHEN + cor0.col2 * col2 THEN cor0.col2 + cor0.col2 END AS col0 FROM tab2 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 27 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2457
2484
405

query I rowsort
SELECT tab1.col2 * - 28 FROM tab1 GROUP BY tab1.col2
----
-1260
-1988
-224

query I rowsort
SELECT - 61 FROM tab2 GROUP BY col2
----
-61
-61
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-1286
SELECT ALL cor0.col0 DIV cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1286
SELECT ALL cor0.col0 / cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

query I rowsort
SELECT - 83 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-83
-83
-83

query I rowsort
SELECT ALL 62 FROM tab0 AS cor0 GROUP BY col2
----
62
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab0.col0 col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-1290
SELECT DISTINCT - tab0.col2 DIV + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-1290
SELECT DISTINCT - tab0.col2 / + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1

query I rowsort
SELECT DISTINCT 21 - + 54 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1383
-2301
-4461

query I rowsort
SELECT DISTINCT + 92 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2208
3496
7268

onlyif mysql # DIV for integer division: 
query I rowsort label-1293
SELECT cor0.col0 DIV - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1293
SELECT cor0.col0 / - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
0
1944

query I rowsort
SELECT ALL cor0.col0 * 33 FROM tab1 AS cor0 GROUP BY cor0.col2, col0, cor0.col1
----
2706
726
924

query I rowsort
SELECT ALL cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1, cor0.col0, cor1.col2
----
9 values hashing to ad2e5fa6d094292bda21bf46c78171b8

query I rowsort
SELECT DISTINCT - 91 * - col0 FROM tab0 AS cor0 GROUP BY col0
----
2366
3913
7553

query I rowsort
SELECT cor0.col2 * - cor0.col2 + 24 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1972
-4345
-5481

query I rowsort
SELECT - ( CASE cor0.col0 WHEN + 31 THEN - cor0.col1 ELSE cor0.col1 * cor0.col0 END ) AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1, cor0.col1
----
-3772
-5369
-915

query I rowsort
SELECT ALL NULLIF ( - cor0.col2, cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1 HAVING NOT ( NULL IS NOT NULL ) AND NULL IS NULL
----
41
59
61

query I rowsort
SELECT ALL + 89 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT - cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col2
----
9 values hashing to 976cc931872319f6c60dc588d08fa95d

query I rowsort
SELECT cor0.col0 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
166
52
86

query I rowsort
SELECT + cor0.col1 * 19 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1121
1159
779

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT ALL + 84 FROM tab1 GROUP BY tab1.col2
----
84
84
84

query I rowsort
SELECT 1 * col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - 26 AS col1 FROM tab2 GROUP BY col0
----
-26
-26
-26

query I rowsort
SELECT 11 + + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
102
103
26

query I rowsort
SELECT DISTINCT - 18 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-18

query I rowsort
SELECT + col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - 63 AS col1 FROM tab1 GROUP BY tab1.col0
----
-63

query I rowsort
SELECT DISTINCT ( + tab0.col0 ) AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT 31 FROM tab1 GROUP BY tab1.col0
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * 94 + - tab0.col2 col2 FROM tab0 GROUP BY col2
----
2232
3534
7347

onlyif mysql # DIV for integer division: 
query I rowsort label-1317
SELECT - tab1.col1 DIV tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1317
SELECT - tab1.col1 / tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - col0 * 43 FROM tab2 cor0 GROUP BY cor0.col0
----
-3913
-3956
-645

query I rowsort
SELECT DISTINCT - 50 FROM tab1 GROUP BY tab1.col2
----
-50

query I rowsort
SELECT DISTINCT cor0.col2 + 22 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
30
67
93

query I rowsort
SELECT - 53 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-53
-53
-53

query I rowsort
SELECT + cor0.col1 * 17 + 25 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
127
773
994

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col1 * col1 col0 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL - + 10 FROM tab0 GROUP BY tab0.col0
----
-10
-10
-10

query I rowsort
SELECT col1 AS col0 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL + 90 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
90
90
90

query I rowsort
SELECT DISTINCT col1 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT ALL + 55 AS col0 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
55
55
55

query I rowsort
SELECT 21 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
21
21

query I rowsort
SELECT - + 27 FROM tab0 GROUP BY tab0.col0
----
-27
-27
-27

query I rowsort
SELECT - - 83 FROM tab2 GROUP BY tab2.col1
----
83
83
83

query I rowsort
SELECT - 32 * cor0.col1 + + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-1364
-1767
-186

query I rowsort
SELECT ALL + cor0.col1 + 4 FROM tab2 AS cor0 GROUP BY cor0.col1
----
45
63
65

onlyif mysql # DIV for integer division: 
query I rowsort label-1334
SELECT ALL + - tab1.col2 DIV - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1334
SELECT ALL + - tab1.col2 / - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT - 39 AS col0 FROM tab0 GROUP BY col2
----
-39
-39
-39

query I rowsort
SELECT ALL + - 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 DISTINCT - cor0.col0 + cor0.col0 * cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
210
8190
8372

query I rowsort
SELECT ALL ( + 31 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
31
31
31

query I rowsort
SELECT DISTINCT cor0.col1 * col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
1596
3608

query I rowsort
SELECT DISTINCT - 66 AS col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-66

onlyif mysql # DIV for integer division: 
query I rowsort label-1341
SELECT - cor0.col0 DIV cor0.col0 + 60 FROM tab2 AS cor0 GROUP BY col0
----
59
59
59

skipif mysql # not compatible
query I rowsort label-1341
SELECT - cor0.col0 / cor0.col0 + 60 FROM tab2 AS cor0 GROUP BY col0
----
59
59
59

query I rowsort
SELECT + 17 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
17
17
17

query I rowsort
SELECT ALL - 15 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-15
-15
-15

query I rowsort
SELECT ALL + tab2.col0 FROM tab2 GROUP BY col0 HAVING - col0 > NULL
----

query I rowsort
SELECT cor0.col1 - - 59 FROM tab0 cor0 GROUP BY cor0.col1
----
140
59

onlyif mysql # DIV for integer division: 
query I rowsort label-1346
SELECT + cor0.col2 DIV - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1346
SELECT + cor0.col2 / - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 37 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
37
37
37

query I rowsort
SELECT ( + cor0.col1 ) + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
114
12
88

query I rowsort
SELECT DISTINCT 81 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
81

query I rowsort
SELECT + ( + 28 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
28
28
28

query I rowsort
SELECT 88 AS col1 FROM tab2 GROUP BY col2
----
88
88
88

query I rowsort
SELECT 57 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
57
57
57

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 + COALESCE ( + cor0.col2, 49 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 58, + tab0.col1 * + col0, - tab0.col1 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
-58
-58
-58

query I rowsort
SELECT DISTINCT + 73 FROM tab0 GROUP BY tab0.col2
----
73

query I rowsort
SELECT ALL - 59 - + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-150
-151
-74

query I rowsort
SELECT + 41 AS col1 FROM tab1 GROUP BY tab1.col0
----
41
41
41

query I rowsort
SELECT cor0.col2 * + 22 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1562
176
990

query I rowsort
SELECT DISTINCT - 67 AS col0 FROM tab0 GROUP BY tab0.col2
----
-67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - 30 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-30
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 * col2 col0 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT + 47 * + 69 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
3243

query I rowsort
SELECT ALL - tab2.col0 - + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT ALL col2 + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT DISTINCT + 88 - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
6
60
66

query I rowsort
SELECT 26 AS col1 FROM tab0 GROUP BY tab0.col0
----
26
26
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 33 * tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
1353
1947
2013

query I rowsort
SELECT DISTINCT 59 FROM tab2 GROUP BY tab2.col0
----
59

query I rowsort
SELECT DISTINCT - - 82 FROM tab1 GROUP BY col2
----
82

query I rowsort
SELECT tab2.col1 FROM tab2 WHERE - col1 IN ( tab2.col1 ) GROUP BY tab2.col1
----

query I rowsort
SELECT ALL + tab2.col1 * 33 AS col1 FROM tab2 GROUP BY tab2.col1
----
1353
1947
2013

query I rowsort
SELECT tab2.col0 + + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT + + ( 78 ) FROM tab0 GROUP BY tab0.col0
----
78
78
78

query I rowsort
SELECT 3 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
3
3

query I rowsort
SELECT cor0.col0 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
133
150
76

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT 73 + col1 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1754
3554
3794

query I rowsort
SELECT DISTINCT - 71 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-71

query I rowsort
SELECT ALL + + tab2.col1 * 40 FROM tab2 GROUP BY tab2.col1
----
1640
2360
2440

query I rowsort
SELECT ALL + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT - 49 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-49
-49
-49

query I rowsort
SELECT ALL tab1.col2 FROM tab1 WHERE NULL NOT IN ( tab1.col0 * tab1.col1 ) GROUP BY tab1.col2
----

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1384
SELECT ALL + CAST( + 40 AS SIGNED ) * - 46 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-1840
-1840
-1840

skipif mysql # not compatible
query I rowsort label-1384
SELECT ALL + CAST ( + 40 AS INTEGER ) * - 46 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-1840
-1840
-1840

query I rowsort
SELECT DISTINCT cor0.col2 + - 1 * cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT 75 FROM tab0 GROUP BY tab0.col2
----
75

query I rowsort
SELECT 10 * - 63 FROM tab2 GROUP BY col2
----
-630
-630
-630

query I rowsort
SELECT ALL - 65 AS col2 FROM tab1 GROUP BY col0
----
-65
-65
-65

query I rowsort
SELECT - 47 FROM tab0 GROUP BY tab0.col1
----
-47
-47

query I rowsort
SELECT ALL 69 + 61 * - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col2
----
-1395
-2249
-4750

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 2 col2 FROM tab2 GROUP BY tab2.col0
----
-2

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
26
43
83

query I rowsort
SELECT + 7 FROM tab0 GROUP BY col2
----
7
7
7

query I rowsort
SELECT DISTINCT + 43 FROM tab1 GROUP BY col1
----
43

query I rowsort
SELECT 0 - 72 AS col1 FROM tab1 GROUP BY tab1.col0
----
-72
-72
-72

onlyif mysql # DIV for integer division: 
query I rowsort label-1396
SELECT ALL + cor0.col2 DIV cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1396
SELECT ALL + cor0.col2 / cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT - 13 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-13
-13
-13

query I rowsort
SELECT ALL - - tab1.col1 - 2 FROM tab1 GROUP BY tab1.col1
----
4
42
55

query I rowsort
SELECT ALL 56 FROM tab2, tab0 AS cor0 GROUP BY tab2.col1
----
56
56
56

query I rowsort
SELECT ALL + 82 FROM tab1 AS cor0 GROUP BY cor0.col1
----
82
82
82

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, col2
----
26
43
83

query I rowsort
SELECT cor0.col0 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

onlyif mysql # DIV for integer division: 
query I rowsort label-1403
SELECT 2 DIV + 57 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1403
SELECT 2 / + 57 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col0 - cor0.col1 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
-124
-26
-83

query I rowsort
SELECT + tab0.col2 + + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING ( NULL ) IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - 91 AS col2 FROM tab2 AS cor0 GROUP BY col0, col1
----
-91
-91
-91

query I rowsort
SELECT DISTINCT 52 FROM tab2 AS cor0 GROUP BY col0
----
52

query I rowsort
SELECT DISTINCT + 79 AS col1 FROM tab0 GROUP BY tab0.col0
----
79

query I rowsort
SELECT ALL + - 88 FROM tab2 GROUP BY tab2.col2
----
-88
-88
-88

query I rowsort
SELECT DISTINCT + 67 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
67

query I rowsort
SELECT ALL - col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL - cor0.col0 - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-166
-52
-86

query I rowsort
SELECT DISTINCT cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 20 + - tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
-61
20

query I rowsort
SELECT + 83 AS col2 FROM tab1 GROUP BY tab1.col1
----
83
83
83

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 ALL - - col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT cor0.col0 - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT ALL 22 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
22
22

query I rowsort
SELECT ALL + 38 FROM tab0 AS cor0 GROUP BY cor0.col1
----
38
38

query I rowsort
SELECT 26 * col0 AS col1 FROM tab2 GROUP BY col0
----
2366
2392
390

query I rowsort
SELECT 32 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col0, col2
----
-26
-43
-83

query I rowsort
SELECT - 13 AS col0 FROM tab1 GROUP BY tab1.col0
----
-13
-13
-13

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - NULLIF ( cor0.col2, - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - 77 FROM tab0 GROUP BY col2
----
-77
-77
-77

query I rowsort
SELECT - 93 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-93
-93
-93

query I rowsort
SELECT DISTINCT 31 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
31

query I rowsort
SELECT ALL - tab1.col0 - + 18 AS col1 FROM tab1 GROUP BY tab1.col0
----
-100
-40
-46

query I rowsort
SELECT ALL + tab2.col0 + + tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
182
184
30

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
0
0
81

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
225
8281
8464

query I rowsort
SELECT + 74 * + 34 FROM tab0 cor0 GROUP BY cor0.col0
----
2516
2516
2516

query I rowsort
SELECT DISTINCT + tab1.col0 - col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT - 1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT + cor0.col1 * 23 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1357
1403
943

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 + 67 + tab1.col0 FROM tab1 GROUP BY col0
----
149
89
95

query I rowsort
SELECT DISTINCT + ( 58 ) FROM tab2 GROUP BY tab2.col1
----
58

query I rowsort
SELECT ALL 71 FROM tab2 AS cor0 GROUP BY col2
----
71
71
71

query I rowsort
SELECT + tab1.col1 * tab1.col1 AS col2 FROM tab1 WHERE NOT NULL IS NULL GROUP BY tab1.col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT + cor0.col0 + cor0.col0 FROM tab0 cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT DISTINCT - - 9 FROM tab2 GROUP BY tab2.col2
----
9

query I rowsort
SELECT DISTINCT - 7 AS col0 FROM tab2 GROUP BY tab2.col2
----
-7

query I rowsort
SELECT - 83 * - cor0.col2 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4872
6636
7308

query I rowsort
SELECT DISTINCT + 85 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 87 col1 FROM tab0 GROUP BY tab0.col0
----
-87

query I rowsort
SELECT + 2 FROM tab1 cor0 GROUP BY cor0.col1, col0, cor0.col1
----
2
2
2

query I rowsort
SELECT DISTINCT - 11 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-11

query I rowsort
SELECT ALL - 89 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
-89
-89
-89

query I rowsort
SELECT 82 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
82
82
82

query I rowsort
SELECT ALL cor0.col1 * + 70 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3080
3990
420

query I rowsort
SELECT + 28 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
28
28
28

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
-22
-28
-82

query I rowsort
SELECT - - 4 * 29 AS col1 FROM tab0 GROUP BY tab0.col1
----
116
116

query I rowsort
SELECT ALL + + ( - tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + cor0.col1 - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL - 75 * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
1650
2100
6150

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + cor0.col0 col0 FROM tab1 AS cor0 GROUP BY col0
----
164
44
56

query I rowsort
SELECT + cor0.col2 + - 16 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
22
63
8

query I rowsort
SELECT DISTINCT + tab1.col1 - tab1.col1 * + 33 FROM tab1 GROUP BY tab1.col1
----
-1408
-1824
-192

query I rowsort
SELECT - tab1.col1 FROM tab1 WHERE NULL IS NOT NULL GROUP BY col1
----

query I rowsort
SELECT ALL - - 10 FROM tab1 GROUP BY tab1.col0
----
10
10
10

query I rowsort
SELECT DISTINCT - tab0.col2 * col2 AS col2 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 59 col2 FROM tab1 GROUP BY tab1.col0
----
-59

query I rowsort
SELECT + NULLIF ( tab0.col1, tab0.col1 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT cor0.col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1444
-576
-6241

onlyif mysql # DIV for integer division: 
query I rowsort label-1474
SELECT DISTINCT cor0.col1 + col1 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
40
58
60

skipif mysql # not compatible
query I rowsort label-1474
SELECT DISTINCT cor0.col1 + col1 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
40
58
60

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1475
SELECT - + CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1475
SELECT - + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 46 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2070
-3266
-368

query I rowsort
SELECT cor0.col2 * + 66 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3828
5214
5742

query I rowsort
SELECT - cor0.col0 - 11 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-37
-54
-94

query I rowsort
SELECT DISTINCT - 17 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-17

query I rowsort
SELECT DISTINCT 14 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
14

query I rowsort
SELECT DISTINCT 58 FROM tab2 AS cor0 GROUP BY cor0.col1, col1, col0
----
58

query I rowsort
SELECT ALL + NULLIF ( + cor0.col2, - cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 98 col0 FROM tab0 GROUP BY tab0.col1
----
98
98

query I rowsort
SELECT tab0.col0 + 95 FROM tab0 GROUP BY tab0.col0
----
121
138
178

query I rowsort
SELECT DISTINCT cor0.col2 + 26 FROM tab0 AS cor0 GROUP BY cor0.col2
----
105
50
64

query I rowsort
SELECT + tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT ( NULL ) <> + tab0.col1
----

query I rowsort
SELECT + tab0.col2 * 38 AS col1 FROM tab0 GROUP BY tab0.col2
----
1444
3002
912

query I rowsort
SELECT ALL - 2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2
-2
-2

query I rowsort
SELECT ALL 4 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
4
4
4

query I rowsort
SELECT DISTINCT + 4 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4

onlyif mysql # DIV for integer division: 
query I rowsort label-1491
SELECT + cor0.col0 DIV + 69 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-1491
SELECT + cor0.col0 / + 69 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1
1

query I rowsort
SELECT DISTINCT - tab2.col2 + + 96 AS col2 FROM tab2 GROUP BY col2
----
17
38
9

query I rowsort
SELECT ALL col0 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT tab1.col0 * - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0 HAVING NULL IS NOT NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-1496
SELECT DISTINCT 9 DIV - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-1496
SELECT DISTINCT 9 / - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
0

query I rowsort
SELECT + 54 FROM tab0 GROUP BY tab0.col0
----
54
54
54

query I rowsort
SELECT DISTINCT 34 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
34

query I rowsort
SELECT ALL 6 FROM tab0 AS cor0 GROUP BY col0
----
6
6
6

query I rowsort
SELECT + tab0.col0 - + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT - 11 * tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-484
-627
-66

query I rowsort
SELECT DISTINCT 64 FROM tab0 GROUP BY tab0.col1
----
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT - col1 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col1
----
-3772
-5369
-915

query I rowsort
SELECT + 78 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
78
78
78

query I rowsort
SELECT NULLIF ( tab0.col0, 68 + - col0 ) FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL - 16 AS col2 FROM tab0 GROUP BY tab0.col2
----
-16
-16
-16

query I rowsort
SELECT + cor0.col0 - + 63 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
-48
28
29

query I rowsort
SELECT ALL 26 * - 18 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-468
-468

query I rowsort
SELECT cor0.col0 - - cor0.col0 * 74 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1125
6825
6900

query I rowsort
SELECT DISTINCT - 75 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-75

query I rowsort
SELECT + - 62 FROM tab0 GROUP BY tab0.col1
----
-62
-62

query I rowsort
SELECT col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT 25 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
25
25
25

onlyif mysql # DIV for integer division: 
query I rowsort label-1515
SELECT - cor0.col0 - cor0.col2 DIV cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-23
-28
-83

skipif mysql # not compatible
query I rowsort label-1515
SELECT - cor0.col0 - cor0.col2 / cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-23
-28
-83

query I rowsort
SELECT + tab2.col2 * - tab2.col2 + - 96 FROM tab2 GROUP BY col2
----
-3460
-6337
-7665

query I rowsort
SELECT DISTINCT - 31 FROM tab1 cor0 GROUP BY cor0.col0
----
-31

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 40, tab2.col0, ( tab2.col1 ) * - 44 - tab2.col2 ) * - 62 FROM tab2 GROUP BY tab2.col2
----
-2480
-2480
-2480

query I rowsort
SELECT - 23 AS col0 FROM tab2 GROUP BY tab2.col2
----
-23
-23
-23

query I rowsort
SELECT - 44 FROM tab2 GROUP BY tab2.col2
----
-44
-44
-44

query I rowsort
SELECT + + 66 FROM tab0 GROUP BY tab0.col0
----
66
66
66

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col0
----
9 values hashing to 559da8f454c4e5599b87319641a4f49a

query I rowsort
SELECT cor1.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT ALL + 20 FROM tab0 AS cor0 GROUP BY cor0.col0
----
20
20
20

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1525
SELECT + CAST( NULL AS SIGNED ) + - cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1525
SELECT + CAST ( NULL AS INTEGER ) + - cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( 44 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
44

query I rowsort
SELECT DISTINCT NULLIF ( + cor0.col1, cor0.col1 + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - - tab0.col0 * + 82 FROM tab0 GROUP BY tab0.col0
----
2132
3526
6806

query I rowsort
SELECT DISTINCT - tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL > NULL
----

query I rowsort
SELECT DISTINCT + - 27 + + 46 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1169
1951
3791

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1531
SELECT - cor0.col1 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1531
SELECT - cor0.col1 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT - 19 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-19
-19
-19

query I rowsort
SELECT - 67 + tab1.col1 * + col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-31
1869
3182

query I rowsort
SELECT 62 FROM tab1 AS cor0 GROUP BY col0
----
62
62
62

query I rowsort
SELECT ALL tab0.col0 + + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT ALL - tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT - tab1.col1 * + 6 FROM tab1 GROUP BY tab1.col1
----
-264
-342
-36

query I rowsort
SELECT DISTINCT 96 FROM tab2 AS cor0 GROUP BY col2, cor0.col0, cor0.col2
----
96

query I rowsort
SELECT cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0, col2
----
45
71
8

query I rowsort
SELECT col0 + 65 * 98 AS col1 FROM tab1 GROUP BY tab1.col0
----
6392
6398
6452

query I rowsort
SELECT 88 + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2, col1
----
1532
6329
664

query I rowsort
SELECT - - col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT - 23 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-23
-23

query I rowsort
SELECT - 8 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-8
-8
-8

query I rowsort
SELECT + cor0.col2 - + 78 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-40
-54
1

query I rowsort
SELECT 29 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
29
29
29

query I rowsort
SELECT + 79 FROM tab1 GROUP BY col0
----
79
79
79

query I rowsort
SELECT ALL ( - 45 ) - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-127
-67
-73

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
----
0
6561

query I rowsort
SELECT ALL + 87 FROM tab2 GROUP BY tab2.col0
----
87
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - cor0.col2 * 1 col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-17
-20
-26

query I rowsort
SELECT + 91 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT DISTINCT + 64 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
3712
5056
5568

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1555
SELECT ALL CAST( NULL AS SIGNED ) + 24 FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1555
SELECT ALL CAST ( NULL AS INTEGER ) + 24 FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 51 FROM tab2 GROUP BY tab2.col1
----
51

query I rowsort
SELECT + 79 FROM tab2 GROUP BY tab2.col1
----
79
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - 7 * cor0.col0 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-156
-258
-498

query I rowsort
SELECT DISTINCT - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IN ( - tab1.col2 )
----

query I rowsort
SELECT ALL - tab1.col2 * - col2 AS col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL NOT IN ( + tab1.col2 )
----

query I rowsort
SELECT ALL - + ( tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT col0 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
26
43
83

query I rowsort
SELECT - + tab1.col2 + - 51 FROM tab1 GROUP BY tab1.col2
----
-122
-59
-96

query I rowsort
SELECT + col1 * 32 AS col0 FROM tab1 GROUP BY tab1.col1
----
1408
1824
192

query I rowsort
SELECT DISTINCT + + tab1.col2 + - 23 AS col1 FROM tab1 GROUP BY tab1.col2
----
-15
22
48

query I rowsort
SELECT 37 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
37
37
37

query I rowsort
SELECT - 18 * col0 + ( - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
-1577
-494
-817

onlyif mysql # DIV for integer division: 
query I rowsort label-1568
SELECT ALL 45 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
1
7

skipif mysql # not compatible
query I rowsort label-1568
SELECT ALL 45 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
1
7

query I rowsort
SELECT + COALESCE ( 60, tab1.col2 ) AS col1 FROM tab1, tab1 cor0 GROUP BY tab1.col2
----
60
60
60

query I rowsort
SELECT ALL - - 70 FROM tab1 GROUP BY tab1.col0
----
70
70
70

query I rowsort
SELECT - + 17 FROM tab2 GROUP BY tab2.col1
----
-17
-17
-17

query I rowsort
SELECT DISTINCT 97 FROM tab0 AS cor0 GROUP BY col0
----
97

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ( - 32 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
-32
-32

query I rowsort
SELECT - cor0.col0 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-1576
SELECT DISTINCT 72 DIV 9 FROM tab2 AS cor0 GROUP BY cor0.col1
----
8

skipif mysql # not compatible
query I rowsort label-1576
SELECT DISTINCT 72 / 9 FROM tab2 AS cor0 GROUP BY cor0.col1
----
8

query I rowsort
SELECT + + ( 74 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
74
74

query I rowsort
SELECT ALL cor0.col1 * - 45 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
-1845
-2655
-2745

query I rowsort
SELECT ALL - 53 * + tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
-1378
-2279
-4399

query I rowsort
SELECT - 4 AS col0 FROM tab0 GROUP BY tab0.col2
----
-4
-4
-4

query I rowsort
SELECT - 3 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3
-3

query I rowsort
SELECT ALL 73 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
73
73
73

query I rowsort
SELECT + tab2.col0 + + col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT + + tab1.col1 + + tab1.col1 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1892
-30
-3192

query I rowsort
SELECT DISTINCT tab2.col0 + + 65 * 18 AS col0 FROM tab2 GROUP BY col0
----
1185
1261
1262

query I rowsort
SELECT tab1.col1 + ( - 0 ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL - col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + 28 * - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-1260
-1988
-224

query I rowsort
SELECT ALL cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col0
----
24
38
79

query I rowsort
SELECT cor0.col2 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL - + 38 AS col2 FROM tab2 GROUP BY tab2.col0
----
-38
-38
-38

query I rowsort
SELECT DISTINCT - 99 AS col2 FROM tab0 cor0 GROUP BY col0, cor0.col1
----
-99

query I rowsort
SELECT DISTINCT 31 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
31

query I rowsort
SELECT ( 38 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + - 57 AS col2 FROM tab2 GROUP BY tab2.col2
----
-57
-57
-57

query I rowsort
SELECT + + 24 AS col2 FROM tab2 GROUP BY tab2.col0
----
24
24
24

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor1.col0
----
9 values hashing to ad2e5fa6d094292bda21bf46c78171b8

query I rowsort
SELECT + 11 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col2
----
11
11
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 97 - tab2.col0 col0 FROM tab2 GROUP BY col0
----
5
6
82

query I rowsort
SELECT DISTINCT + 4 + - 57 AS col0 FROM tab0 GROUP BY tab0.col0
----
-53

query I rowsort
SELECT DISTINCT 34 * - cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-1496
-1938
-204

query I rowsort
SELECT 92 AS col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT 97 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 80 col1 FROM tab0 GROUP BY tab0.col1
----
-80

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL - tab2.col0 * 46 AS col1 FROM tab2 GROUP BY col0
----
-4186
-4232
-690

query I rowsort
SELECT DISTINCT + COALESCE ( + col2, - 50 ) AS col2 FROM tab2 cor0 GROUP BY col2, cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-1610
SELECT + cor0.col2 DIV cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1610
SELECT + cor0.col2 / cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT + - 54 FROM tab0 GROUP BY tab0.col2
----
-54
-54
-54

query I rowsort
SELECT DISTINCT 11 FROM tab0 cor0 GROUP BY cor0.col2
----
11

query I rowsort
SELECT DISTINCT 26 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
26

query I rowsort
SELECT + tab0.col2 * - 53 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1272
-2014
-4187

query I rowsort
SELECT - + 60 AS col2 FROM tab2 GROUP BY tab2.col2
----
-60
-60
-60

query I rowsort
SELECT + 57 AS col0 FROM tab0 GROUP BY tab0.col2
----
57
57
57

query I rowsort
SELECT ALL - cor0.col2 * cor0.col2 + ( + 81 ) FROM tab2 cor0 GROUP BY cor0.col2
----
-3283
-6160
-7488

query I rowsort
SELECT - - 47 + - 91 AS col1 FROM tab1 GROUP BY tab1.col2
----
-44
-44
-44

query I rowsort
SELECT tab1.col0 * 81 AS col2 FROM tab1 GROUP BY tab1.col0
----
1782
2268
6642

query I rowsort
SELECT + 96 FROM tab0 AS cor0 GROUP BY cor0.col1
----
96
96

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 24 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1080
1704
192

query I rowsort
SELECT DISTINCT + - 36 * + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1584
-2052
-216

query I rowsort
SELECT - col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT 58 FROM tab1 AS cor0 GROUP BY cor0.col0
----
58

query I rowsort
SELECT DISTINCT + 2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
10
47
73

query I rowsort
SELECT DISTINCT 71 FROM tab1 GROUP BY tab1.col1
----
71

query I rowsort
SELECT DISTINCT + cor0.col2 - + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1629
SELECT + CAST( NULL AS SIGNED ) / 77 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1629
SELECT + CAST ( NULL AS INTEGER ) / 77 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT tab0.col0 + 88 FROM tab0 GROUP BY tab0.col0
----
114
131
171

query I rowsort
SELECT ALL cor0.col1 * - 1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) - - cor0.col0 * cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
240
8372
8556

query I rowsort
SELECT - tab2.col2 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - 42 FROM tab2 GROUP BY tab2.col0
----
-42
-42
-42

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1636
SELECT - CAST( NULL AS DECIMAL ) + - 41 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1636
SELECT - CAST ( NULL AS REAL ) + - 41 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 12 * tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-1092
-1104
-180

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 65 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
65

query I rowsort
SELECT - cor0.col2 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1305
5336
7189

query I rowsort
SELECT DISTINCT 84 FROM tab0 GROUP BY tab0.col2
----
84

query I rowsort
SELECT DISTINCT + 39 FROM tab0 GROUP BY tab0.col1
----
39

query I rowsort
SELECT ALL - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-22
-28
-82

query I rowsort
SELECT - 51 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-51
-51
-51

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1645
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1645
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1646
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1646
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY col1
----
NULL

query I rowsort
SELECT ALL + 46 - 76 FROM tab0 GROUP BY tab0.col2
----
-30
-30
-30

query I rowsort
SELECT DISTINCT - 91 AS col1 FROM tab2 GROUP BY tab2.col0
----
-91

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT DISTINCT 89 FROM tab1 AS cor0 GROUP BY cor0.col0
----
89

query I rowsort
SELECT DISTINCT 99 FROM tab0 AS cor0 GROUP BY cor0.col0
----
99

query I rowsort
SELECT DISTINCT ( ( + cor0.col2 ) ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - 90 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-90
-90

query I rowsort
SELECT + 87 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
87
87
87

query I rowsort
SELECT + + col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT cor0.col2 * + 33 - 3 FROM tab1 AS cor0 GROUP BY col2
----
1482
2340
261

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1657
SELECT DISTINCT tab0.col1 * - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1657
SELECT DISTINCT tab0.col1 * - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
NULL

query I rowsort
SELECT + tab1.col0 * + NULLIF ( 55, - col0 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
1210
1540
4510

query I rowsort
SELECT + 32 FROM tab1 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT DISTINCT + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0 HAVING tab0.col0 IS NOT NULL
----
26
43
83

query I rowsort
SELECT ALL col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT cor0.col1 * - col1 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-6480
0

query I rowsort
SELECT DISTINCT ( + 20 ) AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
20

query I rowsort
SELECT - - 39 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
3159

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1665
SELECT DISTINCT - tab0.col0 - - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1665
SELECT DISTINCT - tab0.col0 - - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
NULL

query I rowsort
SELECT ALL col2 + + tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
142
16
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 * - tab1.col0 col0 FROM tab1 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + + 69 FROM tab1 GROUP BY tab1.col2
----
69

query I rowsort
SELECT + 97 FROM tab1 AS cor0 GROUP BY cor0.col1
----
97
97
97

query I rowsort
SELECT - 72 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-72
-72
-72

query I rowsort
SELECT DISTINCT + - 89 * 9 FROM tab0 GROUP BY col2
----
-801

query I rowsort
SELECT - - 45 AS col2 FROM tab0 GROUP BY tab0.col0
----
45
45
45

query I rowsort
SELECT + 20 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1660
-520
-860

query I rowsort
SELECT DISTINCT 82 FROM tab0 GROUP BY col1
----
82

query I rowsort
SELECT ALL + 29 * 93 FROM tab1 GROUP BY tab1.col2
----
2697
2697
2697

query I rowsort
SELECT DISTINCT 47 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
47

query I rowsort
SELECT - ( + 88 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-88
-88
-88

onlyif mysql # DIV for integer division: 
query I rowsort label-1678
SELECT ALL - cor0.col1 DIV col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1678
SELECT ALL - cor0.col1 / col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1679
SELECT ALL + CAST( 36 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
36
36
36

skipif mysql # not compatible
query I rowsort label-1679
SELECT ALL + CAST ( 36 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT ALL + 15 AS col0 FROM tab0 GROUP BY tab0.col2
----
15
15
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col2 - tab0.col2 col2 FROM tab0 GROUP BY tab0.col2 HAVING - tab0.col2 >= tab0.col2
----

query I rowsort
SELECT + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL 37 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
37
37
37

query I rowsort
SELECT DISTINCT - 72 AS col0 FROM tab0 GROUP BY tab0.col1
----
-72

query I rowsort
SELECT ALL - 29 - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-110
-29

query I rowsort
SELECT DISTINCT + + 96 FROM tab0 GROUP BY tab0.col2
----
96

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1687
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1687
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-1688
SELECT 65 DIV + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-1688
SELECT 65 / + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0
0
4

query I rowsort
SELECT col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT tab0.col1 FROM tab0 WHERE ( NULL ) IS NULL GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT tab1.col2 + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT 30 + - 50 FROM tab2 GROUP BY tab2.col0
----
-20
-20
-20

query I rowsort
SELECT DISTINCT + + col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 33, + cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
33
33
33

query I rowsort
SELECT ( 63 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
63
63
63

query I rowsort
SELECT 4 + - 36 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-32
-32
-32

query I rowsort
SELECT ALL + 13 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
13
13
13

query I rowsort
SELECT ALL 12 * + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
492
708
732

query I rowsort
SELECT ALL + col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col2 + col1 AS col1 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
-2
-27
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * - col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL 13 AS col1 FROM tab0 GROUP BY tab0.col1
----
13
13

query I rowsort
SELECT 2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col2
----
2
2
2

query I rowsort
SELECT cor0.col1 * + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
2378
4661
5307

query I rowsort
SELECT 13 * + 87 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1131
1131
1131

query I rowsort
SELECT - - tab1.col0 + + col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT - cor0.col1 - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-118
-122
-82

query I rowsort
SELECT + 93 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT DISTINCT tab1.col2 AS col1 FROM tab1 GROUP BY col2 HAVING NOT NULL = ( NULL )
----

query I rowsort
SELECT ALL - 73 * col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3212
-4161
-438

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 31 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-31
-31
-31

query I rowsort
SELECT cor1.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT 84 FROM tab2 GROUP BY col1
----
84
84
84

onlyif mysql # DIV for integer division: 
query I rowsort label-1715
SELECT - 51 DIV + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-1715
SELECT - 51 / + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

query I rowsort
SELECT 85 + col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
109
123
164

query I rowsort
SELECT ALL 22 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
22
22
22

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, col2
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 86 * - cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1892
-2408
-7052

query I rowsort
SELECT DISTINCT + - 43 AS col1 FROM tab0 GROUP BY tab0.col0
----
-43

query I rowsort
SELECT DISTINCT - - 49 * col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1176
1862
3871

query I rowsort
SELECT 88 - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-3
-4
73

query I rowsort
SELECT ALL 9 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
17
54
80

query I rowsort
SELECT 57 + 96 FROM tab1 AS cor0 GROUP BY col2
----
153
153
153

query I rowsort
SELECT DISTINCT 88 AS col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
88

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT DISTINCT + 7 FROM tab1 AS cor0 GROUP BY cor0.col2, col1, cor0.col1
----
7

query I rowsort
SELECT DISTINCT col0 * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT + 39 AS col1 FROM tab1 GROUP BY tab1.col0
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 49 + 35 col2 FROM tab2 GROUP BY tab2.col0
----
-14

query I rowsort
SELECT + tab0.col1 + - ( tab0.col1 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT + 22 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
22
22

query I rowsort
SELECT DISTINCT 67 FROM tab2 GROUP BY tab2.col2
----
67

query I rowsort
SELECT ALL + + col2 + 55 FROM tab0 GROUP BY col2
----
134
79
93

query I rowsort
SELECT DISTINCT - 57 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-57

query I rowsort
SELECT ALL - 91 * col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-7371
0

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-1737
SELECT + - 78 * + COALESCE ( tab1.col1 DIV + CAST( NULL AS SIGNED ), + tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
-3432
-4446
-468

skipif mysql # not compatible
query I rowsort label-1737
SELECT + - 78 * + COALESCE ( tab1.col1 / + CAST ( NULL AS INTEGER ), + tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
-3432
-4446
-468

query I rowsort
SELECT + - 45 FROM tab0 GROUP BY tab0.col0
----
-45
-45
-45

query I rowsort
SELECT - 11 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
13
27
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col1 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-1741
SELECT DISTINCT cor0.col1 DIV 42 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-1741
SELECT DISTINCT cor0.col1 / 42 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1742
SELECT + + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1742
SELECT + + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - 34 + + tab2.col0 * - 20 FROM tab2 GROUP BY tab2.col0
----
-1786
-1806
-266

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 80 col2 FROM tab2 GROUP BY tab2.col0
----
80

query I rowsort
SELECT ALL - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0 HAVING NOT ( NULL ) IS NULL
----

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1746
SELECT CAST( NULL AS DECIMAL ) + + cor0.col2 * + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, col0, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1746
SELECT CAST ( NULL AS REAL ) + + cor0.col2 * + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - tab0.col0 * + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL - tab1.col1 - + tab1.col1 * col1 FROM tab1 GROUP BY tab1.col1
----
-1980
-3306
-42

query I rowsort
SELECT + 79 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3239
4661
4819

query I rowsort
SELECT ( tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 34 AS col0 FROM tab0 GROUP BY tab0.col0
----
-34

query I rowsort
SELECT DISTINCT 50 AS col1 FROM tab2 GROUP BY tab2.col0
----
50

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT - - tab0.col1 + - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL - cor0.col2 - 74 FROM tab1 cor0 GROUP BY cor0.col2
----
-119
-145
-82

query I rowsort
SELECT ALL - col0 + 38 AS col2 FROM tab1 GROUP BY tab1.col0
----
-44
10
16

query I rowsort
SELECT DISTINCT + 47 FROM tab0 AS cor0 GROUP BY cor0.col0
----
47

query I rowsort
SELECT ALL 23 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
23
23
23

query I rowsort
SELECT col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-1760
SELECT ALL NULLIF ( + 81, cor0.col2 ) DIV ( + 40 + col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-1760
SELECT ALL NULLIF ( + 81, cor0.col2 ) / ( + 40 + col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
1

query I rowsort
SELECT - 90 FROM tab1 GROUP BY tab1.col1
----
-90
-90
-90

query I rowsort
SELECT DISTINCT 67 AS col2 FROM tab2 GROUP BY tab2.col0
----
67

query I rowsort
SELECT DISTINCT - cor0.col1 * col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT - 54 AS col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

query I rowsort
SELECT ALL - tab2.col1 * col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT 9 * - 24 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-216
-216
-216

query I rowsort
SELECT DISTINCT + + ( tab1.col1 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( - 13, cor0.col2 ) FROM tab1 cor0 GROUP BY cor0.col1
----
-13

query I rowsort
SELECT DISTINCT - 65 AS col0 FROM tab0 cor0 GROUP BY col0
----
-65

query I rowsort
SELECT DISTINCT + - 70 FROM tab0 GROUP BY col0
----
-70

query I rowsort
SELECT ALL + 80 FROM tab2 GROUP BY tab2.col2
----
80
80
80

query I rowsort
SELECT DISTINCT + 67 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
67

query I rowsort
SELECT tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col1 col0 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL <> ( NULL )
----

query I rowsort
SELECT + - tab1.col1 + - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, col1
----
0
1944

query I rowsort
SELECT DISTINCT + 59 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
59

query I rowsort
SELECT DISTINCT + 22 + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
63
81
83

query I rowsort
SELECT + + tab1.col1 * - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-1782
SELECT ALL + - tab2.col1 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1782
SELECT ALL + - tab2.col1 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

query I rowsort
SELECT + 42 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT DISTINCT cor0.col1 - - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
138
148
99

query I rowsort
SELECT ALL + 26 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
26
26

onlyif mysql # DIV for integer division: 
query I rowsort label-1786
SELECT + - tab2.col2 DIV 31 AS col2 FROM tab2 GROUP BY tab2.col2
----
-1
-2
-2

skipif mysql # not compatible
query I rowsort label-1786
SELECT + - tab2.col2 / 31 AS col2 FROM tab2 GROUP BY tab2.col2
----
-1
-2
-2

onlyif mysql # DIV for integer division: 
query I rowsort label-1787
SELECT DISTINCT 93 DIV tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
15
2

skipif mysql # not compatible
query I rowsort label-1787
SELECT DISTINCT 93 / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
15
2

query I rowsort
SELECT ALL 62 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
62
62

query I rowsort
SELECT cor0.col0 * 15 + - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1274
1288
210

query I rowsort
SELECT 48 AS col1 FROM tab1 GROUP BY tab1.col1
----
48
48
48

onlyif mysql # DIV for integer division: 
query I rowsort label-1791
SELECT DISTINCT + 26 DIV tab1.col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-2
-44
-57

skipif mysql # not compatible
query I rowsort label-1791
SELECT DISTINCT + 26 / tab1.col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-2
-44
-57

query I rowsort
SELECT DISTINCT + tab1.col0 - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT + 52 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT 15 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
15
15
15

query I rowsort
SELECT ALL + 20 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20
20
20

query I rowsort
SELECT 43 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
43
43
43

query I rowsort
SELECT 64 + + cor0.col0 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-112
-1196
-5758

query I rowsort
SELECT ALL 12 * + 70 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
840
840
840

query I rowsort
SELECT 16 AS col1 FROM tab1 GROUP BY tab1.col0
----
16
16
16

query I rowsort
SELECT - 91 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-135
-148
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 74 * col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3034
-4366
-4514

query I rowsort
SELECT - - tab2.col2 * CASE + 31 WHEN tab2.col2 THEN NULL ELSE + tab2.col2 END FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT + ( + 81 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT cor0.col0 + - cor0.col2 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-2028
-3071
-989

query I rowsort
SELECT - cor0.col2 * + col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL + 16 AS col1 FROM tab1 GROUP BY tab1.col2
----
16
16
16

query I rowsort
SELECT 67 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
110
150
93

query I rowsort
SELECT ALL col1 AS col2 FROM tab1 GROUP BY tab1.col1 HAVING ( tab1.col1 ) IN ( - tab1.col1 )
----

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
24
38
79

query I rowsort
SELECT tab0.col0 + col0 * 28 AS col1 FROM tab0 GROUP BY tab0.col0
----
1247
2407
754

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + tab0.col2 * tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT + 45 AS col0 FROM tab0 GROUP BY tab0.col1
----
45
45

query I rowsort
SELECT ALL - - tab0.col2 - + tab0.col2 FROM tab0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT + col2 * + 23 + 66 AS col0 FROM tab0 GROUP BY tab0.col2
----
1883
618
940

onlyif mysql # DIV for integer division: 
query I rowsort label-1815
SELECT DISTINCT - cor0.col0 DIV + 14 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-6

skipif mysql # not compatible
query I rowsort label-1815
SELECT DISTINCT - cor0.col0 / + 14 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 87 col0 FROM tab1 GROUP BY tab1.col0
----
-87
-87
-87

query I rowsort
SELECT + + 42 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
42
42
42

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1818
SELECT - - CAST( NULL AS SIGNED ) + tab2.col0 * - col0 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1818
SELECT - - CAST ( NULL AS INTEGER ) + tab2.col0 * - col0 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 13 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
13
13
13

query I rowsort
SELECT DISTINCT 25 FROM tab1 GROUP BY col1
----
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 24 * + tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
-1968
-528
-672

query I rowsort
SELECT ALL + 93 AS col0 FROM tab0 GROUP BY tab0.col2
----
93
93
93

query I rowsort
SELECT ALL + - 48 * 17 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-831
-907
-908

onlyif mysql # DIV for integer division: 
query I rowsort label-1824
SELECT - cor0.col0 DIV + col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2, col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1824
SELECT - cor0.col0 / + col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2, col1
----
-1
-1
-1

query I rowsort
SELECT ALL + tab0.col2 * tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT tab2.col0 * tab2.col0 + - 7 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
120
7644
7820

query I rowsort
SELECT DISTINCT NULLIF ( 49, tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
49

onlyif mysql # DIV for integer division: 
query I rowsort label-1828
SELECT ALL - 6 DIV 55 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1828
SELECT ALL - 6 / 55 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1829
SELECT + col0 + 97 DIV - col0 AS col1 FROM tab0 cor0 GROUP BY col0
----
23
41
82

skipif mysql # not compatible
query I rowsort label-1829
SELECT + col0 + 97 / - col0 AS col1 FROM tab0 cor0 GROUP BY col0
----
23
41
82

query I rowsort
SELECT + 10 * col0 - - 1 AS col2 FROM tab1 GROUP BY tab1.col0
----
221
281
821

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col1 col2 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
0

query I rowsort
SELECT + 88 AS col0 FROM tab0 GROUP BY tab0.col0
----
88
88
88

query I rowsort
SELECT ALL + - tab1.col2 + tab1.col2 * + 16 AS col2 FROM tab1 GROUP BY tab1.col2
----
1065
120
675

query I rowsort
SELECT + 35 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
35
35
35

query I rowsort
SELECT DISTINCT - - 23 FROM tab1 GROUP BY tab1.col1
----
23

query I rowsort
SELECT DISTINCT 63 FROM tab1 AS cor0 GROUP BY cor0.col2
----
63

query I rowsort
SELECT tab1.col1 * + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL - 87 AS col0 FROM tab1 GROUP BY col1
----
-87
-87
-87

query I rowsort
SELECT ALL 16 FROM tab2 GROUP BY tab2.col2
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 89 col2 FROM tab0 GROUP BY tab0.col2
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 22 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
22

query I rowsort
SELECT ALL tab2.col2 AS col0 FROM tab2 WHERE NOT tab2.col1 IS NULL GROUP BY tab2.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-1844
SELECT DISTINCT + 17 DIV col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-1844
SELECT DISTINCT + 17 / col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
0
1

query I rowsort
SELECT DISTINCT - 51 FROM tab2 cor0 GROUP BY cor0.col2
----
-51

query I rowsort
SELECT DISTINCT - + col1 AS col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - + tab1.col2 * tab1.col2 + + 85 FROM tab1 GROUP BY tab1.col2
----
-1940
-4956
21

query I rowsort
SELECT DISTINCT + + tab0.col1 + + 64 FROM tab0 GROUP BY tab0.col1
----
145
64

query I rowsort
SELECT + - 63 FROM tab2 GROUP BY col1
----
-63
-63
-63

query I rowsort
SELECT DISTINCT - CASE cor0.col0 WHEN - cor0.col2 THEN - cor0.col2 END FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-1851
SELECT - tab0.col2 + - tab0.col2 DIV + 95 AS col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

skipif mysql # not compatible
query I rowsort label-1851
SELECT - tab0.col2 + - tab0.col2 / + 95 AS col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - 7 FROM tab1 GROUP BY tab1.col2
----
-7

query I rowsort
SELECT cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, col0
----
26
43
83

query I rowsort
SELECT - 42 AS col0 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
-42
-42
-42

query I rowsort
SELECT 8 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
8
8
8

onlyif mysql # DIV for integer division: 
query I rowsort label-1857
SELECT DISTINCT - 26 DIV + 54 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0, col2, cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-1857
SELECT DISTINCT - 26 / + 54 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0, col2, cor0.col0
----
0

query I rowsort
SELECT - 71 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-71
-71
-71

query I rowsort
SELECT 59 AS col2 FROM tab1 GROUP BY tab1.col2
----
59
59
59

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col2
----
9 values hashing to 7a3bee88c68cb011ab3d0cb5e0bd7e7c

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-1862
SELECT ALL + - 89 + - 84 DIV + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-90
-90
-91

skipif mysql # not compatible
query I rowsort label-1862
SELECT ALL + - 89 + - 84 / + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-90
-90
-91

query I rowsort
SELECT + 18 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT DISTINCT - 36 * - 76 FROM tab1 GROUP BY tab1.col2
----
2736

query I rowsort
SELECT ALL - ( tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT col0 * 51 FROM tab0 GROUP BY tab0.col0
----
1326
2193
4233

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT ALL + 3 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT ALL + 73 + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
114
132
134

query I rowsort
SELECT + 51 * + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
4641
4692
765

query I rowsort
SELECT DISTINCT + cor0.col1 * + 19 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
1121
1159
779

query I rowsort
SELECT DISTINCT cor0.col0 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0

query I rowsort
SELECT ALL 8 FROM tab0 GROUP BY col1
----
8
8

query I rowsort
SELECT 18 AS col2 FROM tab1 GROUP BY tab1.col1
----
18
18
18

query I rowsort
SELECT ALL - ( 18 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-18
-18
-18

query I rowsort
SELECT ALL 93 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
93
93
93

onlyif mysql # DIV for integer division: 
query I rowsort label-1877
SELECT + + tab1.col0 + + tab1.col0 DIV - 4 AS col1 FROM tab1 GROUP BY tab1.col0
----
17
21
62

skipif mysql # not compatible
query I rowsort label-1877
SELECT + + tab1.col0 + + tab1.col0 / - 4 AS col1 FROM tab1 GROUP BY tab1.col0
----
17
21
62

query I rowsort
SELECT 53 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
-6
-8
12

query I rowsort
SELECT DISTINCT 24 AS col0 FROM tab1 GROUP BY col0
----
24

query I rowsort
SELECT - 54 AS col1 FROM tab1 GROUP BY tab1.col0
----
-54
-54
-54

query I rowsort
SELECT - cor0.col1 + + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - 13 + col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-7
31
44

onlyif mysql # DIV for integer division: 
query I rowsort label-1883
SELECT 89 + + cor0.col0 DIV + 16 FROM tab0 AS cor0 GROUP BY col0
----
90
91
94

skipif mysql # not compatible
query I rowsort label-1883
SELECT 89 + + cor0.col0 / + 16 FROM tab0 AS cor0 GROUP BY col0
----
90
91
94

query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT col0 <= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 20 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20
20
20

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - ( 68 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-68

query I rowsort
SELECT ALL 55 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col2
----
55
55
55

query I rowsort
SELECT 83 AS col2 FROM tab0 GROUP BY tab0.col2
----
83
83
83

onlyif mysql # DIV for integer division: 
query I rowsort label-1890
SELECT + col2 DIV col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1890
SELECT + col2 / col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT + 85 * + 92 AS col0 FROM tab0 GROUP BY tab0.col2
----
7820
7820
7820

query I rowsort
SELECT DISTINCT + + col1 FROM tab0 GROUP BY tab0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 72 col0 FROM tab0 GROUP BY tab0.col0
----
72

query I rowsort
SELECT ALL - 23 * 45 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1035
-1035
-1035

query I rowsort
SELECT ALL + tab1.col2 + + 10 FROM tab1 GROUP BY tab1.col2
----
18
55
81

onlyif mysql # DIV for integer division: 
query I rowsort label-1896
SELECT ALL - col1 DIV - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1896
SELECT ALL - col1 / - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT DISTINCT + - 56 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3248
-4424
-4872

query I rowsort
SELECT ALL + 42 AS col0 FROM tab2 GROUP BY tab2.col2
----
42
42
42

query I rowsort
SELECT + COALESCE ( + cor0.col1, col1, - 91 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
0
81

query I rowsort
SELECT 87 FROM tab1 GROUP BY tab1.col1
----
87
87
87

query I rowsort
SELECT + cor0.col2 * 33 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1485
2343
264

query I rowsort
SELECT - col1 * col1 + - 9 FROM tab0 GROUP BY tab0.col1
----
-6570
-9

query I rowsort
SELECT DISTINCT + tab2.col1 + 81 AS col0 FROM tab2 GROUP BY tab2.col1
----
122
140
142

query I rowsort
SELECT 23 FROM tab0 AS cor0 GROUP BY cor0.col1, col0, cor0.col0
----
23
23
23

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT - ( + 8 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-8
-8
-8

query I rowsort
SELECT ALL + + 20 FROM tab1 GROUP BY tab1.col0
----
20
20
20

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1908
SELECT cor0.col0 / - cor0.col0 + CAST( NULL AS SIGNED ) * col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1908
SELECT cor0.col0 / - cor0.col0 + CAST ( NULL AS INTEGER ) * col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 52 * + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2288
2964
312

query I rowsort
SELECT - 74 AS col0 FROM tab0 GROUP BY tab0.col0
----
-74
-74
-74

query I rowsort
SELECT 31 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1333
2573
806

query I rowsort
SELECT + cor0.col2 * - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-1944
0
0

query I rowsort
SELECT DISTINCT + 9 FROM tab2 AS cor0 GROUP BY cor0.col1
----
9

query I rowsort
SELECT DISTINCT + 50 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
50

query I rowsort
SELECT ( 85 ) AS col0 FROM tab2 AS cor0 GROUP BY col1
----
85
85
85

query I rowsort
SELECT cor0.col0 * + 22 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
2002
2024
330

query I rowsort
SELECT ALL 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
38
38
38

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1918
SELECT - CAST( NULL AS SIGNED ) * 20 FROM tab1 cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1918
SELECT - CAST ( NULL AS INTEGER ) * 20 FROM tab1 cor0 GROUP BY col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1919
SELECT CAST( NULL AS SIGNED ) * - 43 AS col1 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1919
SELECT CAST ( NULL AS INTEGER ) * - 43 AS col1 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - - tab0.col1 + + 87 FROM tab0 GROUP BY tab0.col1
----
168
87

query I rowsort
SELECT DISTINCT 7 FROM tab2 AS cor0 GROUP BY cor0.col0
----
7

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1922
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1922
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL

query I rowsort
SELECT 35 FROM tab2 AS cor0 GROUP BY cor0.col0
----
35
35
35

query I rowsort
SELECT - 48 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-48
-48
-48

query I rowsort
SELECT cor0.col1 * 45 + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
1886
2714
2806

query I rowsort
SELECT + col1 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL + 82 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT - 64 * cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-1408
-1792
-5248

onlyif mysql # DIV for integer division: 
query I rowsort label-1929
SELECT ALL - tab2.col0 DIV tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1929
SELECT ALL - tab2.col0 / tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

query I rowsort
SELECT - 57 FROM tab0 GROUP BY tab0.col1
----
-57
-57

query I rowsort
SELECT col2 * + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col1 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col1 * col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT + 46 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
46
46
46

query I rowsort
SELECT - 76 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-76
-76
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 47 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
47

query I rowsort
SELECT DISTINCT col0 + 43 FROM tab1 GROUP BY col0
----
125
65
71

onlyif mysql # DIV for integer division: 
query I rowsort label-1938
SELECT ALL + cor0.col2 DIV - cor0.col0 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
44
71
8

skipif mysql # not compatible
query I rowsort label-1938
SELECT ALL + cor0.col2 / - cor0.col0 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
44
71
8

query I rowsort
SELECT ALL - 38 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1672
2166
228

query I rowsort
SELECT ALL tab1.col0 * col0 + ( + ( + tab1.col0 ) + tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
528
6888
840

query I rowsort
SELECT ALL - 26 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-26
-26

query I rowsort
SELECT + tab2.col0 + - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL - col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0
0

query I rowsort
SELECT DISTINCT - 8 - 26 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-34

query I rowsort
SELECT - - 95 AS col2 FROM tab1 GROUP BY tab1.col1
----
95
95
95

query I rowsort
SELECT DISTINCT - 67 * col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-1474
-1876
-5494

query I rowsort
SELECT DISTINCT + + 48 AS col0 FROM tab0 GROUP BY tab0.col0
----
48

query I rowsort
SELECT DISTINCT - cor0.col1 - + cor0.col1 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-6642
0

query I rowsort
SELECT 30 + - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-11
-29
-31

query I rowsort
SELECT + 22 AS col1 FROM tab2 GROUP BY tab2.col0
----
22
22
22

query I rowsort
SELECT ALL + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT - - 61 + 1 FROM tab1 GROUP BY tab1.col0
----
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + - 95 AS col1 FROM tab2 GROUP BY tab2.col1
----
-95
-95
-95

query I rowsort
SELECT ALL + 75 * - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-4350
-5925
-6525

query I rowsort
SELECT + cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
182
184
30

query I rowsort
SELECT ALL 46 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT DISTINCT 77 FROM tab1 AS cor0 GROUP BY cor0.col0
----
77

query I rowsort
SELECT + + tab1.col0 * + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - 3 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-3
-3
-3

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT ALL - 63 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-63
-63
-63

query I rowsort
SELECT ALL 23 - col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-20
-3
-60

query I rowsort
SELECT - 64 AS col0 FROM tab2 GROUP BY tab2.col2
----
-64
-64
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT - 42 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-42
-42
-42

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT DISTINCT 76 + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
121
147
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 39 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
39
39

query I rowsort
SELECT DISTINCT - cor0.col0 - - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-32
-51
46

query I rowsort
SELECT DISTINCT + 97 - cor0.col2 * + 61 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-3441
-4722
-5210

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + cor0.col1 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 45 FROM tab0 GROUP BY col1
----
-45

query I rowsort
SELECT ALL 97 * + 62 AS col2 FROM tab2 GROUP BY tab2.col1
----
6014
6014
6014

query I rowsort
SELECT + 43 + 93 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-4049
-515
-5258

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 29 col2 FROM tab0 GROUP BY col1
----
29
29

query I rowsort
SELECT 95 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
95
95
95

query I rowsort
SELECT 39 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
39
39
39

query I rowsort
SELECT DISTINCT tab1.col1 FROM tab1 WHERE NULL IS NOT NULL GROUP BY tab1.col1
----

onlyif mysql # DIV for integer division: 
query I rowsort label-1981
SELECT - 80 DIV ( + cor0.col1 ) FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-1
-1
-13

skipif mysql # not compatible
query I rowsort label-1981
SELECT - 80 / ( + cor0.col1 ) FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-1
-1
-13

query I rowsort
SELECT - 74 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-74
-74
-74

query I rowsort
SELECT - tab0.col1 * + 29 FROM tab0 GROUP BY tab0.col1
----
-2349
0

query I rowsort
SELECT + COALESCE ( + 83, tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
83
83
83

query I rowsort
SELECT DISTINCT - 30 AS col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-30

query I rowsort
SELECT - - col0 + tab1.col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
506
6806
812

query I rowsort
SELECT ALL 16 AS col0 FROM tab0 GROUP BY tab0.col2
----
16
16
16

query I rowsort
SELECT 35 * tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
2030
2765
3045

query I rowsort
SELECT ALL - 80 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-80
-80
-80

query I rowsort
SELECT - 17 * - col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1411
442
731

query I rowsort
SELECT + 17 FROM tab1 AS cor0 GROUP BY col0, col0
----
17
17
17

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 - ( + 91 ) FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
-91
-91
-91

query I rowsort
SELECT - cor0.col0 * + 45 + 75 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1095
-1860
-3660

query I rowsort
SELECT ALL 36 + + 44 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT DISTINCT 1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
1

query I rowsort
SELECT cor0.col0 * 37 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3367
3404
555

query I rowsort
SELECT ALL + 6 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
6
6
6

query I rowsort
SELECT DISTINCT + 86 FROM tab0 AS cor0 GROUP BY col2
----
86

query I rowsort
SELECT DISTINCT - - ( - 29 ) FROM tab1 GROUP BY tab1.col0
----
-29

query I rowsort
SELECT col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT 49 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
49
49

query I rowsort
SELECT cor1.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2004
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2004
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + + 70 AS col2 FROM tab1 GROUP BY tab1.col2
----
70
70
70

query I rowsort
SELECT DISTINCT - 9 AS col0 FROM tab0 GROUP BY col1
----
-9

query I rowsort
SELECT - tab1.col0 * 45 FROM tab1 GROUP BY tab1.col0
----
-1260
-3690
-990

query I rowsort
SELECT DISTINCT - 95 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-95

query I rowsort
SELECT - cor0.col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL - 65 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-65
-65
-65

query I rowsort
SELECT cor1.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col2
----
9 values hashing to 66267ca705f58a4488972e09499aeb2b

query I rowsort
SELECT DISTINCT + 34 FROM tab0 GROUP BY tab0.col1
----
34

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IN ( + col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 68 col1 FROM tab2 GROUP BY tab2.col1
----
68

query I rowsort
SELECT 33 AS col1 FROM tab1 GROUP BY tab1.col2
----
33
33
33

query I rowsort
SELECT 44 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
123
68
82

query I rowsort
SELECT ALL tab2.col0 * + 49 AS col1 FROM tab2 GROUP BY tab2.col0
----
4459
4508
735

query I rowsort
SELECT ALL - ( 15 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-15
-15
-15

query I rowsort
SELECT 62 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col0
----
62
62
62

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2020
SELECT - CAST( NULL AS SIGNED ) * + 24 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2020
SELECT - CAST ( NULL AS INTEGER ) * + 24 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-2021
SELECT col0 DIV - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2021
SELECT col0 / - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2022
SELECT - CAST( NULL AS SIGNED ) / 18 + + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2022
SELECT - CAST ( NULL AS INTEGER ) / 18 + + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT + cor0.col2 * col2 - 99 * - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
14062
16182
9106

query I rowsort
SELECT - 89 FROM tab2 cor0 GROUP BY col1
----
-89
-89
-89

query I rowsort
SELECT + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
58
79
87

query I rowsort
SELECT DISTINCT 71 * 27 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1917

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, col1
----
114
12
88

query I rowsort
SELECT tab0.col0 AS col0 FROM tab0 WHERE NOT col0 IS NULL GROUP BY tab0.col0 HAVING NOT ( NULL ) IS NOT NULL
----
26
43
83

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT - col0 + - 3 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-25
-31
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 9 col2 FROM tab0 GROUP BY col1
----
-9
-9

query I rowsort
SELECT - 98 - col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-113
-189
-190

query I rowsort
SELECT - - 42 FROM tab0 GROUP BY tab0.col2
----
42
42
42

query I rowsort
SELECT - + 36 AS col2 FROM tab1 GROUP BY tab1.col1
----
-36
-36
-36

query I rowsort
SELECT - 0 * + cor0.col2 - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + 82 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
82

query I rowsort
SELECT ALL cor0.col2 - + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-57
38
79

query I rowsort
SELECT ALL + cor0.col2 * - 12 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-288
-456
-948

query I rowsort
SELECT ALL - - 93 FROM tab0 GROUP BY tab0.col0
----
93
93
93

query I rowsort
SELECT DISTINCT cor0.col1 - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-16
-38
29

query I rowsort
SELECT - 85 + + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-14
-40
-77

query I rowsort
SELECT DISTINCT - tab1.col2 * - tab1.col2 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2070
5112
72

query I rowsort
SELECT ALL - 24 + + 44 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
20
20
20

query I rowsort
SELECT + 26 FROM tab2 cor0 GROUP BY col2
----
26
26
26

query I rowsort
SELECT + 91 FROM tab2, tab2 cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT + 65 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-2925
-4615
-520

query I rowsort
SELECT - 91 FROM tab2 GROUP BY col2
----
-91
-91
-91

query I rowsort
SELECT ALL 53 FROM tab2 cor0 GROUP BY col2
----
53
53
53

query I rowsort
SELECT + - ( - 66 ) + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
104
145
90

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2050
SELECT ALL col0 + - CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2050
SELECT ALL col0 + - CAST ( NULL AS REAL ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 36 col2 FROM tab2 GROUP BY tab2.col1
----
36
36
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 32 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-32
-32
-32

query I rowsort
SELECT DISTINCT + - tab2.col2 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT DISTINCT 14 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
14

query I rowsort
SELECT - ( + 68 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-68
-68
-68

query I rowsort
SELECT - 72 FROM tab2 GROUP BY tab2.col2
----
-72
-72
-72

query I rowsort
SELECT 36 AS col2 FROM tab1 GROUP BY tab1.col2
----
36
36
36

query I rowsort
SELECT - col1 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT - 11 AS col2 FROM tab0 GROUP BY col1
----
-11
-11

query I rowsort
SELECT + 45 + - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-12
1
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab1.col2 - + 65 * tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
-2880
-4544
-512

query I rowsort
SELECT ALL cor0.col2 * 68 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
3944
5372
5916

onlyif mysql # DIV for integer division: 
query I rowsort label-2063
SELECT 48 DIV + col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-2063
SELECT 48 / + col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
0
0
3

query I rowsort
SELECT DISTINCT - 2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-2

query I rowsort
SELECT + 55 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2255
3245
3355

query I rowsort
SELECT ALL tab0.col1 * tab0.col1 FROM tab0 GROUP BY col1
----
0
6561

query I rowsort
SELECT DISTINCT 45 * + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4095
4140
675

onlyif mysql # DIV for integer division: 
query I rowsort label-2068
SELECT - col2 DIV tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2068
SELECT - col2 / tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

query I rowsort
SELECT - 86 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-86
-86
-86

query I rowsort
SELECT DISTINCT cor0.col0 - - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
182
184
30

query I rowsort
SELECT DISTINCT 26 FROM tab2 AS cor0 GROUP BY cor0.col2
----
26

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT - tab1.col0 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT tab2.col0 * - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT - 92 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-92
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 98 col1 FROM tab2 GROUP BY tab2.col1
----
98
98
98

query I rowsort
SELECT - 80 * tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-6480
0

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + ( - 83 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-83
-83
-83

query I rowsort
SELECT - 1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT 53 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-4
47
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 80 * - tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
-6480
0

query I rowsort
SELECT + ( 53 ) * + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3074
4187
4611

query I rowsort
SELECT NULLIF ( tab1.col1, tab1.col1 * - ( 60 ) ) AS col2 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - 62 * 20 AS col2 FROM tab0 GROUP BY col1
----
-1240
-1240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + COALESCE ( + 26, col1 ) col1 FROM tab1 AS cor0 GROUP BY col2
----
26
26
26

query I rowsort
SELECT + - 16 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-1296
0

query I rowsort
SELECT ALL - - 61 FROM tab0 GROUP BY tab0.col2
----
61
61
61

onlyif mysql # DIV for integer division: 
query I rowsort label-2089
SELECT DISTINCT + COALESCE ( tab2.col0, tab2.col0 + 53, + 12, - tab2.col2 + tab2.col1, + tab2.col0 DIV col1 ) DIV col0 FROM tab2 GROUP BY col0
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2089
SELECT DISTINCT + COALESCE ( tab2.col0, tab2.col0 + 53, + 12, - tab2.col2 + tab2.col1, + tab2.col0 / col1 ) / col0 FROM tab2 GROUP BY col0
----
1

query I rowsort
SELECT + 60 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
60
60
60

query I rowsort
SELECT + - 69 * - col2 + col2 * + 17 FROM tab0 GROUP BY tab0.col2
----
2064
3268
6794

query I rowsort
SELECT ALL 97 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-7857
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 2 col2 FROM tab1 GROUP BY col1
----
-2
-2
-2

query I rowsort
SELECT DISTINCT - 22 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-22

query I rowsort
SELECT DISTINCT 37 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
37

query I rowsort
SELECT DISTINCT + 65 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
65

query I rowsort
SELECT DISTINCT + 51 AS col0 FROM tab0 GROUP BY tab0.col1
----
51

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2098
SELECT DISTINCT CAST( 15 AS SIGNED ) + + cor0.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
23
60
86

skipif mysql # not compatible
query I rowsort label-2098
SELECT DISTINCT CAST ( 15 AS INTEGER ) + + cor0.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
23
60
86

query I rowsort
SELECT ALL 71 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
71
71
71

query I rowsort
SELECT DISTINCT + 67 FROM tab1 AS cor0 GROUP BY cor0.col0
----
67

onlyif mysql # DIV for integer division: 
query I rowsort label-2101
SELECT DISTINCT + + tab0.col0 DIV 28 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-2101
SELECT DISTINCT + + tab0.col0 / 28 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
1
2

query I rowsort
SELECT - tab0.col0 * 68 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1742
-2881
-5561

query I rowsort
SELECT 91 * + 78 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
7098
7098
7098

onlyif mysql # DIV for integer division: 
query I rowsort label-2104
SELECT DISTINCT - tab1.col2 DIV tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1

skipif mysql # not compatible
query I rowsort label-2104
SELECT DISTINCT - tab1.col2 / tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2105
SELECT - CAST( ( 5 ) AS SIGNED ) * - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
290
395
435

skipif mysql # not compatible
query I rowsort label-2105
SELECT - CAST ( ( 5 ) AS INTEGER ) * - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
290
395
435

query I rowsort
SELECT ALL col1 + + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL 55 FROM tab2 cor0 GROUP BY cor0.col1
----
55
55
55

onlyif mysql # DIV for integer division: 
query I rowsort label-2108
SELECT ALL 21 DIV + 29 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-2108
SELECT ALL 21 / + 29 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT 4 * 90 FROM tab1 AS cor0 GROUP BY cor0.col1
----
360

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 + - tab1.col1 * tab1.col1 col2 FROM tab1 GROUP BY col1
----
-1980
-3306
-42

query I rowsort
SELECT + cor0.col0 * - cor0.col0 + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-210
-8190
-8372

query I rowsort
SELECT ALL cor0.col1 + 98 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
104
142
155

query I rowsort
SELECT - tab0.col2 + + 14 AS col1 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
-10
-24
-65

query I rowsort
SELECT DISTINCT 40 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
119
127
98

onlyif mysql # DIV for integer division: 
query I rowsort label-2116
SELECT ( + cor0.col1 ) DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2116
SELECT ( + cor0.col1 ) / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT + 96 FROM tab2 AS cor0 GROUP BY cor0.col1
----
96
96
96

query I rowsort
SELECT - 61 AS col2 FROM tab2 GROUP BY tab2.col0
----
-61
-61
-61

query I rowsort
SELECT + 83 + - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-8
-9
68

onlyif mysql # DIV for integer division: 
query I rowsort label-2120
SELECT tab0.col0 DIV tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2120
SELECT tab0.col0 / tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1
1
1

query I rowsort
SELECT + 65 FROM tab2 AS cor0 GROUP BY cor0.col1
----
65
65
65

onlyif mysql # DIV for integer division: 
query I rowsort label-2122
SELECT - 2 DIV tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2122
SELECT - 2 / tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT + + 73 AS col0 FROM tab2 GROUP BY tab2.col2
----
73
73
73

query I rowsort
SELECT DISTINCT - 11 AS col0 FROM tab2 GROUP BY tab2.col1
----
-11

query I rowsort
SELECT + 47 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
47
47
47

query I rowsort
SELECT - 46 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-46
-46
-46

query I rowsort
SELECT DISTINCT - 29 AS col1 FROM tab1 GROUP BY col0
----
-29

onlyif mysql # DIV for integer division: 
query I rowsort label-2128
SELECT tab1.col2 DIV tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2128
SELECT tab1.col2 / tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT DISTINCT 29 * - 8 FROM tab0 GROUP BY tab0.col1
----
-232

query I rowsort
SELECT DISTINCT + 1 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
1

query I rowsort
SELECT + 94 FROM tab1 AS cor0 GROUP BY cor0.col2
----
94
94
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * 2 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
158
48
76

query I rowsort
SELECT cor0.col2 * 56 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1344
2128
4424

query I rowsort
SELECT ALL - + 15 FROM tab2 GROUP BY tab2.col1
----
-15
-15
-15

query I rowsort
SELECT ALL + 93 FROM tab0 GROUP BY tab0.col2
----
93
93
93

query I rowsort
SELECT - - ( tab1.col0 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT 26 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
26
26

query I rowsort
SELECT + col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + 5 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
5
5
5

query I rowsort
SELECT + 82 FROM tab1 AS cor0 GROUP BY col2
----
82
82
82

onlyif mysql # DIV for integer division: 
query I rowsort label-2141
SELECT - cor0.col0 DIV 34 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2
-2
0

skipif mysql # not compatible
query I rowsort label-2141
SELECT - cor0.col0 / 34 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2
-2
0

query I rowsort
SELECT DISTINCT 13 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
13

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + 8 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
8
8
8

query I rowsort
SELECT + tab2.col2 + + 89 AS col0 FROM tab2 GROUP BY tab2.col2
----
147
168
176

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-2147
SELECT DISTINCT 39 DIV 64 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-2147
SELECT DISTINCT 39 / 64 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2148
SELECT + col0 DIV - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2148
SELECT + col0 / - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NULL NOT BETWEEN NULL AND NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-2150
SELECT DISTINCT + 75 DIV + 86 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-2150
SELECT DISTINCT + 75 / + 86 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT 73 + 92 FROM tab1 AS cor0 GROUP BY col1
----
165

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
45
71
8

query I rowsort
SELECT ALL cor0.col1 * 25 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2025

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT 95 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT ALL tab2.col2 * + 12 + 98 AS col2 FROM tab2 GROUP BY col2
----
1046
1142
794

query I rowsort
SELECT + 81 * tab0.col1 FROM tab0 GROUP BY col1
----
0
6561

query I rowsort
SELECT ALL + + 95 FROM tab1 GROUP BY tab1.col2
----
95
95
95

query I rowsort
SELECT DISTINCT - + 50 FROM tab1 GROUP BY tab1.col1
----
-50

query I rowsort
SELECT DISTINCT + 55 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
55

query I rowsort
SELECT 24 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
24
24

query I rowsort
SELECT ALL 18 FROM tab2 cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT DISTINCT - 57 FROM tab0 AS cor0 GROUP BY col1
----
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 34 col0 FROM tab2 GROUP BY tab2.col1
----
34
34
34

query I rowsort
SELECT + ( + 61 ) AS col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
61
61
61

query I rowsort
SELECT ALL + 52 FROM tab1 GROUP BY tab1.col2
----
52
52
52

query I rowsort
SELECT DISTINCT + 61 FROM tab0 GROUP BY tab0.col0
----
61

query I rowsort
SELECT + 89 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
89
89
89

query I rowsort
SELECT DISTINCT + 34 FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
34

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT 17 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
17
17
17

query I rowsort
SELECT - 20 FROM tab1 GROUP BY col2
----
-20
-20
-20

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT - col1 * - tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
0
6561

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT 99 FROM tab0 AS cor0 GROUP BY col2
----
99
99
99

onlyif mysql # DIV for integer division: 
query I rowsort label-2179
SELECT cor0.col0 DIV - 40 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-84

skipif mysql # not compatible
query I rowsort label-2179
SELECT cor0.col0 / - 40 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-84

query I rowsort
SELECT ALL + 23 FROM tab0 AS cor0 GROUP BY cor0.col0
----
23
23
23

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 - tab0.col0 col2 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL + ( + cor0.col1 ) - + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-26
-83
38

query I rowsort
SELECT - tab1.col2 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col1 + 57 col1 FROM tab2 GROUP BY col1
----
116
118
98

query I rowsort
SELECT + ( cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + 67 + 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
107
107
107

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 58 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
58

query I rowsort
SELECT - 47 AS col0 FROM tab2 GROUP BY tab2.col0
----
-47
-47
-47

query I rowsort
SELECT - col2 AS col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT + - ( - 77 ) FROM tab1 GROUP BY col2
----
77
77
77

query I rowsort
SELECT ALL + 85 FROM tab1 GROUP BY col1
----
85
85
85

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 32 AS col2 FROM tab1 GROUP BY tab1.col0
----
32

query I rowsort
SELECT DISTINCT 56 FROM tab1 cor0 GROUP BY col0
----
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * 36 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1368
-2844
-864

query I rowsort
SELECT + cor0.col0 + + cor0.col0 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1892
6972
702

query I rowsort
SELECT 7 AS col2 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
7
7
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 27 col2 FROM tab0 cor0 GROUP BY col1
----
27

query I rowsort
SELECT + 22 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
103
22

query I rowsort
SELECT - - tab0.col1 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT ALL + 59 AS col2 FROM tab0 GROUP BY tab0.col0
----
59
59
59

onlyif mysql # DIV for integer division: 
query I rowsort label-2204
SELECT DISTINCT 77 DIV tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2204
SELECT DISTINCT 77 / tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 28 col0 FROM tab1 GROUP BY tab1.col1
----
-28
-28
-28

query I rowsort
SELECT ALL - 13 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-13
-13
-13

query I rowsort
SELECT 52 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
52
52
52

onlyif mysql # DIV for integer division: 
query I rowsort label-2208
SELECT ( + cor0.col0 ) DIV - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2208
SELECT ( + cor0.col0 ) / - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + ( + 61 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
61

query I rowsort
SELECT 90 AS col0 FROM tab0 GROUP BY tab0.col0
----
90
90
90

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2211
SELECT - CAST( 3 AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col1
----
-3
-3
-3

skipif mysql # not compatible
query I rowsort label-2211
SELECT - CAST ( 3 AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col1
----
-3
-3
-3

query I rowsort
SELECT - tab2.col0 * 60 AS col1 FROM tab2 GROUP BY tab2.col0
----
-5460
-5520
-900

query I rowsort
SELECT - 50 AS col1 FROM tab0 GROUP BY col2
----
-50
-50
-50

query I rowsort
SELECT - 41 * col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
-3321
0
0

query I rowsort
SELECT ALL + ( 56 ) + 55 AS col0 FROM tab2 GROUP BY tab2.col2
----
111
111
111

query I rowsort
SELECT DISTINCT 61 AS col2 FROM tab0 GROUP BY tab0.col2
----
61

query I rowsort
SELECT 2 * - col1 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT ALL + - tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL ( + tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL NULLIF ( - cor0.col0, - cor0.col2 * cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY col0, col2
----
-22
-28
-82

query I rowsort
SELECT + 70 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
70
70
70

query I rowsort
SELECT - 22 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-2002
-2024
-330

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT cor0.col2 * col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
484
6724
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 89 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-89
-89
-89

query I rowsort
SELECT 51 * tab1.col1 FROM tab1 GROUP BY col1
----
2244
2907
306

query I rowsort
SELECT 66 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
109
149
92

query I rowsort
SELECT + 48 FROM tab0 AS cor0 GROUP BY cor0.col2
----
48
48
48

query I rowsort
SELECT DISTINCT - ( - cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT col1 * - 66 FROM tab1 AS cor0 GROUP BY col1, col1
----
-2904
-3762
-396

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT col0 + 17 FROM tab2 AS cor0 GROUP BY cor0.col0
----
108
109
32

query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1444
576
6241

onlyif mysql # DIV for integer division: 
query I rowsort label-2235
SELECT ALL + tab1.col0 DIV - 87 FROM tab1 GROUP BY tab1.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2235
SELECT ALL + tab1.col0 / - 87 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - + 0 * - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0

query I rowsort
SELECT DISTINCT 44 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-13
0
38

query I rowsort
SELECT - 22 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-22
-22
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 18 col2 FROM tab0 GROUP BY tab0.col1
----
18
18

query I rowsort
SELECT - 85 + - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-129
-142
-91

query I rowsort
SELECT ALL 35 AS col0 FROM tab2 cor0 GROUP BY col2, cor0.col2
----
35
35
35

query I rowsort
SELECT DISTINCT - + 30 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-111
-30

query I rowsort
SELECT DISTINCT + 38 FROM tab1 GROUP BY tab1.col1
----
38

query I rowsort
SELECT + 92 AS col0 FROM tab2 GROUP BY tab2.col1
----
92
92
92

query I rowsort
SELECT 89 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
3916
5073
534

query I rowsort
SELECT + 18 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 19 * tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
-1349
-152
-855

query I rowsort
SELECT DISTINCT + cor0.col1 * - col1 + cor0.col2 * cor0.col1 FROM tab2 cor0 GROUP BY col1, col2
----
1180
1586
697

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2250
SELECT cor0.col0 * - CAST( 69 AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1518
-1932
-5658

skipif mysql # not compatible
query I rowsort label-2250
SELECT cor0.col0 * - CAST ( 69 AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1518
-1932
-5658

query I rowsort
SELECT DISTINCT - 23 AS col0 FROM tab2 GROUP BY tab2.col0
----
-23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2252
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2252
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT tab0.col0 + - tab0.col0 * - col0 FROM tab0 GROUP BY col0
----
1892
6972
702

query I rowsort
SELECT 40 FROM tab2 cor0 GROUP BY cor0.col2
----
40
40
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 25 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
25
25
25

query I rowsort
SELECT ALL - 29 AS col1 FROM tab2 GROUP BY tab2.col2
----
-29
-29
-29

query I rowsort
SELECT ALL - cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL - tab0.col0 + col0 FROM tab0 WHERE - col0 IS NULL GROUP BY tab0.col0
----

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2259
SELECT - cor0.col0 + - cor0.col2 * + CAST( NULL AS DECIMAL ) FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2259
SELECT - cor0.col0 + - cor0.col2 * + CAST ( NULL AS REAL ) FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
164
44
56

query I rowsort
SELECT DISTINCT 58 * col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
2378
3422
3538

query I rowsort
SELECT + - 91 AS col2 FROM tab1 GROUP BY tab1.col0
----
-91
-91
-91

query I rowsort
SELECT ALL + 90 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT cor0.col1 + 15 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
21
59
72

query I rowsort
SELECT ALL 78 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT 5 FROM tab0 AS cor0 GROUP BY col1
----
5
5

query I rowsort
SELECT - + ( 97 ) FROM tab0 GROUP BY tab0.col0
----
-97
-97
-97

query I rowsort
SELECT - cor0.col1 * cor0.col1 FROM tab1 cor0 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT - 23 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-23
-23
-23

query I rowsort
SELECT DISTINCT + 84 FROM tab0 GROUP BY tab0.col1
----
84

query I rowsort
SELECT DISTINCT + 54 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
54

query I rowsort
SELECT - cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-2273
SELECT - tab2.col1 DIV 88 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2273
SELECT - tab2.col1 / 88 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + ( col1 ) FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 26 FROM tab2 GROUP BY tab2.col1
----
26
26
26

query I rowsort
SELECT 43 FROM tab1 GROUP BY tab1.col1
----
43
43
43

query I rowsort
SELECT ALL + 76 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
76
76
76

query I rowsort
SELECT 77 * + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6237

query I rowsort
SELECT - tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL < NULL
----

query I rowsort
SELECT + cor0.col0 * 9 FROM tab2 AS cor0 GROUP BY cor0.col0
----
135
819
828

query I rowsort
SELECT + + 52 + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-30
24
30

query I rowsort
SELECT 86 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
86
86
86

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
6561

query I rowsort
SELECT - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - cor0.col0 * - 39 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3549
3588
585

query I rowsort
SELECT DISTINCT - + tab0.col2 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2287
SELECT DISTINCT - cor0.col1 DIV + col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2287
SELECT DISTINCT - cor0.col1 / + col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
0

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 1 FROM tab0 cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT + 22 FROM tab2 GROUP BY tab2.col2
----
22
22
22

query I rowsort
SELECT - 49 FROM tab1 GROUP BY tab1.col0
----
-49
-49
-49

query I rowsort
SELECT 37 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT ALL col0 * 51 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1326
2193
4233

query I rowsort
SELECT ALL - tab2.col0 * - tab2.col0 + tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
240
8372
8556

query I rowsort
SELECT ALL + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT - - tab1.col0 * 87 FROM tab1 GROUP BY tab1.col0
----
1914
2436
7134

query I rowsort
SELECT ALL 54 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
2376
3078
324

query I rowsort
SELECT DISTINCT - ( - tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 17 AS col2 FROM tab0 GROUP BY col1
----
-17

query I rowsort
SELECT ( + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 44 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-44

query I rowsort
SELECT - cor0.col0 * + 77 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-2002
-3311
-6391

query I rowsort
SELECT ALL + - 27 FROM tab0 GROUP BY tab0.col0
----
-27
-27
-27

query I rowsort
SELECT DISTINCT + COALESCE ( + 66, tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
66

query I rowsort
SELECT 55 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT - 84 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-84
-84
-84

query I rowsort
SELECT + 38 FROM tab2 GROUP BY tab2.col2
----
38
38
38

query I rowsort
SELECT - - 33 AS col2 FROM tab0 GROUP BY tab0.col1
----
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 16 + cor0.col0 * cor0.col2 col2 FROM tab2 cor0 GROUP BY col2, cor0.col0
----
1321
5352
7205

query I rowsort
SELECT + tab2.col2 - + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT - col1 + + 87 FROM tab1 AS cor0 GROUP BY cor0.col1
----
30
43
81

query I rowsort
SELECT 0 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2313
SELECT DISTINCT 40 + cor0.col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
41

skipif mysql # not compatible
query I rowsort label-2313
SELECT DISTINCT 40 + cor0.col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
41

query I rowsort
SELECT + 77 FROM tab0 AS cor0 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT 57 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
57
57
57

query I rowsort
SELECT DISTINCT - 26 + - tab1.col1 * + tab1.col1 FROM tab1 GROUP BY col1
----
-1962
-3275
-62

query I rowsort
SELECT DISTINCT - 17 AS col0 FROM tab1 GROUP BY col2
----
-17

query I rowsort
SELECT + 59 FROM tab0 AS cor0 GROUP BY col1
----
59
59

onlyif mysql # DIV for integer division: 
query I rowsort label-2319
SELECT - 7 - + cor0.col1 DIV cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-8
-8
-8

skipif mysql # not compatible
query I rowsort label-2319
SELECT - 7 - + cor0.col1 / cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-8
-8
-8

query I rowsort
SELECT 20 AS col0 FROM tab1 GROUP BY tab1.col0
----
20
20
20

query I rowsort
SELECT 27 FROM tab0 GROUP BY tab0.col2
----
27
27
27

query I rowsort
SELECT + col2 * tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT + tab0.col0 * col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT ALL + + 82 AS col1 FROM tab1 GROUP BY tab1.col0
----
82
82
82

query I rowsort
SELECT ALL col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT + 4 FROM tab0 GROUP BY tab0.col2
----
4
4
4

query I rowsort
SELECT ALL - 54 AS col0 FROM tab1 GROUP BY tab1.col1
----
-54
-54
-54

query I rowsort
SELECT + 66 FROM tab0 cor0 GROUP BY cor0.col1
----
66
66

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT - col1 + - 64 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-105
-123
-125

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2331
SELECT CAST( - 43 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-43
-43
-43

skipif mysql # not compatible
query I rowsort label-2331
SELECT CAST ( - 43 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-43
-43
-43

query I rowsort
SELECT - - 46 + + 85 AS col1 FROM tab2 GROUP BY tab2.col0
----
131
131
131

query I rowsort
SELECT - 83 AS col1 FROM tab2 GROUP BY tab2.col2
----
-83
-83
-83

query I rowsort
SELECT - tab2.col1 * 79 FROM tab2 GROUP BY tab2.col1
----
-3239
-4661
-4819

query I rowsort
SELECT + 70 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
70
70
70

query I rowsort
SELECT COALESCE ( NULLIF ( cor0.col2, + 14 ), - 50 ) * cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
2565
3124
48

query I rowsort
SELECT DISTINCT 92 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
92

query I rowsort
SELECT DISTINCT - 33 FROM tab2 GROUP BY tab2.col0
----
-33

query I rowsort
SELECT - - 9 AS col2 FROM tab0 GROUP BY tab0.col0
----
9
9
9

query I rowsort
SELECT DISTINCT + tab1.col1 - 97 FROM tab1 GROUP BY tab1.col1
----
-40
-53
-91

query I rowsort
SELECT DISTINCT + tab1.col1 * + tab1.col1 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT ALL col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
45
71
8

query I rowsort
SELECT ALL 8 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT - COALESCE ( + cor0.col2, col1 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT ALL + 23 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
1817
552
874

query I rowsort
SELECT - 63 FROM tab0 GROUP BY tab0.col0
----
-63
-63
-63

query I rowsort
SELECT ALL 23 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
23
23
23

query I rowsort
SELECT ALL - cor0.col0 + col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col0 * + cor0.col0 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
462
6642
756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 83 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
83
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2, cor0.col0
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 10 - - tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
68
89
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT COALESCE ( 50, tab0.col1 * ( + tab0.col0 * tab0.col1 ) + tab0.col0 ) col0 FROM tab0 GROUP BY col1
----
50

query I rowsort
SELECT 98 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1470
8918
9016

query I rowsort
SELECT ALL - col0 - 53 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-144
-145
-68

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2356
SELECT DISTINCT CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-2356
SELECT DISTINCT CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL 59 + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
140
59

query I rowsort
SELECT + col2 AS col1 FROM tab1 GROUP BY col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT ALL col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, col1
----
45
71
8

query I rowsort
SELECT + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT - 18 FROM tab1 GROUP BY col2
----
-18
-18
-18

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2363
SELECT + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2363
SELECT + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + tab1.col1 + - tab1.col1 FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT ALL + - tab0.col2 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT 61 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
61
61
61

query I rowsort
SELECT - 62 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-62
-62
-62

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1849
676
6889

onlyif mysql # DIV for integer division: 
query I rowsort label-2372
SELECT + + 39 DIV - 15 AS col0 FROM tab2 GROUP BY col1
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-2372
SELECT + + 39 / - 15 AS col0 FROM tab2 GROUP BY col1
----
-2
-2
-2

query I rowsort
SELECT - + ( 16 ) FROM tab0 GROUP BY col1
----
-16
-16

query I rowsort
SELECT - 13 AS col2 FROM tab1 GROUP BY tab1.col1
----
-13
-13
-13

query I rowsort
SELECT + NULLIF ( + tab1.col1, + tab1.col1 ) * col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 - - 78 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
104
121
161

query I rowsort
SELECT - + tab0.col0 * 97 + 53 FROM tab0 GROUP BY col0
----
-2469
-4118
-7998

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 col0 FROM tab2 GROUP BY tab2.col1 HAVING ( NULL ) IN ( col1 * + col1 )
----

query I rowsort
SELECT DISTINCT + 79 - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-2
79

query I rowsort
SELECT ALL 77 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6237

query I rowsort
SELECT ALL + - 15 * - 47 FROM tab2 GROUP BY tab2.col2
----
705
705
705

query I rowsort
SELECT ALL cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 94 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
94
94
94

query I rowsort
SELECT - ( col1 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT - 58 * 81 AS col0 FROM tab1 GROUP BY tab1.col1
----
-4698
-4698
-4698

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 5 col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-5
-5
-5

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col1 - + 66 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-3787
-5155
-5681

query I rowsort
SELECT ALL - - cor0.col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT 50 AS col0 FROM tab0 GROUP BY tab0.col1
----
50
50

query I rowsort
SELECT DISTINCT - + 95 FROM tab1 GROUP BY col2
----
-95

query I rowsort
SELECT cor0.col0 + 61 AS col0 FROM tab0 cor0 GROUP BY col0
----
104
144
87

query I rowsort
SELECT DISTINCT - 0 FROM tab2 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT + + 49 * - 51 FROM tab0 GROUP BY tab0.col0
----
-2499
-2499
-2499

query I rowsort
SELECT DISTINCT - 15 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-15

query I rowsort
SELECT - NULLIF ( + cor0.col1, cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + - ( - tab2.col2 ) FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT + 87 AS col2 FROM tab2 GROUP BY tab2.col1
----
87
87
87

query I rowsort
SELECT ALL - 45 FROM tab2 cor0 GROUP BY cor0.col2
----
-45
-45
-45

query I rowsort
SELECT 86 + cor0.col0 * 2 FROM tab2 AS cor0 GROUP BY col0
----
116
268
270

query I rowsort
SELECT ALL - 95 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-95
-95
-95

query I rowsort
SELECT DISTINCT + 22 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22

query I rowsort
SELECT ALL 51 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
110
112
92

query I rowsort
SELECT CASE + tab1.col1 WHEN 30 THEN - 42 END FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT 1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1
1
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 99 col2 FROM tab1 cor0 GROUP BY cor0.col0
----
99
99
99

query I rowsort
SELECT ALL 21 * cor0.col2 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1259
1718
1888

query I rowsort
SELECT 4 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
4
4
4

query I rowsort
SELECT ALL + + 37 AS col0 FROM tab2 GROUP BY tab2.col1
----
37
37
37

query I rowsort
SELECT ALL - 3 * 24 AS col1 FROM tab2 GROUP BY col0
----
-72
-72
-72

query I rowsort
SELECT + 28 FROM tab2 GROUP BY tab2.col2
----
28
28
28

query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT ALL 22 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
22
22
22

query I rowsort
SELECT DISTINCT + cor0.col0 * - 73 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1095
-6643
-6716

query I rowsort
SELECT DISTINCT + tab0.col2 + + 76 FROM tab0 GROUP BY tab0.col2
----
100
114
155

query I rowsort
SELECT ALL 30 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT 54 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT 57 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT ALL + - 51 AS col2 FROM tab0 GROUP BY tab0.col2
----
-51
-51
-51

query I rowsort
SELECT DISTINCT ( - 45 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-45

query I rowsort
SELECT - 61 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-61
-61
-61

query I rowsort
SELECT DISTINCT cor0.col0 - cor0.col0 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3680
-5278
-900

onlyif mysql # DIV for integer division: 
query I rowsort label-2424
SELECT ( - 52 ) DIV + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-2424
SELECT ( - 52 ) / + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-1
-2
0

query I rowsort
SELECT DISTINCT 22 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
22

query I rowsort
SELECT + 75 AS col1 FROM tab1 GROUP BY tab1.col0
----
75
75
75

query I rowsort
SELECT DISTINCT + 52 FROM tab0 AS cor0 GROUP BY cor0.col1
----
52

query I rowsort
SELECT + - tab1.col1 - + 72 * tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
-3212
-4161
-438

query I rowsort
SELECT - 92 + - col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-116
-130
-171

query I rowsort
SELECT ALL - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT DISTINCT tab1.col0 - 93 AS col0 FROM tab1 GROUP BY tab1.col0
----
-11
-65
-71

query I rowsort
SELECT DISTINCT 41 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
41

query I rowsort
SELECT DISTINCT - 78 FROM tab0 AS cor0 GROUP BY col2
----
-78

query I rowsort
SELECT ALL + cor0.col2 + 26 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
105
113
84

query I rowsort
SELECT 25 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
2025

query I rowsort
SELECT 3 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3
3
3

query I rowsort
SELECT ALL ( - col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-58
-79
-87

query I rowsort
SELECT ALL 41 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT DISTINCT 29 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
29

query I rowsort
SELECT DISTINCT - ( + 35 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-35

query I rowsort
SELECT DISTINCT + + 4 AS col2 FROM tab0 GROUP BY tab0.col0
----
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - 17 col1 FROM tab2 AS cor0 GROUP BY col0
----
-1547
-1564
-255

query I rowsort
SELECT 42 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
42
42
42

query I rowsort
SELECT ALL + COALESCE ( + 63, - tab0.col1 ) * + 8 FROM tab0 GROUP BY tab0.col1
----
504
504

query I rowsort
SELECT + - 32 AS col2 FROM tab0 GROUP BY tab0.col1
----
-32
-32

query I rowsort
SELECT - col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL > ( NULL )
----

query I rowsort
SELECT - 29 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-29
-29
-29

query I rowsort
SELECT - 10 AS col2 FROM tab1 GROUP BY tab1.col2
----
-10
-10
-10

query I rowsort
SELECT ALL ( 14 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
14
14
14

query I rowsort
SELECT + + col1 FROM tab0 GROUP BY col1
----
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2451
SELECT ALL + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2451
SELECT ALL + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-2452
SELECT + 62 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
1
7

skipif mysql # not compatible
query I rowsort label-2452
SELECT + 62 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
1
7

query I rowsort
SELECT 8 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT ALL - 19 + + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
22
40
42

query I rowsort
SELECT + cor0.col0 * cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT + 89 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
89
89
89

query I rowsort
SELECT ALL + + 12 FROM tab2 GROUP BY tab2.col0
----
12
12
12

query I rowsort
SELECT ALL + col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + 63 AS col2 FROM tab0 GROUP BY tab0.col0
----
63
63
63

query I rowsort
SELECT DISTINCT + 57 FROM tab2 AS cor0 GROUP BY cor0.col0
----
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( 26 ) * cor0.col1 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
2106

query I rowsort
SELECT ALL 61 AS col1 FROM tab0 GROUP BY col0
----
61
61
61

query I rowsort
SELECT + tab1.col0 * - 89 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1958
-2492
-7298

query I rowsort
SELECT - 7 FROM tab2 AS cor0 GROUP BY col2
----
-7
-7
-7

query I rowsort
SELECT - tab0.col1 + 9 AS col0 FROM tab0 GROUP BY tab0.col1
----
-72
9

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2466
SELECT ALL tab1.col0 / CAST( NULL AS SIGNED ) FROM tab1 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2466
SELECT ALL tab1.col0 / CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT NULLIF ( cor0.col1, - 1 ) col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT 0 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

query I rowsort
SELECT + 54 AS col0 FROM tab0 GROUP BY tab0.col0
----
54
54
54

query I rowsort
SELECT + 79 - - cor0.col2 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1946
-4962
15

query I rowsort
SELECT cor0.col2 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT 41 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
41
41

query I rowsort
SELECT ALL - 18 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-18
-18
-18

query I rowsort
SELECT + col1 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT ALL cor0.col2 * + 97 + - 16 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4349
6871
760

query I rowsort
SELECT DISTINCT 64 AS col2 FROM tab1 GROUP BY tab1.col1
----
64

query I rowsort
SELECT DISTINCT 16 AS col1 FROM tab1 GROUP BY tab1.col2
----
16

query I rowsort
SELECT ALL + cor0.col1 * 9 FROM tab1 AS cor0 GROUP BY cor0.col1
----
396
513
54

query I rowsort
SELECT ALL - 31 * - tab0.col1 FROM tab0 GROUP BY col1
----
0
2511

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 90 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
90
90
90

query I rowsort
SELECT + col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT DISTINCT - 0 AS col0 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT ALL col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
41
59
61

query I rowsort
SELECT DISTINCT ( 15 ) * 11 AS col0 FROM tab1 GROUP BY col2
----
165

query I rowsort
SELECT + 21 * 25 AS col0 FROM tab0 GROUP BY tab0.col1
----
525
525

onlyif mysql # DIV for integer division: 
query I rowsort label-2486
SELECT DISTINCT + cor0.col0 DIV + 93 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-2486
SELECT DISTINCT + cor0.col0 / + 93 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0

query I rowsort
SELECT DISTINCT 7 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
7

query I rowsort
SELECT - 87 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-87
-87
-87

query I rowsort
SELECT DISTINCT 22 * 33 FROM tab0 GROUP BY col1
----
726

query I rowsort
SELECT ALL - 34 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-34
-34
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 6 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
6
6
6

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - + tab0.col1 - + COALESCE ( 52, tab0.col0, - col0 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
-133
-52

query I rowsort
SELECT ALL NULLIF ( col1, - 56 * - cor0.col1 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT 49 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
49
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 77 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
77

query I rowsort
SELECT DISTINCT tab2.col2 + tab2.col2 FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT ( 7 ) + col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
31
45
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 45 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT - 16 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-16
-16
-16

query I rowsort
SELECT + tab2.col2 * 34 AS col0 FROM tab2 GROUP BY tab2.col2
----
1972
2686
2958

query I rowsort
SELECT + 51 FROM tab0 GROUP BY tab0.col2
----
51
51
51

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-2503
SELECT - cor0.col1 DIV + 40 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1, cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2503
SELECT - cor0.col1 / + 40 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1, cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL + 85 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
85
85
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
47
47
47

query I rowsort
SELECT DISTINCT + + 29 FROM tab0 GROUP BY tab0.col0
----
29

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2507
SELECT ALL - - CAST( NULL AS DECIMAL ) * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2507
SELECT ALL - - CAST ( NULL AS REAL ) * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 94 * + 79 FROM tab2 GROUP BY tab2.col2
----
7426
7426
7426

query I rowsort
SELECT + 33 FROM tab2 AS cor0 GROUP BY cor0.col1
----
33
33
33

query I rowsort
SELECT DISTINCT - cor0.col1 * + 64 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5184
0

query I rowsort
SELECT ALL cor0.col1 * + 74 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
5994

query I rowsort
SELECT + cor0.col1 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT + tab1.col2 * + 34 FROM tab1 GROUP BY tab1.col2
----
1530
2414
272

query I rowsort
SELECT DISTINCT ( 46 ) FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
46

query I rowsort
SELECT + cor0.col2 * - cor0.col2 + + 48 FROM tab0 cor0 GROUP BY cor0.col2
----
-1396
-528
-6193

query I rowsort
SELECT ALL 3 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
3
3
3

onlyif mysql # DIV for integer division: 
query I rowsort label-2517
SELECT ALL - 86 DIV + tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-2517
SELECT ALL - 86 / + tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
-1
-2
-3

query I rowsort
SELECT + 32 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
32
32
32

query I rowsort
SELECT ALL + + 81 + + col2 FROM tab2 GROUP BY tab2.col2
----
139
160
168

onlyif mysql # DIV for integer division: 
query I rowsort label-2520
SELECT ALL - 76 DIV col2 FROM tab0 GROUP BY tab0.col2
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-2520
SELECT ALL - 76 / col2 FROM tab0 GROUP BY tab0.col2
----
-2
-3
0

query I rowsort
SELECT cor0.col1 * col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
0
0
6561

query I rowsort
SELECT ALL 9 FROM tab1 AS cor0 GROUP BY cor0.col0
----
9
9
9

query I rowsort
SELECT DISTINCT - 71 + + 43 AS col1 FROM tab2 GROUP BY tab2.col2
----
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 88 * + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY col2
----
5104
6952
7656

query I rowsort
SELECT ALL + 89 * col2 FROM tab0 AS cor0 GROUP BY col2
----
2136
3382
7031

query I rowsort
SELECT - 10 + + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
14
28
69

query I rowsort
SELECT - 27 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1566
-2133
-2349

query I rowsort
SELECT ALL - 35 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-35
-35
-35

query I rowsort
SELECT DISTINCT + - tab2.col1 * tab2.col1 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT - col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0

query I rowsort
SELECT 36 FROM tab1, tab1 AS cor0 GROUP BY tab1.col2
----
36
36
36

query I rowsort
SELECT ALL + 95 * col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
3895
5605
5795

query I rowsort
SELECT DISTINCT + 99 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
99

query I rowsort
SELECT ALL + 59 * tab1.col1 FROM tab1 GROUP BY col1
----
2596
3363
354

query I rowsort
SELECT DISTINCT - 66 * col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-6006
-6072
-990

query I rowsort
SELECT ALL 76 FROM tab0 GROUP BY tab0.col0
----
76
76
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 54 col0 FROM tab0 GROUP BY tab0.col2
----
54
54
54

query I rowsort
SELECT ALL + 2 * col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
182
184
30

onlyif mysql # DIV for integer division: 
query I rowsort label-2539
SELECT ALL - 26 - + 52 DIV cor0.col0 FROM tab2 cor0 GROUP BY col0
----
-26
-26
-29

skipif mysql # not compatible
query I rowsort label-2539
SELECT ALL - 26 - + 52 / cor0.col0 FROM tab2 cor0 GROUP BY col0
----
-26
-26
-29

query I rowsort
SELECT - col2 + - 70 FROM tab0 GROUP BY col2
----
-108
-149
-94

query I rowsort
SELECT 0 + - 69 FROM tab0 GROUP BY tab0.col1
----
-69
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col1 col0 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT - - 96 FROM tab0 GROUP BY tab0.col1
----
96

query I rowsort
SELECT ALL + + tab2.col2 + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT DISTINCT 11 AS col0 FROM tab0 GROUP BY col1
----
11

query I rowsort
SELECT ALL cor0.col0 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
26
43
83

query I rowsort
SELECT 25 + col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
33
70
96

query I rowsort
SELECT + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - 24 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24

query I rowsort
SELECT ALL + 2 FROM tab0 GROUP BY tab0.col2
----
2
2
2

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * - 77 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1155
-7007
-7084

query I rowsort
SELECT 13 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
13
13
13

query I rowsort
SELECT + 26 FROM tab2 AS cor0 GROUP BY col0
----
26
26
26

query I rowsort
SELECT DISTINCT + col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-2557
SELECT + tab0.col2 DIV - tab0.col2 - - 44 FROM tab0 GROUP BY tab0.col2
----
43
43
43

skipif mysql # not compatible
query I rowsort label-2557
SELECT + tab0.col2 / - tab0.col2 - - 44 FROM tab0 GROUP BY tab0.col2
----
43
43
43

query I rowsort
SELECT ( ( cor0.col2 ) ) FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-2559
SELECT ( + col2 ) DIV - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2559
SELECT ( + col2 ) / - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-2560
SELECT COALESCE ( cor0.col2, + cor0.col2 * 5 ) DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-2560
SELECT COALESCE ( cor0.col2, + cor0.col2 * 5 ) / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-5
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 82 col2 FROM tab2 GROUP BY tab2.col1
----
82
82
82

query I rowsort
SELECT ALL + - 68 AS col2 FROM tab2 GROUP BY tab2.col1
----
-68
-68
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 19 col1 FROM tab2 GROUP BY tab2.col1
----
19

query I rowsort
SELECT + col2 + + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT ALL - cor0.col0 * + 49 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1078
-1372
-4018

query I rowsort
SELECT DISTINCT - cor0.col1 - + cor0.col2 FROM tab2 cor0 GROUP BY col2, cor0.col1
----
-138
-148
-99

onlyif mysql # DIV for integer division: 
query I rowsort label-2567
SELECT cor0.col0 + cor0.col0 DIV cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
15
92
93

skipif mysql # not compatible
query I rowsort label-2567
SELECT cor0.col0 + cor0.col0 / cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
15
92
93

query I rowsort
SELECT 72 * 93 FROM tab2 AS cor0 GROUP BY cor0.col0
----
6696
6696
6696

query I rowsort
SELECT 71 FROM tab0 cor0 GROUP BY cor0.col0
----
71
71
71

query I rowsort
SELECT DISTINCT col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0

query I rowsort
SELECT 62 FROM tab2 AS cor0 GROUP BY cor0.col0
----
62
62
62

query I rowsort
SELECT + 84 FROM tab0 GROUP BY tab0.col2
----
84
84
84

query I rowsort
SELECT 87 FROM tab2 cor0 GROUP BY cor0.col1
----
87
87
87

query I rowsort
SELECT + + 79 FROM tab2 GROUP BY tab2.col1
----
79
79
79

query I rowsort
SELECT DISTINCT 73 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
73

query I rowsort
SELECT DISTINCT 41 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
41

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 51 * 17 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
867

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 10 col1 FROM tab1 GROUP BY tab1.col2
----
10

query I rowsort
SELECT - - 90 * + 53 FROM tab1 GROUP BY tab1.col2
----
4770
4770
4770

query I rowsort
SELECT + 79 AS col1 FROM tab2 GROUP BY tab2.col2
----
79
79
79

query I rowsort
SELECT ALL + 18 * + tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
0
1458

query I rowsort
SELECT cor0.col0 * col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT ALL - 43 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-43
-43
-43

query I rowsort
SELECT ALL - 45 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT 81 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3564
4617
486

query I rowsort
SELECT DISTINCT - 10 AS col2 FROM tab0 GROUP BY tab0.col0
----
-10

query I rowsort
SELECT ALL + cor0.col0 * 53 FROM tab0 AS cor0 GROUP BY col0
----
1378
2279
4399

query I rowsort
SELECT ALL + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
45
71
8

query I rowsort
SELECT DISTINCT + ( - cor0.col0 ) + col0 * + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1806
650
6806

query I rowsort
SELECT + ( - tab1.col2 ) AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL cor0.col2 + 86 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
131
157
94

query I rowsort
SELECT ALL - 24 FROM tab2 cor0 GROUP BY cor0.col0
----
-24
-24
-24

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2594
SELECT CAST( NULL AS SIGNED ) + - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2594
SELECT CAST ( NULL AS INTEGER ) + - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( - cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
-81
0

query I rowsort
SELECT - 47 FROM tab2 GROUP BY col2
----
-47
-47
-47

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + col1 + - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT cor0.col1 + cor0.col1 * - col1 FROM tab0 AS cor0 GROUP BY col1
----
-6480
0

query I rowsort
SELECT - COALESCE ( 44, tab2.col0 * tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
-44
-44
-44

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 + tab1.col2 AS col0 FROM tab1 WHERE NULL IS NULL GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT + 63 * + 79 FROM tab0 GROUP BY tab0.col0
----
4977
4977
4977

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2605
SELECT DISTINCT + CAST( col1 AS SIGNED ) FROM tab2 GROUP BY col1
----
41
59
61

skipif mysql # not compatible
query I rowsort label-2605
SELECT DISTINCT + CAST ( col1 AS INTEGER ) FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + cor0.col0 * 61 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
5551
5612
915

query I rowsort
SELECT 14 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 20 col2 FROM tab2 GROUP BY col2
----
20

query I rowsort
SELECT ALL 67 FROM tab0 AS cor0 GROUP BY col0
----
67
67
67

onlyif mysql # DIV for integer division: 
query I rowsort label-2611
SELECT ALL 48 DIV + 94 + + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

skipif mysql # not compatible
query I rowsort label-2611
SELECT ALL 48 / + 94 + + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - - 4 AS col2 FROM tab1 GROUP BY tab1.col1
----
4

query I rowsort
SELECT ALL 82 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 46 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
46
46
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT 8 - - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
66
87
95

onlyif mysql # DIV for integer division: 
query I rowsort label-2617
SELECT ALL - + tab1.col0 DIV - tab1.col0 + - tab1.col0 FROM tab1 GROUP BY col0
----
-21
-27
-81

skipif mysql # not compatible
query I rowsort label-2617
SELECT ALL - + tab1.col0 / - tab1.col0 + - tab1.col0 FROM tab1 GROUP BY col0
----
-21
-27
-81

query I rowsort
SELECT + - col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL cor0.col2 * 78 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3510
5538
624

query I rowsort
SELECT 36 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
36
36
36

query I rowsort
SELECT + 96 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
96
96
96

query I rowsort
SELECT ALL - 21 + - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-62
-80
-82

query I rowsort
SELECT DISTINCT + 14 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1106
336
532

query I rowsort
SELECT 97 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
97
97
97

onlyif mysql # DIV for integer division: 
query I rowsort label-2625
SELECT - - tab0.col2 DIV tab0.col2 FROM tab0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2625
SELECT - - tab0.col2 / tab0.col2 FROM tab0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT - + 19 FROM tab2 GROUP BY tab2.col2
----
-19
-19
-19

query I rowsort
SELECT - + 9 * + 13 + - tab0.col1 * + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-117
-6678

query I rowsort
SELECT - - 21 AS col1 FROM tab2 GROUP BY tab2.col1
----
21
21
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 * tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT + cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
1936
3249
36

query I rowsort
SELECT 35 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
35
35
35

query I rowsort
SELECT ALL 12 FROM tab0 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT + col0 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col0 * + 69 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
1794
2967
5727

query I rowsort
SELECT DISTINCT 62 * - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-1488
-2356
-4898

query I rowsort
SELECT tab1.col0 + + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL + 54 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-4914
-4968
-810

query I rowsort
SELECT 67 * cor0.col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1716
2838
5478

onlyif mysql # DIV for integer division: 
query I rowsort label-2640
SELECT - tab1.col1 DIV - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2640
SELECT - tab1.col1 / - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT + 13 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
13
13
13

query I rowsort
SELECT DISTINCT 63 FROM tab2 AS cor0 GROUP BY col0, col1
----
63

query I rowsort
SELECT cor0.col0 * ( 55 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
5005
5060
825

query I rowsort
SELECT + - 88 AS col1 FROM tab2 GROUP BY tab2.col0
----
-88
-88
-88

query I rowsort
SELECT ALL 34 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
34
34
34

query I rowsort
SELECT DISTINCT + ( 60 ) FROM tab2 GROUP BY tab2.col1
----
60

query I rowsort
SELECT ( cor0.col1 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT cor0.col0 * + cor0.col0 + 45 * - 46 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1394
-221
4819

query I rowsort
SELECT + 17 - + 69 * + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-2812
-4054
-4192

query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0

query I rowsort
SELECT 30 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
30
30
30

onlyif mysql # DIV for integer division: 
query I rowsort label-2652
SELECT + - 13 DIV + 2 AS col0 FROM tab0 GROUP BY tab0.col0
----
-6
-6
-6

skipif mysql # not compatible
query I rowsort label-2652
SELECT + - 13 / + 2 AS col0 FROM tab0 GROUP BY tab0.col0
----
-6
-6
-6

query I rowsort
SELECT + 77 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 28 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT DISTINCT - cor0.col0 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT ALL - tab1.col1 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT 0 FROM tab1 GROUP BY col2
----
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( + 31, tab2.col0 ) FROM tab2 GROUP BY col2
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 6 col2 FROM tab1 GROUP BY col2
----
6

query I rowsort
SELECT ALL - 38 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-38
-38
-38

query I rowsort
SELECT DISTINCT - 60 AS col0 FROM tab1 GROUP BY tab1.col2
----
-60

query I rowsort
SELECT + 8 - - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
34
51
91

query I rowsort
SELECT 49 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT 20 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20
20
20

query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
3364
6241
7569

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT - 85 + 52 AS col2 FROM tab0 GROUP BY tab0.col2
----
-33
-33
-33

onlyif mysql # DIV for integer division: 
query I rowsort label-2668
SELECT + tab2.col0 DIV tab2.col0 FROM tab2 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2668
SELECT + tab2.col0 / tab2.col0 FROM tab2 GROUP BY col0
----
1
1
1

query I rowsort
SELECT tab1.col2 - 19 AS col1 FROM tab1 GROUP BY tab1.col2
----
-11
26
52

query I rowsort
SELECT DISTINCT cor0.col2 * 53 FROM tab1 AS cor0 GROUP BY col2
----
2385
3763
424

query I rowsort
SELECT - tab0.col0 * 37 + tab0.col0 * col0 FROM tab0 GROUP BY tab0.col0
----
-286
258
3818

query I rowsort
SELECT DISTINCT - ( tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT - - 67 FROM tab1 GROUP BY col1
----
67

query I rowsort
SELECT DISTINCT col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2676
SELECT DISTINCT + cor0.col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-2676
SELECT DISTINCT + cor0.col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT tab2.col0 - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT DISTINCT cor0.col2 * - 57 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2, cor0.col1
----
-3306
-4503
-4959

query I rowsort
SELECT 48 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
48
48
48

query I rowsort
SELECT DISTINCT + 15 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
15

query I rowsort
SELECT cor0.col0 * 29 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2378
638
812

query I rowsort
SELECT 84 FROM tab2 AS cor0 GROUP BY col0
----
84
84
84

onlyif mysql # DIV for integer division: 
query I rowsort label-2683
SELECT 44 DIV col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2683
SELECT 44 / col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT 89 * cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
1335
8099
8188

query I rowsort
SELECT + 18 - - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
101
44
61

query I rowsort
SELECT + - 29 FROM tab2 GROUP BY tab2.col1
----
-29
-29
-29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 93 * + 91 col0 FROM tab1 cor0 GROUP BY cor0.col1, col1
----
8463

query I rowsort
SELECT cor0.col2 * - ( + cor0.col2 ) AS col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor0.col2
----
-3364
-3364
-6241
-6241
-7569
-7569

query I rowsort
SELECT - 11 AS col0 FROM tab0 GROUP BY col1
----
-11
-11

query I rowsort
SELECT DISTINCT 8 FROM tab1 cor0 GROUP BY cor0.col2
----
8

query I rowsort
SELECT + cor0.col1 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
3772
5369
915

query I rowsort
SELECT cor0.col0 + cor0.col0 * 85 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2236
3698
7138

query I rowsort
SELECT DISTINCT 20 FROM tab1 AS cor0 GROUP BY cor0.col2
----
20

query I rowsort
SELECT 10 FROM tab2 cor0 GROUP BY cor0.col2
----
10
10
10

query I rowsort
SELECT DISTINCT + 44 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
44

query I rowsort
SELECT - + 16 AS col2 FROM tab1 GROUP BY tab1.col1
----
-16
-16
-16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 83 + + cor0.col2 * cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1115
2137
3237

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
45
71
8

query I rowsort
SELECT + ( col1 ) * tab1.col1 + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1980
3306
42

query I rowsort
SELECT ALL - 85 * - tab0.col2 + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
2064
3268
6794

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 + - tab1.col1 col2 FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT ALL 55 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
55
55

query I rowsort
SELECT + ( 85 ) + + 91 AS col0 FROM tab2 GROUP BY tab2.col2
----
176
176
176

query I rowsort
SELECT 4 AS col0 FROM tab2 GROUP BY tab2.col2
----
4
4
4

query I rowsort
SELECT ALL - 18 AS col1 FROM tab1 GROUP BY tab1.col1
----
-18
-18
-18

query I rowsort
SELECT 36 + - cor0.col2 * - 88 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
3996
6284
740

query I rowsort
SELECT DISTINCT - - tab2.col0 + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT DISTINCT - + tab1.col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT - - 37 + - 36 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT - 56 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col0, col2
----
-56
-56
-56

query I rowsort
SELECT - 98 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-98
-98
-98

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 * 64 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1560
2470
5135

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2713
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-2713
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-2714
SELECT - tab2.col1 DIV 89 + - 77 AS col1 FROM tab2 GROUP BY tab2.col1
----
-77
-77
-77

skipif mysql # not compatible
query I rowsort label-2714
SELECT - tab2.col1 / 89 + - 77 AS col1 FROM tab2 GROUP BY tab2.col1
----
-77
-77
-77

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 89 AS col0 FROM tab0 GROUP BY tab0.col2
----
89

query I rowsort
SELECT ALL 9 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
9
9

query I rowsort
SELECT ALL 65 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
65
65

query I rowsort
SELECT + 60 * + 4 FROM tab0 GROUP BY col0
----
240
240
240

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2720
SELECT CAST( NULL AS SIGNED ) + 2 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-2720
SELECT CAST ( NULL AS INTEGER ) + 2 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 + 65 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
156
157
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 99 col2 FROM tab0 GROUP BY tab0.col2
----
-99
-99
-99

query I rowsort
SELECT - + ( tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL + tab1.col0 * tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT + tab0.col2 + 87 FROM tab0 GROUP BY col2
----
111
125
166

query I rowsort
SELECT DISTINCT + 48 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
48

query I rowsort
SELECT + + 71 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
71
71
71

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT 80 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
80
80
80

query I rowsort
SELECT + 36 - cor0.col1 * 40 FROM tab0 AS cor0 GROUP BY col1
----
-3204
36

query I rowsort
SELECT + ( 74 ) FROM tab1 GROUP BY col0
----
74
74
74

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
45
71
8

query I rowsort
SELECT 52 FROM tab1 GROUP BY tab1.col0
----
52
52
52

query I rowsort
SELECT DISTINCT - tab1.col2 + + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT DISTINCT + cor0.col0 * + 50 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1300
2150
4150

query I rowsort
SELECT + 53 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
111
132
140

query I rowsort
SELECT - - ( tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
-81
0

query I rowsort
SELECT DISTINCT tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING ( NULL ) NOT BETWEEN tab0.col0 AND NULL
----

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 WHERE NOT ( NULL ) NOT BETWEEN col1 AND NULL GROUP BY cor0.col1
----

onlyif mysql # DIV for integer division: 
query I rowsort label-2741
SELECT DISTINCT tab2.col1 DIV tab2.col1 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
42
60
62

skipif mysql # not compatible
query I rowsort label-2741
SELECT DISTINCT tab2.col1 / tab2.col1 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
42
60
62

query I rowsort
SELECT - 45 * + 72 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-3240
-3240
-3240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT - 82 * - cor0.col0 AS col2 FROM tab1, tab0 cor0 GROUP BY cor0.col0
----
2132
3526
6806

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1, cor0.col1
----
0
0
81
81

query I rowsort
SELECT - 2 FROM tab2 GROUP BY tab2.col2
----
-2
-2
-2

query I rowsort
SELECT ALL + - 59 + - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-141
-81
-87

query I rowsort
SELECT 83 FROM tab1 AS cor0 GROUP BY col0
----
83
83
83

query I rowsort
SELECT ( 30 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT ALL + ( 35 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
35
35
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 52 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
52
52
52

query I rowsort
SELECT - 76 FROM tab2 GROUP BY tab2.col1
----
-76
-76
-76

query I rowsort
SELECT DISTINCT + 45 FROM tab0 AS cor0 GROUP BY cor0.col0
----
45

query I rowsort
SELECT + 8 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
8
8
8

query I rowsort
SELECT - col2 * tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT + cor0.col0 FROM tab1 cor0 GROUP BY col0, col2
----
22
28
82

query I rowsort
SELECT + 31 FROM tab0 AS cor0 GROUP BY cor0.col1
----
31
31

query I rowsort
SELECT 47 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
47
47
47

query I rowsort
SELECT + 42 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-49
-50
27

query I rowsort
SELECT tab1.col0 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL + 61 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
61
61
61

query I rowsort
SELECT 29 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
29
29
29

query I rowsort
SELECT - 73 FROM tab0 AS cor0 GROUP BY col1
----
-73
-73

query I rowsort
SELECT DISTINCT col2 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT DISTINCT tab1.col1 - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT - - 7 AS col2 FROM tab2 GROUP BY tab2.col0
----
7
7
7

onlyif mysql # DIV for integer division: 
query I rowsort label-2767
SELECT ALL cor0.col1 DIV + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2767
SELECT ALL cor0.col1 / + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
0
0
0

query I rowsort
SELECT + cor0.col2 + 89 FROM tab1 AS cor0 GROUP BY col2
----
134
160
97

query I rowsort
SELECT DISTINCT + tab1.col2 - col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT ALL - + 94 FROM tab1 GROUP BY tab1.col2
----
-94
-94
-94

query I rowsort
SELECT ALL - 21 - 33 AS col1 FROM tab0 GROUP BY tab0.col2
----
-54
-54
-54

query I rowsort
SELECT + + 11 AS col1 FROM tab2 GROUP BY tab2.col2
----
11
11
11

query I rowsort
SELECT - 13 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-13
-13
-13

query I rowsort
SELECT 97 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
105
142
168

query I rowsort
SELECT DISTINCT 96 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
96

query I rowsort
SELECT ALL + 13 FROM tab0 AS cor0 GROUP BY cor0.col2
----
13
13
13

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 92 * cor1.col0 col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
1380
8372
8464

query I rowsort
SELECT 14 FROM tab2 GROUP BY tab2.col1
----
14
14
14

query I rowsort
SELECT - 22 AS col2 FROM tab2 GROUP BY tab2.col1
----
-22
-22
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * - 82 col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-3690
-5822
-656

query I rowsort
SELECT 19 FROM tab0 GROUP BY tab0.col2
----
19
19
19

query I rowsort
SELECT - 96 + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-35
-37
-55

query I rowsort
SELECT + col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT + 12 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
12
12
12

query I rowsort
SELECT DISTINCT + 70 FROM tab1 GROUP BY tab1.col0
----
70

query I rowsort
SELECT - + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + 64 - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20
58
7

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2789
SELECT + CAST( NULL AS SIGNED ) * + cor0.col2 + 59 * + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2789
SELECT + CAST ( NULL AS INTEGER ) * + cor0.col2 + 59 * + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT tab1.col2 + tab1.col2 AS col1 FROM tab1 WHERE NOT NULL BETWEEN - tab1.col0 AND NULL GROUP BY tab1.col2
----

query I rowsort
SELECT DISTINCT - tab2.col2 FROM tab2 WHERE NULL IS NOT NULL GROUP BY col2
----

query I rowsort
SELECT tab0.col2 + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT ALL col2 + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
158
48
76

query I rowsort
SELECT DISTINCT - 99 + + cor0.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
-42
-55
-93

query I rowsort
SELECT + 30 * - 0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL - 23 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-23
-23
-23

query I rowsort
SELECT - 23 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-23
-23
-23

query I rowsort
SELECT + 4 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
26
32
86

query I rowsort
SELECT DISTINCT 20 * 21 FROM tab0 AS cor0 GROUP BY cor0.col0
----
420

query I rowsort
SELECT ALL - 52 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1144
1456
4264

query I rowsort
SELECT DISTINCT - 4 AS col0 FROM tab0 GROUP BY tab0.col0
----
-4

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor1.col0
----
9 values hashing to 559da8f454c4e5599b87319641a4f49a

query I rowsort
SELECT 85 AS col2 FROM tab2 GROUP BY tab2.col1
----
85
85
85

query I rowsort
SELECT + 43 FROM tab0 AS cor0 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT col2 + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT + tab0.col2 * 89 FROM tab0 GROUP BY col2
----
2136
3382
7031

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 - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + tab0.col2 * - 37 AS col0 FROM tab0 GROUP BY col2
----
-1406
-2923
-888

query I rowsort
SELECT - - 62 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
5642
5704
930

query I rowsort
SELECT - ( - 17 ) FROM tab0 GROUP BY tab0.col1
----
17
17

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 + 44 col1 FROM tab0 GROUP BY col0
----
44
44
44

query I rowsort
SELECT + - 31 FROM tab2 GROUP BY tab2.col0
----
-31
-31
-31

onlyif mysql # DIV for integer division: 
query I rowsort label-2818
SELECT ALL - 21 + + col0 DIV col0 AS col1 FROM tab1 GROUP BY col0
----
-20
-20
-20

skipif mysql # not compatible
query I rowsort label-2818
SELECT ALL - 21 + + col0 / col0 AS col1 FROM tab1 GROUP BY col0
----
-20
-20
-20

query I rowsort
SELECT DISTINCT - 6 AS col0 FROM tab1 GROUP BY tab1.col2
----
-6

query I rowsort
SELECT + 29 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1102
2291
696

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 58 col2 FROM tab1 GROUP BY tab1.col1
----
58
58
58

query I rowsort
SELECT 94 FROM tab2 GROUP BY tab2.col0
----
94
94
94

query I rowsort
SELECT ALL cor0.col2 - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT cor0.col0 + - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT cor0.col2 + 91 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
136
162
99

query I rowsort
SELECT DISTINCT + cor0.col1 * + 52 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
2132
3068
3172

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col1 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - + ( - tab1.col2 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 77 AS col0 FROM tab1 GROUP BY tab1.col2
----
77

query I rowsort
SELECT - NULLIF ( + 73, tab2.col1 ) * tab2.col1 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-2952
-4248
-4392

query I rowsort
SELECT tab0.col0 * col0 AS col1 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL >= - tab0.col0
----

query I rowsort
SELECT col0 AS col1 FROM tab2 GROUP BY tab2.col0 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL 7 FROM tab0 cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT 29 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT ( cor1.col0 ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT + col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-2838
SELECT ALL + COALESCE ( 30, cor0.col0 DIV ( cor0.col2 * - 72 ) - col1 ) * + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1740
2370
2610

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2838
SELECT ALL + COALESCE ( 30, cor0.col0 / ( cor0.col2 * - 72 ) - col1 ) * + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1740
2370
2610

query I rowsort
SELECT + 27 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
2214
594
756

query I rowsort
SELECT - 31 AS col2 FROM tab2 GROUP BY tab2.col1
----
-31
-31
-31

query I rowsort
SELECT - cor1.col0 + + cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2, cor1.col0
----
-12
-34
72

query I rowsort
SELECT ALL col1 AS col0 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 + 21 + col2 * - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2004
-43
-5020

query I rowsort
SELECT - tab2.col0 + + tab2.col0 * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
210
8190
8372

query I rowsort
SELECT DISTINCT 23 FROM tab0 AS cor0 GROUP BY cor0.col2
----
23

onlyif mysql # DIV for integer division: 
query I rowsort label-2846
SELECT + cor0.col2 DIV + 87 + + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
88

skipif mysql # not compatible
query I rowsort label-2846
SELECT + cor0.col2 / + 87 + + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
88

onlyif mysql # DIV for integer division: 
query I rowsort label-2847
SELECT COALESCE ( 29, - tab0.col2 + + ( tab0.col0 ), tab0.col2 + col0 DIV - tab0.col2 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
29
29
29

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2847
SELECT COALESCE ( 29, - tab0.col2 + + ( tab0.col0 ), tab0.col2 + col0 / - tab0.col2 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
29
29
29

query I rowsort
SELECT 84 AS col2 FROM tab2 GROUP BY tab2.col1
----
84
84
84

query I rowsort
SELECT DISTINCT + ( 35 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
35

query I rowsort
SELECT ALL 52 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
52
52
52

query I rowsort
SELECT - - 98 * 42 FROM tab0 GROUP BY tab0.col1
----
4116
4116

query I rowsort
SELECT ALL - 77 AS col0 FROM tab2 GROUP BY tab2.col1
----
-77
-77
-77

query I rowsort
SELECT + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, col2, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 34 - + tab0.col2 * tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1410
-542
-6207

query I rowsort
SELECT ALL - tab2.col1 + 65 FROM tab2 GROUP BY tab2.col1
----
24
4
6

onlyif mysql # DIV for integer division: 
query I rowsort label-2856
SELECT - tab0.col0 * 64 + + 40 DIV - col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1665
-2752
-5312

skipif mysql # not compatible
query I rowsort label-2856
SELECT - tab0.col0 * 64 + + 40 / - col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1665
-2752
-5312

query I rowsort
SELECT DISTINCT tab0.col2 + - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT - ( - 71 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
71
71
71

query I rowsort
SELECT DISTINCT - COALESCE ( + tab1.col2, tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + 59 AS col2 FROM tab0 GROUP BY tab0.col0
----
59
59
59

query I rowsort
SELECT ALL + ( + tab2.col0 ) AS col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT - col0 + - 67 AS col0 FROM tab1 GROUP BY tab1.col0
----
-149
-89
-95

query I rowsort
SELECT DISTINCT col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT tab1.col1 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT 72 * - 59 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-4248
-4248

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2867
SELECT ALL + CAST( + col2 AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

skipif mysql # not compatible
query I rowsort label-2867
SELECT ALL + CAST ( + col2 AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + + tab2.col0 + + 66 FROM tab2 GROUP BY tab2.col0
----
157
158
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 97 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-97
-97
-97

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2870
SELECT CAST( - 66 AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col2
----
-66
-66
-66

skipif mysql # not compatible
query I rowsort label-2870
SELECT CAST ( - 66 AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col2
----
-66
-66
-66

query I rowsort
SELECT ALL ( ( + cor0.col1 ) ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 89 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3649
5251
5429

query I rowsort
SELECT DISTINCT 53 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
53

query I rowsort
SELECT ALL tab2.col0 + col0 AS col1 FROM tab2 GROUP BY col0
----
182
184
30

query I rowsort
SELECT tab2.col2 + - col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT - tab1.col1 IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + + ( cor0.col0 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1, cor0.col1
----
58
79
87

query I rowsort
SELECT - 97 AS col0 FROM tab2 GROUP BY tab2.col2
----
-97
-97
-97

query I rowsort
SELECT ALL ( - cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL - 94 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-94
-94

onlyif mysql # DIV for integer division: 
query I rowsort label-2882
SELECT DISTINCT + cor0.col0 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-2882
SELECT DISTINCT + cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT DISTINCT - 71 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-71

query I rowsort
SELECT DISTINCT 89 FROM tab2 cor0 GROUP BY cor0.col1
----
89

query I rowsort
SELECT - 57 AS col1 FROM tab0 GROUP BY col2
----
-57
-57
-57

query I rowsort
SELECT DISTINCT - - 87 AS col1 FROM tab0 GROUP BY tab0.col1
----
87

query I rowsort
SELECT + + 12 * 93 FROM tab0 GROUP BY tab0.col2
----
1116
1116
1116

query I rowsort
SELECT - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1 HAVING ( NULL ) IS NULL
----
-41
-59
-61

query I rowsort
SELECT tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + tab0.col0 * - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT 27 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
27
27
27

query I rowsort
SELECT + + 10 + - 13 FROM tab2 GROUP BY tab2.col0
----
-3
-3
-3

query I rowsort
SELECT - 8 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-8
-8

query I rowsort
SELECT 16 AS col0 FROM tab1 GROUP BY tab1.col2
----
16
16
16

onlyif mysql # DIV for integer division: 
query I rowsort label-2896
SELECT ALL ( 52 ) DIV cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-2896
SELECT ALL ( 52 ) / cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 41 col0 FROM tab0 GROUP BY col2
----
-41
-41
-41

query I rowsort
SELECT - - tab1.col0 * tab1.col0 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
506
6806
812

query I rowsort
SELECT 47 * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1222
2021
3901

query I rowsort
SELECT - 65 AS col2 FROM tab1 GROUP BY tab1.col1
----
-65
-65
-65

query I rowsort
SELECT + - tab2.col1 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT + 5 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
5
5
5

query I rowsort
SELECT DISTINCT - - 40 FROM tab1 GROUP BY tab1.col0
----
40

query I rowsort
SELECT 27 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
27
27
27

onlyif mysql # DIV for integer division: 
query I rowsort label-2905
SELECT DISTINCT 92 DIV cor0.col2 - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-57
-78
-86

skipif mysql # not compatible
query I rowsort label-2905
SELECT DISTINCT 92 / cor0.col2 - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-57
-78
-86

query I rowsort
SELECT DISTINCT - tab0.col2 + 29 FROM tab0 GROUP BY tab0.col2
----
-50
-9
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + 43 * cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1722
2478
2562

query I rowsort
SELECT ALL + 67 FROM tab1 AS cor0 GROUP BY cor0.col2
----
67
67
67

query I rowsort
SELECT ALL + 83 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
83
83

query I rowsort
SELECT ALL ( - 36 ) + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
22
43
51

query I rowsort
SELECT ALL - tab0.col0 + - tab0.col0 * - col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1806
650
6806

query I rowsort
SELECT ALL tab1.col1 FROM tab1 WHERE NOT tab1.col1 <= ( tab1.col1 ) GROUP BY tab1.col1
----

query I rowsort
SELECT - 93 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-93
-93
-93

query I rowsort
SELECT - 55 AS col0 FROM tab1 GROUP BY tab1.col2
----
-55
-55
-55

query I rowsort
SELECT ALL 26 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
34
71
97

query I rowsort
SELECT - ( + tab1.col0 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT tab0.col1 + 98 FROM tab0 GROUP BY tab0.col1
----
179
98

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

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 77 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
77
77
77

query I rowsort
SELECT ALL - 51 AS col0 FROM tab0 GROUP BY tab0.col0
----
-51
-51
-51

query I rowsort
SELECT ALL 20 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
20
20

query I rowsort
SELECT ALL - tab0.col1 AS col0 FROM tab0 WHERE NULL IS NOT NULL GROUP BY tab0.col1
----

query I rowsort
SELECT - cor0.col1 + - col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-114
-12
-88

query I rowsort
SELECT DISTINCT - 37 + + 84 FROM tab0 GROUP BY tab0.col0
----
47

query I rowsort
SELECT + 14 + col2 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
1458
590
6255

query I rowsort
SELECT ALL COALESCE ( + 93, cor0.col2 + + cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
93
93
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col2 * cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1406
-552
-6162

query I rowsort
SELECT - 39 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-39
-39
-39

query I rowsort
SELECT + 7 AS col1 FROM tab1 GROUP BY tab1.col2
----
7
7
7

query I rowsort
SELECT ALL - 83 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-83
-83
-83

query I rowsort
SELECT + col1 * + 71 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3124
4047
426

onlyif mysql # DIV for integer division: 
query I rowsort label-2933
SELECT col0 DIV - cor0.col0 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
21
27
81

skipif mysql # not compatible
query I rowsort label-2933
SELECT col0 / - cor0.col0 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
21
27
81

query I rowsort
SELECT DISTINCT 36 FROM tab0 GROUP BY tab0.col0
----
36

query I rowsort
SELECT ALL tab2.col1 * ( + tab2.col1 - - tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
3362
6962
7442

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col2 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT + tab0.col2 * tab0.col2 + + 58 FROM tab0 GROUP BY tab0.col2
----
1502
6299
634

query I rowsort
SELECT - 9 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-9
-9
-9

query I rowsort
SELECT + tab0.col1 * - 60 FROM tab0 GROUP BY tab0.col1
----
-4860
0

query I rowsort
SELECT DISTINCT cor0.col2 * + 90 + + 21 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
7152
8145
9021

query I rowsort
SELECT 77 AS col0 FROM tab2 cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT tab1.col2 AS col0 FROM tab1 GROUP BY col2 HAVING - col2 NOT BETWEEN ( NULL ) AND col2
----

query I rowsort
SELECT + - 54 FROM tab2 GROUP BY col2
----
-54
-54
-54

query I rowsort
SELECT ALL - 35 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-35
-35
-35

query I rowsort
SELECT DISTINCT 29 - - cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
70
88
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 19 col0 FROM tab0 GROUP BY tab0.col1
----
-19
-19

query I rowsort
SELECT ALL 42 FROM tab2 cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT ALL - tab2.col0 - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING + col1 IS NULL
----

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-46
32
51

query I rowsort
SELECT DISTINCT + cor0.col0 * + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
1032
2054
3154

query I rowsort
SELECT DISTINCT + 97 FROM tab1 AS cor0 GROUP BY cor0.col0
----
97

query I rowsort
SELECT - cor0.col1 - + 95 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-136
-154
-156

query I rowsort
SELECT DISTINCT 98 FROM tab0 AS cor0 GROUP BY cor0.col2
----
98

query I rowsort
SELECT DISTINCT - 28 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-28

onlyif mysql # DIV for integer division: 
query I rowsort label-2956
SELECT + 24 DIV + cor0.col0 + - 80 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-80
-80
-80

skipif mysql # not compatible
query I rowsort label-2956
SELECT + 24 / + cor0.col0 + - 80 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-80
-80
-80

query I rowsort
SELECT DISTINCT 94 FROM tab0 GROUP BY tab0.col2
----
94

query I rowsort
SELECT ALL - + 9 FROM tab2 GROUP BY tab2.col1
----
-9
-9
-9

query I rowsort
SELECT - cor0.col1 + - 88 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-169
-88
-88

query I rowsort
SELECT ALL - 22 + - 1 FROM tab1 GROUP BY tab1.col1
----
-23
-23
-23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 83 * - 4 col2 FROM tab0 GROUP BY tab0.col0
----
-332
-332
-332

query I rowsort
SELECT ALL + 61 * - tab1.col2 + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2790
-4402
-496

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0

query I rowsort
SELECT 31 FROM tab2 AS cor0 GROUP BY col0
----
31
31
31

query I rowsort
SELECT + cor0.col1 - cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
0

query I rowsort
SELECT + col0 + tab1.col0 * tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
506
6806
812

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT 54 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
54
54
54

query I rowsort
SELECT DISTINCT 19 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
19

query I rowsort
SELECT ALL 71 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
109
150
95

query I rowsort
SELECT ALL 29 FROM tab0 GROUP BY tab0.col1
----
29
29

query I rowsort
SELECT DISTINCT - 85 FROM tab2 GROUP BY tab2.col2
----
-85

query I rowsort
SELECT cor0.col1 * + 19 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1121
1159
779

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 47 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 76 + - cor0.col2 * + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1368
-500
-6165

query I rowsort
SELECT - 9 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-9
-9
-9

query I rowsort
SELECT - cor0.col1 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
-2378
-4661
-5307

query I rowsort
SELECT tab1.col2 * - 2 FROM tab1 GROUP BY tab1.col2
----
-142
-16
-90

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - 35, cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-35

query I rowsort
SELECT DISTINCT - ( 6 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-6

query I rowsort
SELECT ALL - cor0.col0 * 92 FROM tab2 cor0 GROUP BY cor0.col0
----
-1380
-8372
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col2 + + tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT DISTINCT + 1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) * - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL + + 41 FROM tab0 GROUP BY col2
----
41
41
41

query I rowsort
SELECT ALL - 69 * + 5 + - col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-369
-383
-424

query I rowsort
SELECT ALL 41 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
41
41
41

query I rowsort
SELECT ALL 56 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 39 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
39
39
39

query I rowsort
SELECT DISTINCT + 22 FROM tab0 AS cor0 GROUP BY cor0.col1
----
22

query I rowsort
SELECT DISTINCT + cor0.col0 + col0 * + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
506
6806
812

query I rowsort
SELECT + 26 FROM tab1 cor0 GROUP BY cor0.col0
----
26
26
26

query I rowsort
SELECT DISTINCT CASE - col2 WHEN - cor0.col2 THEN cor0.col2 ELSE NULL END AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + + 76 FROM tab0 GROUP BY tab0.col2
----
76

query I rowsort
SELECT ALL - 65 AS col2 FROM tab1 GROUP BY col1
----
-65
-65
-65

query I rowsort
SELECT + 77 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
2002
3311
6391

query I rowsort
SELECT - cor0.col2 + cor0.col2 * 25 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1080
1704
192

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2999
SELECT + CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2999
SELECT + CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3000
SELECT DISTINCT - CAST( 68 AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
-68

skipif mysql # not compatible
query I rowsort label-3000
SELECT DISTINCT - CAST ( 68 AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
-68

query I rowsort
SELECT DISTINCT + 20 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20

query I rowsort
SELECT + 57 * 25 AS col1 FROM tab2 GROUP BY tab2.col0
----
1425
1425
1425

query I rowsort
SELECT ALL NULLIF ( tab1.col0, 70 ) AS col2 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 51 col1 FROM tab1 GROUP BY tab1.col2
----
51
51
51

query I rowsort
SELECT + cor1.col2 AS col1 FROM tab0 cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT ALL tab2.col1 + tab2.col1 * 58 FROM tab2 GROUP BY tab2.col1
----
2419
3481
3599

query I rowsort
SELECT - tab1.col0 * - 10 FROM tab1 GROUP BY tab1.col0
----
220
280
820

query I rowsort
SELECT DISTINCT 82 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
82

query I rowsort
SELECT cor0.col0 + - col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL + col0 * + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 * + tab2.col0 + tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
-210
-8190
-8372

query I rowsort
SELECT + + 0 + + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 32 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
32

query I rowsort
SELECT ALL - 51 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-51
-51
-51

onlyif mysql # DIV for integer division: 
query I rowsort label-3015
SELECT ALL col0 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3015
SELECT ALL col0 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT 11 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
11

onlyif mysql # DIV for integer division: 
query I rowsort label-3017
SELECT - col1 DIV - 18 - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-39
-56
-58

skipif mysql # not compatible
query I rowsort label-3017
SELECT - col1 / - 18 - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-39
-56
-58

onlyif mysql # DIV for integer division: 
query I rowsort label-3018
SELECT - 20 DIV 64 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3018
SELECT - 20 / 64 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT 54 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT DISTINCT cor0.col1 - - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT col1 * 68 AS col1 FROM tab2 GROUP BY tab2.col1
----
2788
4012
4148

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( - 93, cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col2
----
-93
-93
-93

query I rowsort
SELECT 59 + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, col2
----
104
130
67

query I rowsort
SELECT - tab2.col0 * + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT - 18 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-18
-18
-18

query I rowsort
SELECT ALL tab2.col1 - 48 AS col0 FROM tab2 GROUP BY col1
----
-7
11
13

query I rowsort
SELECT ALL + 92 * - col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-2208
-3496
-7268

query I rowsort
SELECT DISTINCT tab0.col1 * + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT DISTINCT 79 AS col2 FROM tab0 GROUP BY tab0.col0
----
79

query I rowsort
SELECT DISTINCT - 65 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-65

query I rowsort
SELECT ( + 49 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
49
49
49

query I rowsort
SELECT ALL + - 65 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1560
2470
5135

query I rowsort
SELECT DISTINCT tab1.col0 + - col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT 87 FROM tab0 AS cor0 GROUP BY cor0.col1
----
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 84 * + tab1.col0 col0 FROM tab1 GROUP BY col0
----
1848
2352
6888

query I rowsort
SELECT - 25 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-19
19
32

query I rowsort
SELECT ALL - 0 AS col0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
3483

query I rowsort
SELECT col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
2
2
2

query I rowsort
SELECT ALL - cor0.col0 * cor0.col2 AS col1 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 + - 8 col1 FROM tab1 GROUP BY tab1.col1
----
-8
-8
-8

query I rowsort
SELECT ALL + 29 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1276
1653
174

query I rowsort
SELECT ( + 0 ) FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 44 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 52 col1 FROM tab2 GROUP BY tab2.col1
----
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - cor0.col1 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - ( - 9 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
9
9
9

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 + ( - 6 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-6
-6
-6

query I rowsort
SELECT ALL 17 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-27
-40
11

query I rowsort
SELECT DISTINCT - 11 + col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
32
72

query I rowsort
SELECT tab1.col0 - tab1.col0 FROM tab1 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL 4 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
4
4
4

onlyif mysql # DIV for integer division: 
query I rowsort label-3055
SELECT - ( tab1.col1 ) + - tab1.col1 DIV tab1.col1 FROM tab1 GROUP BY col1
----
-45
-58
-7

skipif mysql # not compatible
query I rowsort label-3055
SELECT - ( tab1.col1 ) + - tab1.col1 / tab1.col1 FROM tab1 GROUP BY col1
----
-45
-58
-7

onlyif mysql # DIV for integer division: 
query I rowsort label-3056
SELECT - 14 DIV + cor0.col1 + + 32 FROM tab1 cor0 GROUP BY cor0.col1
----
30
32
32

skipif mysql # not compatible
query I rowsort label-3056
SELECT - 14 / + cor0.col1 + + 32 FROM tab1 cor0 GROUP BY cor0.col1
----
30
32
32

onlyif mysql # DIV for integer division: 
query I rowsort label-3057
SELECT tab2.col0 DIV tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3057
SELECT tab2.col0 / tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT ALL + tab0.col1 * + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
6561

onlyif mysql # DIV for integer division: 
query I rowsort label-3059
SELECT + cor0.col0 DIV cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3059
SELECT + cor0.col0 / cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
1
1
1

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 cor1.col0 + + ( 65 ) col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col0
----
147
87
93

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3063
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3063
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT cor0.col2 * + 95 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4275
6745
760

onlyif mysql # DIV for integer division: 
query I rowsort label-3065
SELECT - col2 DIV + 59 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3065
SELECT - col2 / + 59 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
0
0

query I rowsort
SELECT DISTINCT 54 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
54

query I rowsort
SELECT + 71 AS col0 FROM tab2 GROUP BY tab2.col1
----
71
71
71

query I rowsort
SELECT DISTINCT - 60 * + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1320
-1680
-4920

query I rowsort
SELECT ALL 76 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
76
76
76

query I rowsort
SELECT 21 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
21
21
21

query I rowsort
SELECT ALL + + tab1.col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT ALL cor0.col0 * col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
225
8281
8464

query I rowsort
SELECT + - tab2.col2 + 35 FROM tab2 GROUP BY tab2.col2
----
-23
-44
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 37 * + 99 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-3663

query I rowsort
SELECT - 84 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
-84
-84
-84

query I rowsort
SELECT DISTINCT - ( + 23 ) - - 20 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3

onlyif mysql # DIV for integer division: 
query I rowsort label-3078
SELECT ALL + cor0.col0 DIV 56 + + 26 FROM tab2 AS cor0 GROUP BY cor0.col0
----
26
27
27

skipif mysql # not compatible
query I rowsort label-3078
SELECT ALL + cor0.col0 / 56 + + 26 FROM tab2 AS cor0 GROUP BY cor0.col0
----
26
27
27

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3079
SELECT ALL - CAST( 37 AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-37
-37
-37

skipif mysql # not compatible
query I rowsort label-3079
SELECT ALL - CAST ( 37 AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-37
-37
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col1 * tab2.col1 col0 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT tab2.col2 * - 35 FROM tab2 GROUP BY tab2.col2
----
-2030
-2765
-3045

query I rowsort
SELECT ALL - 69 AS col2 FROM tab1 GROUP BY col1
----
-69
-69
-69

query I rowsort
SELECT DISTINCT col2 * cor0.col2 + - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
1980
4970
56

query I rowsort
SELECT ALL + 10 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
10
10
10

query I rowsort
SELECT - cor0.col2 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-116
-158
-174

query I rowsort
SELECT - 69 AS col2 FROM tab0 GROUP BY tab0.col1
----
-69
-69

query I rowsort
SELECT - 42 FROM tab1 GROUP BY tab1.col1
----
-42
-42
-42

query I rowsort
SELECT DISTINCT + 64 FROM tab0 AS cor0 GROUP BY cor0.col0
----
64

query I rowsort
SELECT DISTINCT 20 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
20

onlyif mysql # DIV for integer division: 
query I rowsort label-3090
SELECT 39 + 8 DIV + 53 AS col1 FROM tab0 GROUP BY tab0.col0
----
39
39
39

skipif mysql # not compatible
query I rowsort label-3090
SELECT 39 + 8 / + 53 AS col1 FROM tab0 GROUP BY tab0.col0
----
39
39
39

query I rowsort
SELECT + 76 FROM tab0 GROUP BY col2
----
76
76
76

query I rowsort
SELECT ALL 94 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
94
94
94

query I rowsort
SELECT ALL - 80 * + 12 AS col0 FROM tab2 GROUP BY col2
----
-960
-960
-960

query I rowsort
SELECT DISTINCT - tab0.col1 AS col1 FROM tab0 WHERE NOT NULL IS NOT NULL GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL tab0.col0 * 33 AS col1 FROM tab0 GROUP BY tab0.col0
----
1419
2739
858

query I rowsort
SELECT 3 - 80 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-77
-77
-77

query I rowsort
SELECT DISTINCT ( cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 50 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
50
50

onlyif mysql # DIV for integer division: 
query I rowsort label-3100
SELECT DISTINCT 53 DIV + cor0.col0 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
24
29
82

skipif mysql # not compatible
query I rowsort label-3100
SELECT DISTINCT 53 / + cor0.col0 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
24
29
82

query I rowsort
SELECT + 32 FROM tab0 GROUP BY tab0.col0
----
32
32
32

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL tab2.col2 + 59 FROM tab2 GROUP BY tab2.col2
----
117
138
146

query I rowsort
SELECT DISTINCT - 71 + cor0.col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-28
-45
12

query I rowsort
SELECT + cor1.col1 - cor0.col1 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor0.col1
----
-41
-59
-61
20
22
40

query I rowsort
SELECT - 85 * 82 + - cor0.col1 FROM tab1 cor0 GROUP BY col1
----
-6976
-7014
-7027

query I rowsort
SELECT ALL + - 65 - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-123
-144
-152

query I rowsort
SELECT - 77 FROM tab2 GROUP BY col0
----
-77
-77
-77

query I rowsort
SELECT ALL - 96 - - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-35
-37
-55

query I rowsort
SELECT ALL 19 FROM tab1 GROUP BY tab1.col1
----
19
19
19

query I rowsort
SELECT + + 77 FROM tab1 GROUP BY tab1.col1
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 + tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 75 col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
75

query I rowsort
SELECT DISTINCT + - 11 * col2 FROM tab2 GROUP BY tab2.col2
----
-638
-869
-957

onlyif mysql # DIV for integer division: 
query I rowsort label-3115
SELECT cor0.col2 DIV 45 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3115
SELECT cor0.col2 / 45 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
1
1

query I rowsort
SELECT + - 95 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-2280
-3610
-7505

query I rowsort
SELECT ALL - 17 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-17
-17
-17

query I rowsort
SELECT ALL 38 FROM tab0 GROUP BY tab0.col2
----
38
38
38

onlyif mysql # DIV for integer division: 
query I rowsort label-3119
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-3119
SELECT ALL - tab0.col0 / + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL - col1 + + 38 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1599
-2301
-2379

query I rowsort
SELECT + tab1.col1 + + col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT + - tab1.col1 * 44 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1936
-2508
-264

onlyif mysql # DIV for integer division: 
query I rowsort label-3123
SELECT + 14 DIV COALESCE ( 62, tab0.col0 + - tab0.col2, tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3123
SELECT + 14 / COALESCE ( 62, tab0.col0 + - tab0.col2, tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT + 18 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
18
18
18

query I rowsort
SELECT ALL - 89 + + 69 FROM tab2 cor0 GROUP BY col1, cor0.col0
----
-20
-20
-20

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3126
SELECT DISTINCT - + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3126
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-3127
SELECT ALL + COALESCE ( + 80, - cor0.col2 - - cor0.col1 * + cor0.col1 ) DIV + 28 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2
2
2

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3127
SELECT ALL + COALESCE ( + 80, - cor0.col2 - - cor0.col1 * + cor0.col1 ) / + 28 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2
2
2

query I rowsort
SELECT ALL - 30 FROM tab0 GROUP BY tab0.col2
----
-30
-30
-30

query I rowsort
SELECT ALL 51 FROM tab2 GROUP BY tab2.col2
----
51
51
51

query I rowsort
SELECT + + 39 FROM tab1 GROUP BY col2
----
39
39
39

query I rowsort
SELECT DISTINCT + 12 FROM tab1 GROUP BY tab1.col1
----
12

onlyif mysql # DIV for integer division: 
query I rowsort label-3132
SELECT + cor0.col0 + + 12 DIV + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
24
28
82

skipif mysql # not compatible
query I rowsort label-3132
SELECT + cor0.col0 + + 12 / + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
24
28
82

query I rowsort
SELECT ALL - 39 * + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1716
-2223
-234

query I rowsort
SELECT + - 12 FROM tab0 GROUP BY tab0.col1
----
-12
-12

query I rowsort
SELECT DISTINCT 64 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
64

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 43 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
43

query I rowsort
SELECT 13 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1079
338
559

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 * + 31 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
2592

query I rowsort
SELECT DISTINCT + 7 * col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
154
196
574

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3141
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-3141
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT NULLIF ( + cor0.col1, col0 ) + 19 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
25
63
76

query I rowsort
SELECT DISTINCT + + 8 AS col2 FROM tab2 GROUP BY tab2.col2
----
8

query I rowsort
SELECT ALL - 65 FROM tab1 GROUP BY tab1.col2
----
-65
-65
-65

query I rowsort
SELECT + 71 FROM tab1 AS cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT + 26 + + ( 96 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
122
122
122

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3147
SELECT ALL - CAST( NULL AS SIGNED ) + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3147
SELECT ALL - CAST ( NULL AS INTEGER ) + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 28 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
28
28
28

query I rowsort
SELECT DISTINCT + col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NULL
----
58
79
87

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - 21 * 63 FROM tab0 GROUP BY tab0.col1
----
-1323
-1323

query I rowsort
SELECT DISTINCT - + 8 FROM tab1 GROUP BY tab1.col1
----
-8

query I rowsort
SELECT - 60 * tab1.col0 FROM tab1 GROUP BY col0
----
-1320
-1680
-4920

query I rowsort
SELECT ( cor0.col0 ) AS 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 7 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT DISTINCT 79 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
79

query I rowsort
SELECT + 79 * 25 AS col2 FROM tab2 GROUP BY tab2.col2
----
1975
1975
1975

query I rowsort
SELECT - + 68 FROM tab2 GROUP BY tab2.col2
----
-68
-68
-68

onlyif mysql # DIV for integer division: 
query I rowsort label-3159
SELECT + 88 DIV tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1
14
2

skipif mysql # not compatible
query I rowsort label-3159
SELECT + 88 / tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1
14
2

query I rowsort
SELECT - CASE cor0.col2 WHEN - 5 - + cor0.col0 THEN + cor0.col2 ELSE NULL END + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 68 - - 95 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
4112
502
5347

query I rowsort
SELECT 82 FROM tab0 cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT - 23 * 6 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-138
-138
-138

query I rowsort
SELECT ALL + ( cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + + tab2.col2 * + col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT cor0.col0 * cor0.col0 + col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1892
6972
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 71 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT + 62 + 22 FROM tab2 GROUP BY col0
----
84
84
84

query I rowsort
SELECT ALL cor0.col1 + 9 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
53
66

query I rowsort
SELECT + 75 AS col0 FROM tab1 GROUP BY tab1.col0
----
75
75
75

query I rowsort
SELECT - col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-81
0
0

query I rowsort
SELECT ALL 38 FROM tab2 AS cor0 GROUP BY col2, col2
----
38
38
38

query I rowsort
SELECT + - 46 FROM tab1 GROUP BY tab1.col1
----
-46
-46
-46

query I rowsort
SELECT + - NULLIF ( tab0.col0, + 81 ) AS col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
56
56

onlyif mysql # DIV for integer division: 
query I rowsort label-3176
SELECT DISTINCT - + 53 DIV - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-3176
SELECT DISTINCT - + 53 / - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
1
2

query I rowsort
SELECT DISTINCT 48 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2, col2
----
48

query I rowsort
SELECT ALL 61 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
61
61
61

query I rowsort
SELECT - 29 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-29
-29
-29

query I rowsort
SELECT + cor0.col2 + 36 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
115
60
74

onlyif mysql # DIV for integer division: 
query I rowsort label-3181
SELECT + + 21 DIV 6 FROM tab1 GROUP BY tab1.col2
----
3
3
3

skipif mysql # not compatible
query I rowsort label-3181
SELECT + + 21 / 6 FROM tab1 GROUP BY tab1.col2
----
3
3
3

query I rowsort
SELECT ALL + + 97 FROM tab0 GROUP BY col0
----
97
97
97

query I rowsort
SELECT DISTINCT 73 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
73

query I rowsort
SELECT DISTINCT 47 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
47

query I rowsort
SELECT 14 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
14
14
14

onlyif mysql # DIV for integer division: 
query I rowsort label-3186
SELECT + - 24 DIV + tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3186
SELECT + - 24 / + tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL - ( 16 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-16
-16
-16

query I rowsort
SELECT DISTINCT 30 FROM tab2 GROUP BY tab2.col1
----
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 63 col2 FROM tab1 GROUP BY tab1.col0
----
63
63
63

query I rowsort
SELECT - 43 FROM tab1 GROUP BY col1
----
-43
-43
-43

query I rowsort
SELECT - 62 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-62
-62
-62

query I rowsort
SELECT cor0.col1 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-38
-79
57

query I rowsort
SELECT cor0.col1 + 20 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
26
64
77

query I rowsort
SELECT + + 15 FROM tab0 GROUP BY tab0.col0
----
15
15
15

query I rowsort
SELECT - 80 AS col1 FROM tab2 GROUP BY tab2.col0
----
-80
-80
-80

onlyif mysql # DIV for integer division: 
query I rowsort label-3196
SELECT - cor0.col0 DIV + 53 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3196
SELECT - cor0.col0 / + 53 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-1
0
0

query I rowsort
SELECT DISTINCT ( - 65 ) * + col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2925
-4615
-520

query I rowsort
SELECT - tab1.col2 + ( 94 ) AS col0 FROM tab1 GROUP BY tab1.col2
----
23
49
86

query I rowsort
SELECT - - col0 + + tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
164
44
56

query I rowsort
SELECT DISTINCT - 46 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-46

query I rowsort
SELECT DISTINCT 95 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
95

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( - 69, + cor0.col0 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
69
69
69

query I rowsort
SELECT DISTINCT 33 AS col0 FROM tab1 GROUP BY tab1.col1
----
33

query I rowsort
SELECT ALL - + col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT 46 FROM tab0 GROUP BY tab0.col0
----
46
46
46

query I rowsort
SELECT 56 * - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-5096
-5152
-840

query I rowsort
SELECT col0 * 22 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1826
572
946

query I rowsort
SELECT DISTINCT col2 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-3364
-6241
-7569

query I rowsort
SELECT + 36 AS col0 FROM tab0 GROUP BY tab0.col2
----
36
36
36

query I rowsort
SELECT - 55 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-55
-55
-55

onlyif mysql # DIV for integer division: 
query I rowsort label-3211
SELECT + 60 DIV - 10 - - 36 FROM tab1 AS cor0 GROUP BY cor0.col0
----
30
30
30

skipif mysql # not compatible
query I rowsort label-3211
SELECT + 60 / - 10 - - 36 FROM tab1 AS cor0 GROUP BY cor0.col0
----
30
30
30

query I rowsort
SELECT DISTINCT + cor0.col2 + + cor0.col1 * + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
38
6585
79

query I rowsort
SELECT + 56 + + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
135
80
94

query I rowsort
SELECT ALL + 22 FROM tab1 AS cor0 GROUP BY cor0.col1
----
22
22
22

query I rowsort
SELECT + 7 * + 31 FROM tab0 AS cor0 GROUP BY cor0.col1
----
217
217

query I rowsort
SELECT cor1.col0 AS col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-3217
SELECT ALL 55 DIV 91 FROM tab0 AS cor0 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3217
SELECT ALL 55 / 91 FROM tab0 AS cor0 GROUP BY col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3218
SELECT DISTINCT 65 + COALESCE ( cor0.col2, - cor0.col2 DIV + cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
110
136
73

skipif mysql # not compatible
query I rowsort label-3218
SELECT DISTINCT 65 + COALESCE ( cor0.col2, - cor0.col2 / + cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
110
136
73

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT + + tab1.col0 - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3221
SELECT + COALESCE ( 14, cor0.col0 DIV cor0.col1 ) + 65 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
79
79
79

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3221
SELECT + COALESCE ( 14, cor0.col0 / cor0.col1 ) + 65 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
79
79
79

query I rowsort
SELECT DISTINCT - 75 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, col2
----
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 10 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
10

query I rowsort
SELECT DISTINCT 4 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
4

query I rowsort
SELECT - 24 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-24
-24
-24

query I rowsort
SELECT DISTINCT + + 31 FROM tab2 GROUP BY tab2.col1
----
31

query I rowsort
SELECT ALL + col2 * tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT - tab1.col1 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + 23 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
1863

query I rowsort
SELECT + 30 AS col1 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 + 71 * cor0.col1 - - cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3206
4075
448

query I rowsort
SELECT - 61 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
-23
-37
18

query I rowsort
SELECT 6 * + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
144
228
474

query I rowsort
SELECT - - COALESCE ( - 10, - 27 ) FROM tab1 GROUP BY tab1.col1
----
-10
-10
-10

query I rowsort
SELECT + 60 FROM tab0 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT DISTINCT 65 FROM tab0 AS cor0 GROUP BY col2
----
65

query I rowsort
SELECT ALL 18 FROM tab0 AS cor0 GROUP BY cor0.col0
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 29 + + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
108
53
67

query I rowsort
SELECT + col0 + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 72 col0 FROM tab1 GROUP BY tab1.col2
----
72

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-6561
0
0

query I rowsort
SELECT + cor0.col2 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
102
115
14

query I rowsort
SELECT DISTINCT 23 * 67 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1541

query I rowsort
SELECT - 49 * + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1274
-2107
-4067

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col1 + - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT 64 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
64
64
64

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col2, col1
----
44
57
6

query I rowsort
SELECT ALL ( cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 53 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col2 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + 1 FROM tab2 cor0 GROUP BY col1
----
1
1
1

query I rowsort
SELECT - 48 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-48
-48

query I rowsort
SELECT ALL - ( 62 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
-62
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + 59 ) * - cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2596
3363
354

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - 76 * 48 FROM tab2 GROUP BY tab2.col1
----
-3648
-3648
-3648

query I rowsort
SELECT 62 FROM tab1 cor0 GROUP BY cor0.col0
----
62
62
62

query I rowsort
SELECT ALL NULLIF ( cor0.col0, - col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + CASE - 87 WHEN + cor0.col2 THEN cor0.col2 END FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + tab2.col0 + + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 7 col2 FROM tab2 GROUP BY tab2.col2
----
7
7
7

query I rowsort
SELECT DISTINCT + tab1.col1 AS col1 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - cor0.col2 * + 9 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
-360
-568
-64

query I rowsort
SELECT ALL - - 30 FROM tab1 GROUP BY col1
----
30
30
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 80 ) col2 FROM tab0 cor0 GROUP BY cor0.col1
----
80
80

query I rowsort
SELECT DISTINCT ( - 97 ) + - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
-112
-188
-189

query I rowsort
SELECT DISTINCT - cor0.col1 + - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-114
-12
-88

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3270
SELECT DISTINCT CAST( NULL AS SIGNED ) * 65 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3270
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 65 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT 94 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
94

query I rowsort
SELECT + 85 FROM tab2 GROUP BY col1
----
85
85
85

query I rowsort
SELECT ALL - cor0.col1 - col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-105
-38
-79

query I rowsort
SELECT - + 5 AS col2 FROM tab2 GROUP BY col1
----
-5
-5
-5

query I rowsort
SELECT + 27 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
35
72
98

query I rowsort
SELECT DISTINCT tab2.col1 + + tab2.col1 AS col2 FROM tab2 WHERE NOT ( NULL ) NOT BETWEEN ( NULL ) AND - tab2.col0 GROUP BY tab2.col1
----

query I rowsort
SELECT ALL + cor0.col1 * 72 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3168
4104
432

query I rowsort
SELECT ALL + 63 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
63
63
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col1 * + tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT + 43 * - 74 FROM tab2 GROUP BY tab2.col1
----
-3182

query I rowsort
SELECT DISTINCT - 98 FROM tab0 AS cor0 GROUP BY col1
----
-98

query I rowsort
SELECT ALL ( cor0.col1 ) * + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 58 * + tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
-4698
0

query I rowsort
SELECT - 24 AS col1 FROM tab1 GROUP BY tab1.col1
----
-24
-24
-24

query I rowsort
SELECT DISTINCT 2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
2

query I rowsort
SELECT ALL + 58 FROM tab2 AS cor0 GROUP BY col1
----
58
58
58

query I rowsort
SELECT cor0.col0 + + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col2 FROM tab1 AS cor0 WHERE ( col1 ) BETWEEN ( NULL ) AND NULL GROUP BY cor0.col0
----

query I rowsort
SELECT - 63 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-63
-63
-63

query I rowsort
SELECT + col1 * - col1 + - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1980
-3306
-42

query I rowsort
SELECT DISTINCT + col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-3292
SELECT cor0.col0 DIV cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3292
SELECT cor0.col0 / cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT ALL - 88 AS col2 FROM tab1 GROUP BY col1
----
-88
-88
-88

onlyif mysql # DIV for integer division: 
query I rowsort label-3294
SELECT ALL COALESCE ( - col1, cor0.col1 DIV 6 ) FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

skipif mysql # not compatible
query I rowsort label-3294
SELECT ALL COALESCE ( - col1, cor0.col1 / 6 ) FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + 39 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1014
1677
3237

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( - 91, + cor0.col2, cor0.col1 + + 51, col0 * cor0.col1 + col2 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT DISTINCT 60 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
60

query I rowsort
SELECT DISTINCT + 72 * + cor0.col2 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
1752
2774
5767

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT ALL - 86 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-86
-86
-86

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 + - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1623
3402
3634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 6 - + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-52
-73
-81

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
45
71
8

query I rowsort
SELECT DISTINCT - 61 FROM tab0 GROUP BY tab0.col2
----
-61

query I rowsort
SELECT 8 * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
464
632
696

query I rowsort
SELECT DISTINCT - 47 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-47

query I rowsort
SELECT 29 * 22 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
638
638
638

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 81 FROM tab1 cor0 GROUP BY cor0.col2
----
81

query I rowsort
SELECT ALL + cor0.col1 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
102
115
14

onlyif mysql # DIV for integer division: 
query I rowsort label-3311
SELECT - cor0.col2 DIV - 47 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3311
SELECT - cor0.col2 / - 47 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
1

query I rowsort
SELECT + 64 * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
5824
5888
960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 19 col1 FROM tab0 GROUP BY tab0.col0
----
-19
-19
-19

query I rowsort
SELECT ALL + 10 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
10
10
10

query I rowsort
SELECT 90 - + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
29
31
49

query I rowsort
SELECT - + 97 AS col1 FROM tab2 GROUP BY tab2.col2
----
-97
-97
-97

query I rowsort
SELECT ALL 58 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
58
58

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 * cor0.col0 + - 45 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-529
-6769
-829

query I rowsort
SELECT DISTINCT + tab0.col1 + - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0

query I rowsort
SELECT ALL 40 AS col0 FROM tab0 GROUP BY col1
----
40
40

query I rowsort
SELECT DISTINCT - 56 + - 33 FROM tab0 GROUP BY tab0.col1
----
-89

query I rowsort
SELECT - 11 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-11
-11
-11

query I rowsort
SELECT DISTINCT cor0.col2 * 89 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
4005
6319
712

query I rowsort
SELECT - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - - 96 FROM tab0 GROUP BY col0
----
96

query I rowsort
SELECT - 13 FROM tab2 GROUP BY tab2.col2
----
-13
-13
-13

query I rowsort
SELECT DISTINCT 21 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
21

query I rowsort
SELECT cor0.col2 * + 82 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4756
6478
7134

query I rowsort
SELECT - 32 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-32
-32
-32

query I rowsort
SELECT ALL + 76 FROM tab0 GROUP BY tab0.col1
----
76
76

query I rowsort
SELECT + - 33 FROM tab1 GROUP BY tab1.col1
----
-33
-33
-33

query I rowsort
SELECT 8 * + 99 AS col0 FROM tab2 GROUP BY tab2.col1
----
792
792
792

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1681
3481
3721

query I rowsort
SELECT cor0.col0 + + 85 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
111
128
168

query I rowsort
SELECT + - col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT - 91 AS col2 FROM tab2 GROUP BY col0
----
-91
-91
-91

query I rowsort
SELECT - 40 - + 34 AS col2 FROM tab1 GROUP BY tab1.col0
----
-74
-74
-74

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 40 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
40
40
40

query I rowsort
SELECT - - 28 FROM tab0 GROUP BY tab0.col2
----
28
28
28

query I rowsort
SELECT + 23 * - 4 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-92
-92
-92

query I rowsort
SELECT 32 + + 29 FROM tab1 GROUP BY tab1.col2
----
61
61
61

query I rowsort
SELECT - tab0.col2 * + 97 FROM tab0 GROUP BY tab0.col2
----
-2328
-3686
-7663

query I rowsort
SELECT ALL col2 * - 98 AS col1 FROM tab0 GROUP BY tab0.col2
----
-2352
-3724
-7742

query I rowsort
SELECT 2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
2
2

query I rowsort
SELECT - tab1.col0 * 31 FROM tab1 GROUP BY tab1.col0
----
-2542
-682
-868

onlyif mysql # DIV for integer division: 
query I rowsort label-3348
SELECT - cor0.col1 DIV cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3348
SELECT - cor0.col1 / cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-1
0
0

query I rowsort
SELECT col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - cor0.col1 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-114
-12
-88

query I rowsort
SELECT 47 * - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-2726
-3713
-4089

query I rowsort
SELECT DISTINCT - tab2.col0 * - 11 FROM tab2 GROUP BY col0
----
1001
1012
165

query I rowsort
SELECT DISTINCT - 36 * - cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor0.col2
----
1368
2844
864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 69 col2 FROM tab0 GROUP BY tab0.col0
----
69
69
69

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + tab0.col2 + 56 * COALESCE ( 96, tab0.col1 * + tab0.col2 + tab0.col2 * + tab0.col0 ) FROM tab0 GROUP BY tab0.col2
----
5400
5414
5455

query I rowsort
SELECT 44 AS col0 FROM tab2 GROUP BY col1
----
44
44
44

query I rowsort
SELECT 24 AS col0 FROM tab0 GROUP BY col1
----
24
24

query I rowsort
SELECT - + tab1.col2 - - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL + 91 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2002
2548
7462

query I rowsort
SELECT - 27 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-27
-27
-27

query I rowsort
SELECT ALL + 25 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT cor0.col0 * 98 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2548
4214
8134

query I rowsort
SELECT ALL 38 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
38
38

query I rowsort
SELECT DISTINCT - 60 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-60

query I rowsort
SELECT + + 39 * 0 AS col0 FROM tab2 GROUP BY col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3368
SELECT DISTINCT col2 DIV - 31 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-3368
SELECT DISTINCT col2 / - 31 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-2
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3369
SELECT + col1 + tab0.col1 DIV 25 FROM tab0 GROUP BY col1
----
0
84

skipif mysql # not compatible
query I rowsort label-3369
SELECT + col1 + tab0.col1 / 25 FROM tab0 GROUP BY col1
----
0
84

query I rowsort
SELECT - NULLIF ( - cor0.col0, + cor0.col0 ) FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-3371
SELECT ALL 70 DIV 99 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3371
SELECT ALL 70 / 99 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2 cor0 CROSS JOIN tab1 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT 49 FROM tab0 AS cor0 GROUP BY col1
----
49
49

query I rowsort
SELECT 93 FROM tab1 cor0 GROUP BY col0
----
93
93
93

query I rowsort
SELECT ALL - - col1 AS col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL - 35 * - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
3185
3220
525

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 * col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT ALL - 8 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-8
-8
-8

query I rowsort
SELECT + - 74 AS col0 FROM tab0 GROUP BY tab0.col2
----
-74
-74
-74

query I rowsort
SELECT ALL 84 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
142
163
171

query I rowsort
SELECT + + ( tab1.col1 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-3383
SELECT - - tab2.col0 DIV tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3383
SELECT - - tab2.col0 / tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - 56, - cor0.col1, col2 * - cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 * + 53 col0 FROM tab2 GROUP BY tab2.col0
----
-4823
-4876
-795

query I rowsort
SELECT - col0 * 25 FROM tab0 GROUP BY col0
----
-1075
-2075
-650

query I rowsort
SELECT DISTINCT col1 - - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT DISTINCT - - 89 * 77 AS col2 FROM tab0 GROUP BY tab0.col0
----
6853

query I rowsort
SELECT DISTINCT - 81 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-81

query I rowsort
SELECT cor0.col0 - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT 33 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, col0
----
33
33
33

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 AS cor0 GROUP BY col0, col2
----
-24
-38
-79

query I rowsort
SELECT + ( cor0.col0 ) * - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
-1305
-5336
-7189

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( cor0.col2 ) * cor0.col2 col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
3364
6241
7569

query I rowsort
SELECT ALL 75 * NULLIF ( - col0, + 94 ) AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-1650
-2100
-6150

query I rowsort
SELECT - cor1.col2 * - 80 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
4640
6320
6960

query I rowsort
SELECT - 56 FROM tab2 GROUP BY tab2.col2
----
-56
-56
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor0.col0
----
9 values hashing to f32c20d5ee6a5d0dbf41b03dd82c0edd

query I rowsort
SELECT + 47 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
47
47
47

query I rowsort
SELECT + 11 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
11
11
11

query I rowsort
SELECT 8 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT 6 FROM tab2 GROUP BY col1
----
6
6
6

query I rowsort
SELECT ALL - tab1.col1 + + col1 * - tab1.col1 FROM tab1 WHERE NOT ( tab1.col0 ) IS NOT NULL GROUP BY tab1.col1
----

query I rowsort
SELECT + tab0.col2 * + tab0.col2 FROM tab0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT ALL col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT 64 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
64
64
64

query I rowsort
SELECT + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT cor0.col2 * + 74 FROM tab1 AS cor0 GROUP BY col2
----
3330
5254
592

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT + - 7 FROM tab0 GROUP BY tab0.col0
----
-7
-7
-7

query I rowsort
SELECT DISTINCT - 12 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-12

query I rowsort
SELECT + + col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT 0 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT + tab2.col0 AS col1 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col2 ) col1 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 40 col0 FROM tab2 GROUP BY tab2.col2
----
40
40
40

query I rowsort
SELECT ALL col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT cor0.col1 + cor0.col1 * + NULLIF ( + 96 + cor0.col1, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
618
6204
8778

query I rowsort
SELECT ALL + 50 AS col1 FROM tab2 GROUP BY col2
----
50
50
50

query I rowsort
SELECT - + 70 AS col2 FROM tab2 GROUP BY tab2.col1
----
-70
-70
-70

query I rowsort
SELECT 83 FROM tab2 cor0 GROUP BY cor0.col1
----
83
83
83

query I rowsort
SELECT DISTINCT - tab1.col2 - 32 AS col1 FROM tab1 GROUP BY tab1.col2
----
-103
-40
-77

query I rowsort
SELECT DISTINCT + ( 11 ) FROM tab2 GROUP BY tab2.col1
----
11

query I rowsort
SELECT - tab2.col0 + 50 AS col2 FROM tab2 GROUP BY col0
----
-41
-42
35

onlyif mysql # DIV for integer division: 
query I rowsort label-3427
SELECT + cor0.col0 DIV cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3427
SELECT + cor0.col0 / cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
1
1
1

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT ALL 75 FROM tab1 cor0 GROUP BY col0
----
75
75
75

query I rowsort
SELECT NULLIF ( cor0.col2, cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 85 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
85
85
85

onlyif mysql # DIV for integer division: 
query I rowsort label-3432
SELECT - - 76 DIV + 75 FROM tab0 GROUP BY tab0.col1
----
1
1

skipif mysql # not compatible
query I rowsort label-3432
SELECT - - 76 / + 75 FROM tab0 GROUP BY tab0.col1
----
1
1

query I rowsort
SELECT ALL - NULLIF ( - 27, cor0.col1 * + cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
27
27
27

query I rowsort
SELECT - + 44 * - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1804
2596
2684

query I rowsort
SELECT DISTINCT + 76 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
76

query I rowsort
SELECT DISTINCT col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + + 57 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-24
57

onlyif mysql # DIV for integer division: 
query I rowsort label-3438
SELECT DISTINCT cor0.col2 DIV 39 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
1
2

skipif mysql # not compatible
query I rowsort label-3438
SELECT DISTINCT cor0.col2 / 39 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
1
2

query I rowsort
SELECT ALL + - 21 AS col0 FROM tab2 GROUP BY col1
----
-21
-21
-21

query I rowsort
SELECT 21 * cor0.col1 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
1006
1225
148

query I rowsort
SELECT ALL - col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT 97 FROM tab1 GROUP BY col1
----
97
97
97

query I rowsort
SELECT DISTINCT 66 FROM tab1 AS cor0 GROUP BY cor0.col2, col0, col0
----
66

query I rowsort
SELECT DISTINCT 6 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
6

onlyif mysql # DIV for integer division: 
query I rowsort label-3445
SELECT ALL 98 DIV + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
12
2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3445
SELECT ALL 98 / + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
12
2

query I rowsort
SELECT - cor0.col2 + - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-158
-48
-76

query I rowsort
SELECT DISTINCT 76 + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
157
76

query I rowsort
SELECT + 65 AS col0 FROM tab1 GROUP BY col1
----
65
65
65

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT + 24 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
24
24
24

query I rowsort
SELECT + 74 AS col2 FROM tab0 GROUP BY col1
----
74
74

query I rowsort
SELECT DISTINCT + 35 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
35

onlyif mysql # DIV for integer division: 
query I rowsort label-3453
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-3453
SELECT + cor0.col0 / - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-3454
SELECT + 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-3454
SELECT + col0 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT ( 71 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
71

onlyif mysql # DIV for integer division: 
query I rowsort label-3456
SELECT cor0.col2 - CASE cor0.col2 WHEN - cor0.col1 THEN + cor0.col2 DIV cor0.col2 ELSE cor0.col1 END FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
17
20
26

skipif mysql # not compatible
query I rowsort label-3456
SELECT cor0.col2 - CASE cor0.col2 WHEN - cor0.col1 THEN + cor0.col2 / cor0.col2 ELSE cor0.col1 END FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
17
20
26

query I rowsort
SELECT DISTINCT + tab2.col0 * 76 AS col1 FROM tab2 GROUP BY tab2.col0
----
1140
6916
6992

query I rowsort
SELECT col0 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT col1 - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 col0 FROM tab2 GROUP BY col1
----
-7
-7
-7

query I rowsort
SELECT + cor0.col1 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
45
71
8

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 + col1 * - tab0.col1 FROM tab0 WHERE NOT + col1 + + col2 IS NOT NULL GROUP BY tab0.col1
----

query I rowsort
SELECT ALL col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-3466
SELECT - 37 DIV tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3466
SELECT - 37 / tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
0
0

query I rowsort
SELECT 75 FROM tab0 GROUP BY tab0.col0
----
75
75
75

query I rowsort
SELECT 58 FROM tab1 GROUP BY tab1.col0
----
58
58
58

query I rowsort
SELECT 61 + + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
143
83
89

query I rowsort
SELECT ( cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 12 * cor0.col2 col0 FROM tab1 cor0 GROUP BY cor0.col2
----
540
852
96

query I rowsort
SELECT - 90 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-90
-90
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - 33 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-33
-33
-33

query I rowsort
SELECT DISTINCT - 93 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, col2
----
-93

query I rowsort
SELECT ALL 31 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-27
-48
-56

query I rowsort
SELECT + tab2.col1 * - col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL + cor0.col2 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
105
121
67

query I rowsort
SELECT DISTINCT - + 77 * - 36 AS col0 FROM tab0 GROUP BY tab0.col2
----
2772

query I rowsort
SELECT cor0.col0 * - 5 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-455
-460
-75

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 - cor1.col2 + 1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col1
----
9 values hashing to 621373b788074a571ef480fc7a23a246

query I rowsort
SELECT 27 * + 55 AS col1 FROM tab0 GROUP BY tab0.col2
----
1485
1485
1485

query I rowsort
SELECT DISTINCT 79 - col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2
79

query I rowsort
SELECT DISTINCT + 23 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT ALL 42 FROM tab0 cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT ALL + 42 AS col0 FROM tab0 GROUP BY col1
----
42
42

query I rowsort
SELECT DISTINCT cor0.col0 + - 46 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-20
-3
37

query I rowsort
SELECT + tab2.col0 + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT DISTINCT + + tab0.col2 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
6561

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT DISTINCT + 8 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
176
224
656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + + col0 col1 FROM tab0 AS cor0 GROUP BY col0, col2
----
166
52
86

query I rowsort
SELECT + 17 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
17
17
17

query I rowsort
SELECT ALL - 96 * + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-2304
-3648
-7584

query I rowsort
SELECT ALL 90 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
24
38
79

query I rowsort
SELECT ( - 72 ) FROM tab2 GROUP BY tab2.col0
----
-72
-72
-72

query I rowsort
SELECT - 3 AS col0 FROM tab0 GROUP BY tab0.col1
----
-3
-3

query I rowsort
SELECT DISTINCT 98 AS col2 FROM tab2 GROUP BY tab2.col0
----
98

query I rowsort
SELECT DISTINCT - 66 FROM tab1 GROUP BY tab1.col0
----
-66

query I rowsort
SELECT 22 FROM tab0 GROUP BY tab0.col0
----
22
22
22

query I rowsort
SELECT DISTINCT - 87 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3567
-5133
-5307

query I rowsort
SELECT DISTINCT 93 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
14
35
6

query I rowsort
SELECT 59 - - 5 FROM tab1 AS cor0 GROUP BY cor0.col2
----
64
64
64

query I rowsort
SELECT DISTINCT - + tab1.col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + 0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3510
SELECT DISTINCT cor0.col0 DIV + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-3510
SELECT DISTINCT cor0.col0 / + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * - 74 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1628
-2072
-6068

query I rowsort
SELECT 92 FROM tab2 AS cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT DISTINCT - - 72 AS col1 FROM tab0 GROUP BY tab0.col2
----
72

query I rowsort
SELECT 59 FROM tab1 GROUP BY tab1.col2
----
59
59
59

query I rowsort
SELECT DISTINCT tab2.col0 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT - 1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-1
-1

query I rowsort
SELECT - ( tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT + 32 FROM tab1 GROUP BY tab1.col0
----
32
32
32

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
182
184
30

query I rowsort
SELECT - ( + 41 ) * - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1845
2911
328

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 * cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1911
1932
315

query I rowsort
SELECT - 15 FROM tab1 GROUP BY col0
----
-15
-15
-15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col1 + + COALESCE ( 41, - col0, - tab1.col0 + + tab1.col2 ) col0 FROM tab1 GROUP BY col1
----
-16
-3
35

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 cor0.col2 - - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

query I rowsort
SELECT DISTINCT - + 19 * tab2.col1 + - 39 FROM tab2 GROUP BY tab2.col1
----
-1160
-1198
-818

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 45 col0 FROM tab1 AS cor0 GROUP BY col2
----
45
45
45

query I rowsort
SELECT + 40 * - cor0.col1 - - 89 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-151
-1671
-2191

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT 25 FROM tab2 GROUP BY col1
----
25
25
25

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3533
SELECT - 1 * tab0.col1 + - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3533
SELECT - 1 * tab0.col1 + - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT cor0.col1 + 76 FROM tab1 AS cor0 GROUP BY cor0.col1
----
120
133
82

query I rowsort
SELECT - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NULL
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-3536
SELECT ALL 68 DIV tab2.col0 FROM tab2 GROUP BY col0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-3536
SELECT ALL 68 / tab2.col0 FROM tab2 GROUP BY col0
----
0
0
4

query I rowsort
SELECT DISTINCT - 67 AS col0 FROM tab2 GROUP BY col1
----
-67

query I rowsort
SELECT ALL - 96 AS col1 FROM tab1 GROUP BY tab1.col0
----
-96
-96
-96

query I rowsort
SELECT 15 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
15
15

query I rowsort
SELECT DISTINCT - col1 * - cor0.col1 + col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1722
3540
3782

query I rowsort
SELECT ALL + cor0.col1 + 19 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
100
19

query I rowsort
SELECT 32 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1312
-1888
-1952

query I rowsort
SELECT DISTINCT 25 AS col1 FROM tab1 GROUP BY tab1.col0
----
25

query I rowsort
SELECT ALL + 36 FROM tab2 GROUP BY tab2.col0
----
36
36
36

query I rowsort
SELECT + COALESCE ( tab0.col2, - tab0.col2 * tab0.col2 - + 9 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT 17 AS col0 FROM tab1 GROUP BY tab1.col1
----
17
17
17

query I rowsort
SELECT 35 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
35
35
35

query I rowsort
SELECT ALL 66 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
66
66
66

query I rowsort
SELECT cor0.col2 + - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
17
20
26

query I rowsort
SELECT DISTINCT 67 + 85 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
152

query I rowsort
SELECT DISTINCT - 33 AS col0 FROM tab1 cor0 GROUP BY col2
----
-33

query I rowsort
SELECT - - tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT ALL + 67 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
67
67
67

query I rowsort
SELECT ALL - col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - 32 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-32

query I rowsort
SELECT 76 + - col0 * col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
-408
-6648
-708

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + - cor0.col1 col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-162
0

query I rowsort
SELECT DISTINCT + 75 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-16
-17
60

query I rowsort
SELECT - + COALESCE ( 91, - tab2.col2 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
-91
-91
-91

query I rowsort
SELECT cor0.col0 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
133
150
76

query I rowsort
SELECT DISTINCT cor0.col2 - - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
138
148
99

query I rowsort
SELECT + col0 - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT ALL + 32 FROM tab0 cor0 GROUP BY cor0.col1
----
32
32

onlyif mysql # DIV for integer division: 
query I rowsort label-3564
SELECT DISTINCT 5 DIV + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-3564
SELECT DISTINCT 5 / + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 10 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-10
-10
-10

query I rowsort
SELECT DISTINCT - 83 FROM tab0 GROUP BY col1
----
-83

query I rowsort
SELECT ALL col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
0
0
81

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-3570
SELECT ALL - cor0.col1 DIV 69 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3570
SELECT ALL - cor0.col1 / 69 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3571
SELECT DISTINCT + - tab2.col2 * + tab2.col2 + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-3571
SELECT DISTINCT + - tab2.col2 * + tab2.col2 + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
NULL

query I rowsort
SELECT - 17 AS col1 FROM tab0 GROUP BY tab0.col2
----
-17
-17
-17

query I rowsort
SELECT DISTINCT - 95 AS col1 FROM tab0 GROUP BY tab0.col1
----
-95

query I rowsort
SELECT ALL + 68 FROM tab2 AS cor0 GROUP BY cor0.col0
----
68
68
68

onlyif mysql # DIV for integer division: 
query I rowsort label-3575
SELECT - cor0.col2 DIV 79 FROM tab0 AS cor0 GROUP BY col2, col1, cor0.col1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3575
SELECT - cor0.col2 / 79 FROM tab0 AS cor0 GROUP BY col2, col1, cor0.col1
----
-1
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3576
SELECT DISTINCT cor0.col0 DIV + 15 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
6

skipif mysql # not compatible
query I rowsort label-3576
SELECT DISTINCT cor0.col0 / + 15 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
6

query I rowsort
SELECT - 0 AS col2 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT ALL + col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
118
122
82

query I rowsort
SELECT tab1.col1 + - col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ( 82 ) FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
82
82
82

query I rowsort
SELECT + 86 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
101
177
178

query I rowsort
SELECT + 52 FROM tab0 GROUP BY tab0.col1
----
52
52

query I rowsort
SELECT - 34 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-2754
0

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab1, tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT tab0.col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL - cor0.col1 * col1 - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY col1
----
-1722
-3540
-3782

query I rowsort
SELECT + 71 FROM tab2 AS cor0 GROUP BY col2
----
71
71
71

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3588
SELECT ALL + CAST( NULL AS SIGNED ) / 17 AS col2 FROM tab2 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3588
SELECT ALL + CAST ( NULL AS INTEGER ) / 17 AS col2 FROM tab2 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
132
1596
3608

query I rowsort
SELECT ALL cor0.col0 * - 39 - + col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-3640
-3680
-600

query I rowsort
SELECT ALL + 34 AS col0 FROM tab1 GROUP BY tab1.col0
----
34
34
34

query I rowsort
SELECT - + tab0.col2 * col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT 62 AS col0 FROM tab0 GROUP BY tab0.col1
----
62
62

query I rowsort
SELECT 54 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
54
54
54

query I rowsort
SELECT - + tab0.col0 + 95 AS col0 FROM tab0 GROUP BY tab0.col0
----
12
52
69

query I rowsort
SELECT ALL - - col1 * + 76 AS col2 FROM tab1 GROUP BY tab1.col1
----
3344
4332
456

query I rowsort
SELECT + NULLIF ( 16, + cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
16
16
16

query I rowsort
SELECT + cor0.col2 - 24 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-16
21
47

query I rowsort
SELECT DISTINCT tab1.col0 * 48 AS col0 FROM tab1 GROUP BY tab1.col0
----
1056
1344
3936

query I rowsort
SELECT DISTINCT - 61 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-61

query I rowsort
SELECT - cor0.col2 * - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - 2 FROM tab2 AS cor0 GROUP BY col2
----
-2
-2
-2

query I rowsort
SELECT ALL col0 AS col1 FROM tab1 GROUP BY col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-3605
SELECT ALL + - tab1.col2 - 69 DIV - 89 col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3605
SELECT ALL + - tab1.col2 - 69 / - 89 col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-3606
SELECT - tab2.col2 DIV - 91 FROM tab2 GROUP BY col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3606
SELECT - tab2.col2 / - 91 FROM tab2 GROUP BY col2
----
0
0
0

query I rowsort
SELECT ALL 93 AS col1 FROM tab2 GROUP BY tab2.col0
----
93
93
93

query I rowsort
SELECT DISTINCT + 82 FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
82

query I rowsort
SELECT cor0.col0 * 63 FROM tab1 AS cor0 GROUP BY col0
----
1386
1764
5166

onlyif mysql # DIV for integer division: 
query I rowsort label-3610
SELECT ALL + col2 DIV - tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
57
78
86

skipif mysql # not compatible
query I rowsort label-3610
SELECT ALL + col2 / - tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
57
78
86

query I rowsort
SELECT ALL cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT + 35 - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
114
122
93

query I rowsort
SELECT + cor0.col1 + + 13 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
19
57
70

query I rowsort
SELECT ALL cor0.col1 - - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3616
SELECT ALL col1 * CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3616
SELECT ALL col1 * CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 + - 27 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-21
17
30

query I rowsort
SELECT + tab0.col0 - 31 FROM tab0 GROUP BY tab0.col0
----
-5
12
52

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT + ( tab1.col2 ) AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT 71 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1846
3053
5893

onlyif mysql # DIV for integer division: 
query I rowsort label-3622
SELECT - + tab1.col1 DIV - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3622
SELECT - + tab1.col1 / - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT + col1 * + 85 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6966

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * 5 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
220
285
30

query I rowsort
SELECT ALL + 72 FROM tab2 AS cor0 GROUP BY cor0.col0
----
72
72
72

query I rowsort
SELECT cor0.col2 + cor0.col2 * 90 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
2184
3458
7189

query I rowsort
SELECT DISTINCT + tab0.col2 * - 78 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1872
-2964
-6162

query I rowsort
SELECT DISTINCT - tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL ( 1 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1
1
1

query I rowsort
SELECT tab2.col2 * 35 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
2088
2844
3132

query I rowsort
SELECT ALL + - tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3632
SELECT col1 DIV COALESCE ( - 34, - col1 * cor0.col2, cor0.col1, + cor0.col2 + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3632
SELECT col1 / COALESCE ( - 34, - col1 * cor0.col2, cor0.col1, + cor0.col2 + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2
0
0

query I rowsort
SELECT ALL + - tab0.col2 - 2 * 70 FROM tab0 GROUP BY tab0.col2
----
-164
-178
-219

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + 21 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
104
47
64

query I rowsort
SELECT DISTINCT + 8 FROM tab2 AS cor0 GROUP BY cor0.col1
----
8

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT + 41 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
3321

onlyif mysql # DIV for integer division: 
query I rowsort label-3638
SELECT ALL + cor0.col2 DIV col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3638
SELECT ALL + cor0.col2 / col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT 3 * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
273
276
45

query I rowsort
SELECT DISTINCT tab0.col1 + tab0.col1 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
6642

query I rowsort
SELECT + 97 * 7 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
679
679
679

query I rowsort
SELECT DISTINCT - 69 AS col2 FROM tab2 GROUP BY col0
----
-69

query I rowsort
SELECT - ( 62 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-62
-62
-62

query I rowsort
SELECT - 30 + - col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
195
8251
8434

query I rowsort
SELECT + 79 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
79
79
79

query I rowsort
SELECT - - 17 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
17
17
17

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 - + tab0.col2 * tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT - ( tab2.col2 ) FROM tab2 GROUP BY col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-3650
SELECT 31 DIV + 47 + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

skipif mysql # not compatible
query I rowsort label-3650
SELECT 31 / + 47 + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT - 36 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-36
-36
-36

query I rowsort
SELECT 24 FROM tab0 AS cor0 GROUP BY cor0.col1, col1, cor0.col1
----
24
24

query I rowsort
SELECT + - 75 * + 86 FROM tab1 GROUP BY tab1.col2
----
-6450
-6450
-6450

query I rowsort
SELECT + ( 83 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
83
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 8 ) col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT ALL - 71 AS col1 FROM tab1 GROUP BY tab1.col1
----
-71
-71
-71

query I rowsort
SELECT 48 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
48
48
48

query I rowsort
SELECT DISTINCT - 85 FROM tab0 GROUP BY tab0.col2
----
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 73 * - tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
1606
2044
5986

query I rowsort
SELECT - 4 AS col0 FROM tab1 GROUP BY tab1.col0
----
-4
-4
-4

onlyif mysql # DIV for integer division: 
query I rowsort label-3661
SELECT tab2.col0 DIV col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3661
SELECT tab2.col0 / col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT ALL + 29 FROM tab1 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT DISTINCT + cor0.col0 + + cor0.col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
1892
6972
702

query I rowsort
SELECT cor0.col1 * + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT ALL - 75 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-75
-75
-75

query I rowsort
SELECT - COALESCE ( + CASE + cor0.col2 WHEN + cor0.col1 + + cor0.col1 THEN NULL WHEN col1 + col0 THEN + 48 ELSE + ( 40 ) END, cor0.col1 + 91 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2, cor0.col1
----
-40
-40
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + 32 ) col2 FROM tab1 GROUP BY col0
----
-32
-32
-32

query I rowsort
SELECT + ( 84 ) * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3444
-4956
-5124

query I rowsort
SELECT - 67 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
-67
-67
-67

query I rowsort
SELECT + 64 FROM tab1 GROUP BY tab1.col1
----
64
64
64

query I rowsort
SELECT tab0.col2 * 34 FROM tab0 GROUP BY col2
----
1292
2686
816

query I rowsort
SELECT + 10 FROM tab0 GROUP BY col0
----
10
10
10

query I rowsort
SELECT 69 FROM tab0 GROUP BY tab0.col2
----
69
69
69

query I rowsort
SELECT DISTINCT 17 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
100
43
60

query I rowsort
SELECT DISTINCT 24 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-34
-55
-63

query I rowsort
SELECT DISTINCT 68 FROM tab1 cor0 GROUP BY col0
----
68

query I rowsort
SELECT ALL cor0.col1 + ( - 60 - - cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-48
28
54

query I rowsort
SELECT ALL - - tab0.col2 * col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT ALL - 50 + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-50
-50
31

onlyif mysql # DIV for integer division: 
query I rowsort label-3680
SELECT DISTINCT + cor0.col2 DIV - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-3680
SELECT DISTINCT + cor0.col2 / - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-1

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
58
79
87

query I rowsort
SELECT tab2.col0 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 - + tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

onlyif mysql # DIV for integer division: 
query I rowsort label-3684
SELECT cor0.col1 DIV cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3684
SELECT cor0.col1 / cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 - + tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + tab2.col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + cor0.col1 * 22 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1298
1342
902

query I rowsort
SELECT cor0.col1 + - col1 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2508
-3080
-42

query I rowsort
SELECT - 44 AS col2 FROM tab0 GROUP BY col1
----
-44
-44

query I rowsort
SELECT ALL - - 50 AS col2 FROM tab0 GROUP BY tab0.col0
----
50
50
50

query I rowsort
SELECT DISTINCT - tab0.col2 + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
0

query I rowsort
SELECT 51 * - 3 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-153
-153
-153

query I rowsort
SELECT ALL + 26 AS col2 FROM tab2 GROUP BY tab2.col0
----
26
26
26

query I rowsort
SELECT - cor0.col1 * 27 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-2187
0

query I rowsort
SELECT + 32 + - 72 AS col1 FROM tab1 GROUP BY tab1.col1
----
-40
-40
-40

query I rowsort
SELECT + - 31 + tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-31
6530

query I rowsort
SELECT ALL + 53 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
53
53

query I rowsort
SELECT ALL + tab0.col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT - cor0.col0 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1305
-5336
-7189

query I rowsort
SELECT ALL - - 86 FROM tab0 GROUP BY tab0.col1
----
86
86

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT cor0.col1 + + 2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
2
83

query I rowsort
SELECT DISTINCT 80 * - cor0.col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1782
-2268
-6642

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3704
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3704
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-3705
SELECT DISTINCT ( cor0.col1 ) - cor0.col1 DIV - 96 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

skipif mysql # not compatible
query I rowsort label-3705
SELECT DISTINCT ( cor0.col1 ) - cor0.col1 / - 96 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - 91 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-91
-91
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 + + 24 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-17
-35
-37

query I rowsort
SELECT + 74 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
74
74

query I rowsort
SELECT DISTINCT - - 31 AS col2 FROM tab0 GROUP BY tab0.col1
----
31

query I rowsort
SELECT DISTINCT + col0 * - 49 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1078
-1372
-4018

query I rowsort
SELECT + 94 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
94
94
94

query I rowsort
SELECT DISTINCT ( 87 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
87

query I rowsort
SELECT DISTINCT cor0.col0 * - 24 + - cor0.col0 * ( col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-10465
-10672
-585

query I rowsort
SELECT DISTINCT + 11 FROM tab0 GROUP BY tab0.col0
----
11

query I rowsort
SELECT DISTINCT - cor0.col0 + 72 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-11
29
46

onlyif mysql # DIV for integer division: 
query I rowsort label-3716
SELECT ALL - tab2.col1 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3716
SELECT ALL - tab2.col1 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + 4 col0 FROM tab2 GROUP BY tab2.col1
----
45
63
65

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-3719
SELECT DISTINCT + col0 DIV tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1

skipif mysql # not compatible
query I rowsort label-3719
SELECT DISTINCT + col0 / tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1

query I rowsort
SELECT 38 AS col2 FROM tab1 GROUP BY tab1.col0
----
38
38
38

query I rowsort
SELECT + 75 AS col2 FROM tab2 cor0 GROUP BY col0, cor0.col1
----
75
75
75

query I rowsort
SELECT 63 * + col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1638
2709
5229

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab0.col1 + col1 col0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT 24 + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-4
-58
2

query I rowsort
SELECT + 18 * - 90 FROM tab0 cor0 GROUP BY cor0.col2
----
-1620
-1620
-1620

query I rowsort
SELECT + 26 * cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
0
2106

query I rowsort
SELECT DISTINCT - NULLIF ( - cor0.col2, cor0.col0 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + col2 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT DISTINCT + - 46 FROM tab1 GROUP BY tab1.col2
----
-46

query I rowsort
SELECT - tab2.col0 + + 49 FROM tab2 GROUP BY tab2.col0
----
-42
-43
34

query I rowsort
SELECT + 19 AS col2 FROM tab0 GROUP BY tab0.col0
----
19
19
19

query I rowsort
SELECT - - 52 AS col1 FROM tab2 GROUP BY tab2.col1
----
52
52
52

query I rowsort
SELECT DISTINCT + + ( - col2 ) FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + - 88 FROM tab1 GROUP BY tab1.col2
----
-88
-88
-88

query I rowsort
SELECT ALL 31 + + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
37
75
88

query I rowsort
SELECT ALL + + 56 + 9 FROM tab1 GROUP BY col2
----
65
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
182
184
30

query I rowsort
SELECT tab2.col1 * 94 AS col1 FROM tab2 GROUP BY tab2.col1
----
3854
5546
5734

query I rowsort
SELECT ALL cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor1.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor1.col1
----
0
81

query I rowsort
SELECT - tab1.col1 * + 90 FROM tab1 GROUP BY tab1.col1
----
-3960
-5130
-540

query I rowsort
SELECT ALL + tab2.col1 * tab2.col1 + col1 FROM tab2 GROUP BY tab2.col1
----
1722
3540
3782

query I rowsort
SELECT DISTINCT + 57 FROM tab2 AS cor0 GROUP BY col0, cor0.col1, cor0.col1
----
57

query I rowsort
SELECT ALL ( + 73 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
73
73
73

query I rowsort
SELECT cor0.col2 + - 56 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-11
-48
15

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1681
3481
3721

query I rowsort
SELECT - - col1 AS col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - 68 AS col0 FROM tab2 GROUP BY col1
----
-68
-68
-68

query I rowsort
SELECT 76 - + 92 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-16
-16
-16

query I rowsort
SELECT 28 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
28
28
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT - 55 AS col0 FROM tab2 GROUP BY tab2.col2
----
-55

query I rowsort
SELECT DISTINCT + 63 + col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
144
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 8 col1 FROM tab0 GROUP BY tab0.col1
----
8
8

query I rowsort
SELECT - 65 AS col1 FROM tab2 GROUP BY tab2.col1
----
-65
-65
-65

query I rowsort
SELECT - - tab0.col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT ALL + + 69 - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-22
-23
54

query I rowsort
SELECT + 24 FROM tab1 AS cor0 GROUP BY col2
----
24
24
24

onlyif mysql # DIV for integer division: 
query I rowsort label-3761
SELECT ALL + col2 DIV + 68 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3761
SELECT ALL + col2 / + 68 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
0
1
1

query I rowsort
SELECT + tab1.col2 * - col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT - + ( - 11 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
11
11
11

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 51 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
51

query I rowsort
SELECT ALL 21 FROM tab2 GROUP BY tab2.col2
----
21
21
21

query I rowsort
SELECT + ( + tab2.col1 ) + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

onlyif mysql # DIV for integer division: 
query I rowsort label-3768
SELECT + 65 DIV - 3 + - cor0.col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3343
6220
7548

skipif mysql # not compatible
query I rowsort label-3768
SELECT + 65 / - 3 + - cor0.col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3343
6220
7548

query I rowsort
SELECT - 3 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-3
-3
-3

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3770
SELECT - - CAST( + 36 AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
36
36
36

skipif mysql # not compatible
query I rowsort label-3770
SELECT - - CAST ( + 36 AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
36
36
36

query I rowsort
SELECT DISTINCT - tab1.col2 * 99 FROM tab1 GROUP BY col2
----
-4455
-7029
-792

onlyif mysql # DIV for integer division: 
query I rowsort label-3772
SELECT + 45 DIV - col0 FROM tab0 GROUP BY tab0.col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-3772
SELECT + 45 / - col0 FROM tab0 GROUP BY tab0.col0
----
-1
-1
0

query I rowsort
SELECT + + 36 AS col1 FROM tab2 GROUP BY tab2.col1
----
36
36
36

query I rowsort
SELECT - 20 FROM tab1 AS cor0 GROUP BY col1
----
-20
-20
-20

query I rowsort
SELECT + tab2.col0 * + tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT - cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT 57 FROM tab0 cor0 GROUP BY cor0.col1
----
57
57

onlyif mysql # DIV for integer division: 
query I rowsort label-3778
SELECT ALL + tab2.col1 DIV col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3778
SELECT ALL + tab2.col1 / col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT - 39 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1716
-2223
-234

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 12 col1 FROM tab2 GROUP BY col0
----
-12
-12
-12

query I rowsort
SELECT + col0 + - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT ALL + 57 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
57
57

query I rowsort
SELECT ALL 37 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
37
37

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 65, cor0.col1 * 39 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-65
-65
-65

query I rowsort
SELECT 68 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
68
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
138
148
99

query I rowsort
SELECT + 33 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
3003
3036
495

query I rowsort
SELECT ALL + - 22 AS col2 FROM tab1 GROUP BY tab1.col1
----
-22
-22
-22

query I rowsort
SELECT DISTINCT - 95 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
-95

query I rowsort
SELECT ALL cor0.col1 + + col2 * + col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
3405
6300
7630

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 12 AS col2 FROM tab1 GROUP BY col1
----
-12
-12
-12

query I rowsort
SELECT + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
22
28
82

query I rowsort
SELECT - 90 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-90
-90
-90

query I rowsort
SELECT - 20 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
-20
-20
-20

query I rowsort
SELECT ALL 70 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
108
149
94

onlyif mysql # DIV for integer division: 
query I rowsort label-3797
SELECT + cor0.col2 DIV + 8 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
10
7
9

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3797
SELECT + cor0.col2 / + 8 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
10
7
9

query I rowsort
SELECT + - 5 FROM tab2 GROUP BY tab2.col2
----
-5
-5
-5

query I rowsort
SELECT + - tab1.col2 * - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - 22 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-22

query I rowsort
SELECT - + tab2.col0 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL 84 * + 85 FROM tab2 GROUP BY col0
----
7140
7140
7140

onlyif mysql # DIV for integer division: 
query I rowsort label-3803
SELECT + cor0.col0 * - 61 + + cor0.col1 DIV - cor0.col1 col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
-5552
-5613
-916

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3803
SELECT + cor0.col0 * - 61 + + cor0.col1 / - cor0.col1 col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
-5552
-5613
-916

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( + 4, col1, col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
4

query I rowsort
SELECT DISTINCT ( 7 ) AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
7

query I rowsort
SELECT - + 20 + 6 FROM tab1 GROUP BY tab1.col1
----
-14
-14
-14

onlyif mysql # DIV for integer division: 
query I rowsort label-3807
SELECT - 7 DIV 17 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3807
SELECT - 7 / 17 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT + 94 * tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
2444
4042
7802

query I rowsort
SELECT DISTINCT + 61 FROM tab1 GROUP BY tab1.col1
----
61

onlyif mysql # DIV for integer division: 
query I rowsort label-3810
SELECT + - cor0.col1 DIV - 66 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-3810
SELECT + - cor0.col1 / - 66 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
1

query I rowsort
SELECT DISTINCT + 8 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
8

query I rowsort
SELECT DISTINCT 60 FROM tab0 GROUP BY tab0.col0
----
60

query I rowsort
SELECT 51 AS col2 FROM tab1 GROUP BY tab1.col1
----
51
51
51

query I rowsort
SELECT - cor1.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-3816
SELECT ALL + col0 DIV tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3816
SELECT ALL + col0 / tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT ALL - + tab1.col1 * - col1 + + 44 FROM tab1 GROUP BY col1
----
1980
3293
80

query I rowsort
SELECT 89 AS col2 FROM tab0 GROUP BY tab0.col2
----
89
89
89

query I rowsort
SELECT ( 29 ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
29
29

query I rowsort
SELECT - tab1.col0 + 93 AS col1 FROM tab1 GROUP BY tab1.col0
----
11
65
71

query I rowsort
SELECT 34 FROM tab2 GROUP BY col1
----
34
34
34

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - 55 AS col0 FROM tab1 GROUP BY col0
----
-55

query I rowsort
SELECT - tab0.col0 + tab0.col0 FROM tab0 GROUP BY col0
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3825
SELECT + CAST( - 20 AS SIGNED ) - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-111
-112
-35

skipif mysql # not compatible
query I rowsort label-3825
SELECT + CAST ( - 20 AS INTEGER ) - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-111
-112
-35

query I rowsort
SELECT DISTINCT 5 * 55 FROM tab2 AS cor0 GROUP BY cor0.col1
----
275

query I rowsort
SELECT - - 18 + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
101
44
61

query I rowsort
SELECT - 49 AS col2 FROM tab1 cor0 GROUP BY col0
----
-49
-49
-49

query I rowsort
SELECT DISTINCT + tab2.col0 - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 3 col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
3
3
3

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT ALL + cor0.col1 + - cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, col0
----
-26
-83
38

query I rowsort
SELECT ALL + cor0.col0 + ( + col0 ) AS col0 FROM tab2 AS cor0 GROUP BY col0
----
182
184
30

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + 25 AS col0 FROM tab0 GROUP BY tab0.col0
----
25
25
25

onlyif mysql # DIV for integer division: 
query I rowsort label-3836
SELECT - cor0.col1 DIV - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3836
SELECT - cor0.col1 / - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT ALL + 67 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
67
67
67

query I rowsort
SELECT - cor1.col0 * 35 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-3185
-3220
-525

query I rowsort
SELECT 17 FROM tab2 GROUP BY col0
----
17
17
17

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3840
SELECT ALL - CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3840
SELECT ALL - CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 6 + + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2, cor0.col1
----
6
6
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 63 col0 FROM tab2 GROUP BY tab2.col2
----
63
63
63

query I rowsort
SELECT 27 * + cor0.col0 - 97 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2117
497
659

query I rowsort
SELECT - 8 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
-8
-8

query I rowsort
SELECT ALL + 67 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
148
67
67

query I rowsort
SELECT DISTINCT + 74 AS col2 FROM tab0 GROUP BY tab0.col1
----
74

query I rowsort
SELECT - 38 FROM tab2 GROUP BY tab2.col1
----
-38
-38
-38

query I rowsort
SELECT + - tab2.col2 * - 43 + - 10 FROM tab2 GROUP BY tab2.col2
----
2484
3387
3731

query I rowsort
SELECT ALL + 41 + cor0.col2 FROM tab0 cor0 GROUP BY col1, cor0.col1, cor0.col2
----
120
65
79

query I rowsort
SELECT - 73 FROM tab0 GROUP BY col1
----
-73
-73

query I rowsort
SELECT 70 * + col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1820
3010
5810

query I rowsort
SELECT + 83 AS col1 FROM tab2 GROUP BY tab2.col0
----
83
83
83

query I rowsort
SELECT ALL - 3 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-3
-3
-3

query I rowsort
SELECT ALL - + ( 59 ) * + tab0.col0 FROM tab0 GROUP BY col0
----
-1534
-2537
-4897

query I rowsort
SELECT DISTINCT 79 FROM tab2 cor0 GROUP BY cor0.col2
----
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * 43 col0 FROM tab1 GROUP BY tab1.col2
----
1935
3053
344

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - ( - tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL + cor0.col2 * - 51 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2295
-3621
-408

query I rowsort
SELECT DISTINCT col2 * - 11 FROM tab1 cor0 GROUP BY cor0.col2
----
-495
-781
-88

query I rowsort
SELECT + 78 AS col1 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
78
78
78

onlyif mysql # DIV for integer division: 
query I rowsort label-3862
SELECT - COALESCE ( tab0.col0, tab0.col0 ) DIV - tab0.col0 FROM tab0 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3862
SELECT - COALESCE ( tab0.col0, tab0.col0 ) / - tab0.col0 FROM tab0 GROUP BY col0
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-3863
SELECT ALL + cor0.col0 DIV + 46 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3863
SELECT ALL + cor0.col0 / + 46 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT + col1 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT + 92 FROM tab1 AS cor0 GROUP BY col0
----
92
92
92

query I rowsort
SELECT tab2.col1 FROM tab2, tab0 AS cor0 GROUP BY tab2.col1
----
41
59
61

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 DISTINCT - 43 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-19
-5
36

query I rowsort
SELECT ALL 18 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT ALL cor0.col1 * 91 FROM tab0 cor0 GROUP BY cor0.col1
----
0
7371

query I rowsort
SELECT + 97 FROM tab0 GROUP BY col1
----
97
97

query I rowsort
SELECT - col0 + - 29 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-111
-51
-57

onlyif mysql # DIV for integer division: 
query I rowsort label-3873
SELECT - cor0.col1 DIV cor0.col0 + - 3 col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
-3
-3
-4

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3873
SELECT - cor0.col1 / cor0.col0 + - 3 col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
-3
-3
-4

query I rowsort
SELECT 34 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
34
34
34

query I rowsort
SELECT + - 99 FROM tab1 GROUP BY tab1.col2
----
-99
-99
-99

query I rowsort
SELECT - col2 * + 89 + 87 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-5075
-6944
-7656

query I rowsort
SELECT tab2.col0 * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT + + 98 AS col0 FROM tab2 GROUP BY tab2.col2
----
98
98
98

query I rowsort
SELECT - 24 AS col2 FROM tab0 GROUP BY tab0.col1
----
-24
-24

query I rowsort
SELECT DISTINCT 81 AS col2 FROM tab2 GROUP BY tab2.col2
----
81

query I rowsort
SELECT cor0.col1 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
105
38
79

query I rowsort
SELECT - + 16 AS col0 FROM tab0 GROUP BY tab0.col2
----
-16
-16
-16

query I rowsort
SELECT DISTINCT + 14 + tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
22
59
85

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3884
SELECT - CAST( + 49 AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col0
----
-49
-49
-49

skipif mysql # not compatible
query I rowsort label-3884
SELECT - CAST ( + 49 AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col0
----
-49
-49
-49

query I rowsort
SELECT - ( 51 ) + 86 FROM tab1 GROUP BY tab1.col0
----
35
35
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + 82 FROM tab1 GROUP BY tab1.col2
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT ( - tab0.col0 ) AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + tab1.col1 * tab1.col1 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1980
3306
42

query I rowsort
SELECT - 30 FROM tab0 GROUP BY tab0.col2
----
-30
-30
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * 61 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-2501
-3599
-3721

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3893
SELECT CAST( NULL AS DECIMAL ) + - 24 / + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3893
SELECT CAST ( NULL AS REAL ) + - 24 / + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - tab0.col1 * col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT ALL - + tab1.col0 * + 11 FROM tab1 GROUP BY col0
----
-242
-308
-902

query I rowsort
SELECT DISTINCT - 8 - + tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
-100
-23
-99

query I rowsort
SELECT - cor0.col1 * 70 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3080
-3990
-420

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab1.col1 + tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

onlyif mysql # DIV for integer division: 
query I rowsort label-3900
SELECT ALL - + 40 DIV - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3900
SELECT ALL - + 40 / - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT - col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT 36 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT tab0.col2 + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-3907
SELECT DISTINCT - cor0.col1 DIV + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col2
----
-1

skipif mysql # not compatible
query I rowsort label-3907
SELECT DISTINCT - cor0.col1 / + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col2
----
-1

query I rowsort
SELECT DISTINCT - tab1.col2 AS col2 FROM tab1 WHERE NOT ( NULL ) NOT IN ( - tab1.col2 * - tab1.col0 ) GROUP BY tab1.col2
----

onlyif mysql # DIV for integer division: 
query I rowsort label-3909
SELECT - cor0.col0 DIV cor0.col0 + + cor0.col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
1848
675
6888

skipif mysql # not compatible
query I rowsort label-3909
SELECT - cor0.col0 / cor0.col0 + + cor0.col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
1848
675
6888

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT cor0.col0 * 2 + - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - COALESCE ( tab0.col0, - tab0.col0, 35 ) * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL 4 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
4
4
4

query I rowsort
SELECT 70 AS col1 FROM tab0 GROUP BY tab0.col1
----
70
70

query I rowsort
SELECT + cor0.col2 + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT + cor0.col0 + 37 * - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1008
-2952
-792

query I rowsort
SELECT - cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT ( + col1 ) IS NULL
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-3919
SELECT ALL cor0.col2 DIV cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3919
SELECT ALL cor0.col2 / cor0.col2 AS col2 FROM tab1 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 ALL + tab0.col1 + tab0.col1 * - 77 col2 FROM tab0 GROUP BY col1
----
-6156
0

query I rowsort
SELECT 44 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1936
2508
264

query I rowsort
SELECT + ( 37 ) FROM tab1 AS cor0 GROUP BY col0
----
37
37
37

query I rowsort
SELECT DISTINCT tab1.col1 + - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT ALL - tab2.col1 * - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT - tab1.col2 * 78 AS col2 FROM tab1 GROUP BY tab1.col2
----
-3510
-5538
-624

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3926
SELECT DISTINCT - - CAST( NULL AS SIGNED ) / - 80 AS col0 FROM tab1 GROUP BY tab1.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3926
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) / - 80 AS col0 FROM tab1 GROUP BY tab1.col0
----
NULL

query I rowsort
SELECT DISTINCT - 81 FROM tab0 GROUP BY tab0.col1
----
-81

query I rowsort
SELECT ALL 56 - + cor0.col1 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-2509
-3068
8

query I rowsort
SELECT DISTINCT - ( - 65 ) + 21 FROM tab0 AS cor0 GROUP BY cor0.col1
----
86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3930
SELECT - + CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3930
SELECT - + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 3 FROM tab2 GROUP BY tab2.col0
----
3
3
3

query I rowsort
SELECT cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
1444
576
6241

onlyif mysql # DIV for integer division: 
query I rowsort label-3933
SELECT + 91 DIV ( 14 ) FROM tab2 GROUP BY tab2.col2
----
6
6
6

skipif mysql # not compatible
query I rowsort label-3933
SELECT + 91 / ( 14 ) FROM tab2 GROUP BY tab2.col2
----
6
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT NULLIF ( 90, tab0.col1 ) + tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
171
90

query I rowsort
SELECT + 38 AS col0 FROM tab1 GROUP BY tab1.col0
----
38
38
38

query I rowsort
SELECT cor0.col1 + col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT - 48 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1968
2832
2928

query I rowsort
SELECT - + 9 FROM tab0 GROUP BY tab0.col2
----
-9
-9
-9

query I rowsort
SELECT - tab2.col2 * 54 + 27 * col2 FROM tab2 GROUP BY tab2.col2
----
-1566
-2133
-2349

query I rowsort
SELECT + 82 FROM tab0 AS cor0 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT DISTINCT cor0.col0 - + 74 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-59
17
18

query I rowsort
SELECT - + tab2.col0 + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT + cor0.col0 * ( cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL cor0.col0 * - 86 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1290
-7826
-7912

query I rowsort
SELECT - 85 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-3740
-4845
-510

query I rowsort
SELECT - 65 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-65
-65
-65

query I rowsort
SELECT DISTINCT col0 * 92 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2392
3956
7636

query I rowsort
SELECT - 16 AS col1 FROM tab2 GROUP BY tab2.col1
----
-16
-16
-16

query I rowsort
SELECT - - 75 FROM tab1 GROUP BY tab1.col1
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 50 col1 FROM tab2 GROUP BY tab2.col0
----
50

query I rowsort
SELECT + 72 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT - 73 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
-73
-73
-73

query I rowsort
SELECT cor0.col2 + - 88 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-30
-9

query I rowsort
SELECT DISTINCT + 86 FROM tab2 cor0 GROUP BY cor0.col1
----
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 75 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col2 ) col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 70 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 51 col2 FROM tab1 GROUP BY tab1.col0
----
51
51
51

query I rowsort
SELECT + + tab2.col2 + 95 AS col2 FROM tab2 GROUP BY tab2.col2
----
153
174
182

query I rowsort
SELECT - tab2.col2 * 56 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3248
-4424
-4872

query I rowsort
SELECT 26 - + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-15
-33
-35

onlyif mysql # DIV for integer division: 
query I rowsort label-3962
SELECT - 75 + cor0.col1 DIV ( 67 ) FROM tab2 cor0 GROUP BY cor0.col1
----
-75
-75
-75

skipif mysql # not compatible
query I rowsort label-3962
SELECT - 75 + cor0.col1 / ( 67 ) FROM tab2 cor0 GROUP BY cor0.col1
----
-75
-75
-75

query I rowsort
SELECT 57 + 16 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
1193
185
777

query I rowsort
SELECT DISTINCT + 63 * - 71 FROM tab0 GROUP BY tab0.col2
----
-4473

query I rowsort
SELECT + - 36 * - 87 FROM tab1 GROUP BY tab1.col0
----
3132
3132
3132

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col0, 44 + cor0.col0 / - cor0.col1 ) + + cor0.col0 * col0 AS col2 FROM tab2 cor0 GROUP BY col1, cor0.col0
----
240
8372
8556

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3967
SELECT - - tab1.col2 * CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3967
SELECT - - tab1.col2 * CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 20 * + 40 AS col0 FROM tab1 cor0 GROUP BY col2
----
-800
-800
-800

query I rowsort
SELECT DISTINCT - tab0.col2 + - ( + tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
-158
-48
-76

query I rowsort
SELECT DISTINCT 51 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
51

query I rowsort
SELECT ( 99 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
99
99

query I rowsort
SELECT + 52 FROM tab2 AS cor0 GROUP BY cor0.col0
----
52
52
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 12 * cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1044
696
948

query I rowsort
SELECT + NULLIF ( tab1.col0, tab1.col0 - 79 ) * - 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 tab2.col1 + - col1 col1 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT ALL + - col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT 29 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
29
29
29

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

onlyif mysql # DIV for integer division: 
query I rowsort label-3979
SELECT DISTINCT - tab0.col0 DIV - tab0.col0 + + col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
27
44
84

skipif mysql # not compatible
query I rowsort label-3979
SELECT DISTINCT - tab0.col0 / - tab0.col0 + + col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
27
44
84

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL col1 * + 36 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2916

query I rowsort
SELECT ALL + cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT ALL - col2 * 87 FROM tab0 GROUP BY tab0.col2
----
-2088
-3306
-6873

onlyif mysql # DIV for integer division: 
query I rowsort label-3984
SELECT DISTINCT + cor0.col0 DIV cor0.col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
25
40
79

skipif mysql # not compatible
query I rowsort label-3984
SELECT DISTINCT + cor0.col0 / cor0.col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
25
40
79

query I rowsort
SELECT - col1 + 52 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-29
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 66 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
66
66
66

query I rowsort
SELECT - cor0.col0 * col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT + + col2 * - 1 AS col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + 45 * col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
3195
360

query I rowsort
SELECT ALL - 9 + cor0.col2 * - 48 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1161
-1833
-3801

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col2, col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 7 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-7

query I rowsort
SELECT DISTINCT - tab2.col2 - - 93 FROM tab2 GROUP BY tab2.col2
----
14
35
6

query I rowsort
SELECT ALL + 58 FROM tab0 AS cor0 GROUP BY cor0.col1
----
58
58

query I rowsort
SELECT cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT + cor0.col1 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
133
150
76

query I rowsort
SELECT - + col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT - 31 FROM tab1 AS cor0 GROUP BY col1
----
-31

query I rowsort
SELECT DISTINCT + - tab1.col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT - 88 FROM tab0 GROUP BY tab0.col1
----
-88

query I rowsort
SELECT ALL + 36 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT col0 + col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
124
26
83

query I rowsort
SELECT - 45 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
-45
-45
-45

query I rowsort
SELECT 64 FROM tab2 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT DISTINCT tab1.col2 - - 37 AS col2 FROM tab1 GROUP BY tab1.col2
----
108
45
82

query I rowsort
SELECT - 7 AS col2 FROM tab0 GROUP BY tab0.col2
----
-7
-7
-7

query I rowsort
SELECT ALL 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 col0
----
182
184
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col2 col1 FROM tab2 GROUP BY col2
----
58
79
87

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

onlyif mysql # DIV for integer division: 
query I rowsort label-4013
SELECT ALL - 68 DIV tab2.col2 + tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
57
79
87

skipif mysql # not compatible
query I rowsort label-4013
SELECT ALL - 68 / tab2.col2 + tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
57
79
87

query I rowsort
SELECT ALL 69 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
69
69
69

query I rowsort
SELECT DISTINCT - 92 FROM tab2 GROUP BY col1
----
-92

query I rowsort
SELECT DISTINCT - + tab2.col2 + + 35 FROM tab2 GROUP BY tab2.col2
----
-23
-44
-52

query I rowsort
SELECT DISTINCT + 61 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4018
SELECT - CAST( - 62 AS SIGNED ) + 83 FROM tab2 GROUP BY tab2.col1
----
145
145
145

skipif mysql # not compatible
query I rowsort label-4018
SELECT - CAST ( - 62 AS INTEGER ) + 83 FROM tab2 GROUP BY tab2.col1
----
145
145
145

query I rowsort
SELECT DISTINCT + ( + cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

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 + 43 AS col2 FROM tab1 GROUP BY tab1.col1
----
43
43
43

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 20 - 14 col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
6

query I rowsort
SELECT - tab0.col0 - 21 FROM tab0 GROUP BY tab0.col0
----
-104
-47
-64

query I rowsort
SELECT 1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1
1
1

query I rowsort
SELECT + - 19 AS col0 FROM tab1 GROUP BY tab1.col2
----
-19
-19
-19

onlyif mysql # DIV for integer division: 
query I rowsort label-4028
SELECT 94 DIV 11 FROM tab2 GROUP BY tab2.col2
----
8
8
8

skipif mysql # not compatible
query I rowsort label-4028
SELECT 94 / 11 FROM tab2 GROUP BY tab2.col2
----
8
8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 58 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
58
58
58

query I rowsort
SELECT cor0.col2 - + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 + + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-12
2
27

query I rowsort
SELECT ALL tab0.col0 + tab0.col0 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1892
6972
702

query I rowsort
SELECT DISTINCT col0 - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT DISTINCT 41 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
41

query I rowsort
SELECT ALL - col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT - 17 * + 65 AS col1 FROM tab2 GROUP BY tab2.col0
----
-1105

query I rowsort
SELECT ALL + 86 FROM tab2 GROUP BY tab2.col0
----
86
86
86

query I rowsort
SELECT ALL + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
41
59
61

query I rowsort
SELECT DISTINCT tab2.col1 - - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL 28 * 33 FROM tab0 GROUP BY tab0.col2
----
924
924
924

query I rowsort
SELECT 55 FROM tab2 GROUP BY tab2.col2
----
55
55
55

query I rowsort
SELECT - + 46 + tab0.col2 FROM tab0 GROUP BY col2
----
-22
-8
33

query I rowsort
SELECT DISTINCT + - tab1.col0 + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + + 56 AS col2 FROM tab2 GROUP BY tab2.col1
----
56

query I rowsort
SELECT DISTINCT 33 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
33

query I rowsort
SELECT DISTINCT + cor0.col1 * + 47 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
1927
2773
2867

query I rowsort
SELECT + - 5 FROM tab1 GROUP BY tab1.col0
----
-5
-5
-5

query I rowsort
SELECT DISTINCT - col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - 94 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
-94
-94
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 38 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-38
-38
-38

query I rowsort
SELECT ALL + 16 FROM tab1 AS cor0 GROUP BY cor0.col2
----
16
16
16

query I rowsort
SELECT ALL 72 - - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
100
154
94

query I rowsort
SELECT - ( 57 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-57
-57
-57

query I rowsort
SELECT + + 92 AS col2 FROM tab2 GROUP BY tab2.col1
----
92
92
92

query I rowsort
SELECT DISTINCT - + col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT cor1.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT + + 45 FROM tab1 GROUP BY tab1.col0
----
45
45
45

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4060
SELECT ALL CAST( - 67 AS SIGNED ) + col0 FROM tab0 GROUP BY tab0.col0
----
-24
-41
16

skipif mysql # not compatible
query I rowsort label-4060
SELECT ALL CAST ( - 67 AS INTEGER ) + col0 FROM tab0 GROUP BY tab0.col0
----
-24
-41
16

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT + cor1.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor1.col2
----
9 values hashing to 66267ca705f58a4488972e09499aeb2b

query I rowsort
SELECT ALL + 8 + 57 FROM tab2 GROUP BY tab2.col1
----
65
65
65

query I rowsort
SELECT cor0.col2 + - 75 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-30
-4
-67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 + + 34 col0 FROM tab1 GROUP BY tab1.col2
----
-11
-37
26

query I rowsort
SELECT DISTINCT - - 46 + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
117
54
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + 64 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
5824
5888
960

query I rowsort
SELECT ALL + + tab0.col1 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor1.col2, cor1.col1
----
-22
-28
-82

query I rowsort
SELECT + 69 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
69
69
69

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4071
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab2 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4071
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT 68 AS col0 FROM tab2 GROUP BY tab2.col1
----
68
68
68

query I rowsort
SELECT 72 + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
130
151
159

query I rowsort
SELECT 60 FROM tab0 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT DISTINCT - - tab1.col2 * - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT 3 - + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2, col0
----
-42
-5
-68

query I rowsort
SELECT + col1 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT - 42 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-42
-42
-42

query I rowsort
SELECT 97 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col2 FROM tab0 AS cor0 GROUP BY col0, col0
----
26
43
83

query I rowsort
SELECT + cor0.col0 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
132
1596
3608

onlyif mysql # DIV for integer division: 
query I rowsort label-4082
SELECT DISTINCT + cor0.col2 DIV - 91 + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

skipif mysql # not compatible
query I rowsort label-4082
SELECT DISTINCT + cor0.col2 / - 91 + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + 26 AS col0 FROM tab1 GROUP BY tab1.col1
----
26
26
26

query I rowsort
SELECT + 83 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
83
83
83

query I rowsort
SELECT DISTINCT 89 AS col1 FROM tab2 GROUP BY tab2.col2
----
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 79 col0 FROM tab1 GROUP BY tab1.col0
----
79
79
79

query I rowsort
SELECT + - 34 AS col2 FROM tab0 GROUP BY tab0.col0
----
-34
-34
-34

query I rowsort
SELECT - 39 AS col0 FROM tab0 GROUP BY col1
----
-39
-39

query I rowsort
SELECT - + 25 FROM tab0 GROUP BY tab0.col1
----
-25
-25

query I rowsort
SELECT + tab1.col1 + tab1.col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1980
3306
42

query I rowsort
SELECT DISTINCT cor0.col0 - 75 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-32
-49
8

query I rowsort
SELECT ALL - cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col0
----
9 values hashing to a28a9a955c366855d054ae16e20e38ff

query I rowsort
SELECT DISTINCT tab1.col2 + 74 FROM tab1 GROUP BY tab1.col2
----
119
145
82

query I rowsort
SELECT DISTINCT - 91 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 33 col1 FROM tab0 GROUP BY tab0.col0
----
-33
-33
-33

onlyif mysql # DIV for integer division: 
query I rowsort label-4096
SELECT DISTINCT cor0.col0 DIV col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-4096
SELECT DISTINCT cor0.col0 / col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT tab2.col0 * - 73 FROM tab2 GROUP BY tab2.col0
----
-1095
-6643
-6716

onlyif mysql # DIV for integer division: 
query I rowsort label-4099
SELECT DISTINCT + - tab2.col2 DIV - 61 FROM tab2 GROUP BY tab2.col2
----
0
1

skipif mysql # not compatible
query I rowsort label-4099
SELECT DISTINCT + - tab2.col2 / - 61 FROM tab2 GROUP BY tab2.col2
----
0
1

query I rowsort
SELECT DISTINCT - NULLIF ( col1, cor0.col1 - 88 ) + + 75 FROM tab1 cor0 GROUP BY cor0.col1
----
18
31
69

query I rowsort
SELECT - ( + 66 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-66
-66
-66

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab0 cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, col1
----
41
59
61

query I rowsort
SELECT DISTINCT + tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL < NULL
----

query I rowsort
SELECT cor0.col0 + cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
133
150
76

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4107
SELECT + cor0.col1 DIV 38 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4107
SELECT + cor0.col1 / 38 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - ( col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-4109
SELECT DISTINCT cor0.col1 DIV cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-4109
SELECT DISTINCT cor0.col1 / cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 + + cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT DISTINCT tab1.col0 * - 83 AS col2 FROM tab1 GROUP BY col0
----
-1826
-2324
-6806

query I rowsort
SELECT col2 + col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4113
SELECT tab1.col1 / + CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4113
SELECT tab1.col1 / + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - ( + 9 ) FROM tab1 GROUP BY tab1.col1
----
-9
-9
-9

query I rowsort
SELECT ALL 51 + 16 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
1379
467
739

query I rowsort
SELECT - 4 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4
-4
-4

query I rowsort
SELECT + ( + col2 ) FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT 6 FROM tab0 cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT ALL 42 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT DISTINCT + col2 + tab2.col2 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3422
6320
7656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 60 * + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1440
2280
4740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 90 - - tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
-11
-52
-66

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 5 FROM tab0 AS cor0 GROUP BY cor0.col2
----
5

query I rowsort
SELECT DISTINCT 62 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
62

query I rowsort
SELECT ALL - 13 FROM tab2 GROUP BY tab2.col1
----
-13
-13
-13

query I rowsort
SELECT cor0.col1 - + col1 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
2419
4720
5368

query I rowsort
SELECT - 63 * 73 FROM tab1 GROUP BY tab1.col1
----
-4599
-4599
-4599

query I rowsort
SELECT + + NULLIF ( 25, tab0.col0 ) AS col0 FROM tab0 GROUP BY tab0.col0
----
25
25
25

query I rowsort
SELECT ALL - 96 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-4320
-6816
-768

query I rowsort
SELECT 38 * + 35 AS col2 FROM tab1 GROUP BY tab1.col2
----
1330
1330
1330

query I rowsort
SELECT ALL cor0.col0 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3483

query I rowsort
SELECT DISTINCT + - 17 FROM tab0 GROUP BY tab0.col2
----
-17

query I rowsort
SELECT + 72 FROM tab2 GROUP BY tab2.col1
----
72
72
72

query I rowsort
SELECT + 57 FROM tab0 GROUP BY tab0.col2
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 53 col0 FROM tab1 GROUP BY tab1.col0
----
53
53
53

query I rowsort
SELECT + cor0.col0 - col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4138
SELECT DISTINCT ( CASE 7 WHEN cor0.col1 - + 50 THEN + cor0.col1 DIV cor0.col2 ELSE + cor0.col1 END ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

skipif mysql # not compatible
query I rowsort label-4138
SELECT DISTINCT ( CASE 7 WHEN cor0.col1 - + 50 THEN + cor0.col1 / cor0.col2 ELSE + cor0.col1 END ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT - 25 AS col0 FROM tab1 GROUP BY tab1.col0
----
-25
-25
-25

query I rowsort
SELECT ALL 10 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
10
10
10

query I rowsort
SELECT - tab2.col1 * + col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + tab1.col2 + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + - 92 FROM tab2 GROUP BY tab2.col2
----
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 68 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-68
-68
-68

query I rowsort
SELECT DISTINCT + tab2.col0 + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
182
184
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col0 * - 44 col2 FROM tab1 GROUP BY tab1.col0
----
1232
3608
968

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( + 67, tab1.col2 * + tab1.col0 + - tab1.col2, - col0 ) FROM tab1 GROUP BY tab1.col2
----
-67
-67
-67

onlyif mysql # DIV for integer division: 
query I rowsort label-4148
SELECT 40 DIV - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4148
SELECT 40 / - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT tab0.col1 - tab0.col1 FROM tab0 WHERE NOT + tab0.col2 IS NOT NULL GROUP BY col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 + cor0.col0 col0 FROM tab0 cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT 45 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1170
1935
3735

query I rowsort
SELECT DISTINCT 31 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
31

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col2
----
9 values hashing to 0b6eac60b12718df0c5ffc2484241344

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab0 cor0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT + 24 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
24
24

query I rowsort
SELECT DISTINCT ( cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 55 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT - + 41 AS col2 FROM tab0 GROUP BY tab0.col2
----
-41
-41
-41

query I rowsort
SELECT - 14 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-14
-14
-14

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT - - 31 AS col1 FROM tab2 GROUP BY tab2.col0
----
31
31
31

query I rowsort
SELECT ALL + cor0.col2 * - cor0.col1 + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-2320
-4582
-5220

query I rowsort
SELECT ALL cor0.col1 - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-26
-83
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 70 col0 FROM tab1 GROUP BY tab1.col0
----
70
70
70

query I rowsort
SELECT + tab2.col1 + tab2.col1 FROM tab2 WHERE NOT NULL IS NOT NULL GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT cor0.col2 * cor0.col0 + + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1305
184
5893

query I rowsort
SELECT DISTINCT ( + 12 ) + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
18
56
69

query I rowsort
SELECT ALL 28 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
28
28
28

query I rowsort
SELECT ALL 9 FROM tab1 GROUP BY col2
----
9
9
9

query I rowsort
SELECT DISTINCT + cor0.col1 + + 93 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
137
150
99

query I rowsort
SELECT ALL + - col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - 52 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-52

query I rowsort
SELECT 5 - + 87 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-82
-82
-82

query I rowsort
SELECT DISTINCT ( 98 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
98

onlyif mysql # DIV for integer division: 
query I rowsort label-4176
SELECT + 46 DIV - 99 + + 83 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
4814
6557
7221

skipif mysql # not compatible
query I rowsort label-4176
SELECT + 46 / - 99 + + 83 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
4814
6557
7221

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col2 * - 43 FROM tab0 AS cor0 GROUP BY col2
----
1056
1672
3476

onlyif mysql # DIV for integer division: 
query I rowsort label-4178
SELECT 42 DIV 48 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4178
SELECT 42 / 48 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4181
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-4181
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
22
28
82

query I rowsort
SELECT + ( + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col0 * ( + col0 * col2 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
19575
490912
654199

query I rowsort
SELECT DISTINCT - tab1.col2 + ( tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + 55 FROM tab2 GROUP BY tab2.col2
----
55
55
55

query I rowsort
SELECT + 17 AS col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
17
17
17

query I rowsort
SELECT DISTINCT + 49 * - cor0.col2 + 67 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2138
-325
-3412

query I rowsort
SELECT DISTINCT + tab1.col0 * + col0 AS col2 FROM tab1 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + + ( + tab2.col1 ) - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT 42 FROM tab0 cor0 GROUP BY col1
----
42
42

query I rowsort
SELECT + 35 AS col2 FROM tab0 GROUP BY tab0.col0
----
35
35
35

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT col1 + 98 FROM tab0 GROUP BY col1
----
179
98

onlyif mysql # DIV for integer division: 
query I rowsort label-4196
SELECT ALL + 64 DIV + tab0.col0 FROM tab0 GROUP BY col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4196
SELECT ALL + 64 / + tab0.col0 FROM tab0 GROUP BY col0
----
0
1
2

query I rowsort
SELECT 93 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT ALL - 53 FROM tab1 GROUP BY tab1.col0
----
-53
-53
-53

query I rowsort
SELECT DISTINCT - 70 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-5670
0

query I rowsort
SELECT ALL + 75 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
75
75
75

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 DISTINCT + - col2 * - tab1.col2 - - 67 FROM tab1 GROUP BY tab1.col2
----
131
2092
5108

query I rowsort
SELECT + 9 FROM tab1 AS cor0 GROUP BY cor0.col0
----
9
9
9

query I rowsort
SELECT 50 FROM tab2 GROUP BY tab2.col1
----
50
50
50

query I rowsort
SELECT - tab1.col0 - col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

query I rowsort
SELECT + 67 FROM tab1 GROUP BY tab1.col2
----
67
67
67

query I rowsort
SELECT ALL 55 * 34 FROM tab1 AS cor0 GROUP BY col2
----
1870
1870
1870

query I rowsort
SELECT DISTINCT - 74 * 82 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6068

query I rowsort
SELECT ALL 44 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
44
44

query I rowsort
SELECT - 9 AS col2 FROM tab1 GROUP BY tab1.col0
----
-9
-9
-9

query I rowsort
SELECT DISTINCT + + 4 FROM tab0 GROUP BY col1
----
4

query I rowsort
SELECT 42 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
124
64
70

query I rowsort
SELECT col1 + 8 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
8
89

query I rowsort
SELECT 79 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
79
79
79

query I rowsort
SELECT ALL - - 54 AS col1 FROM tab2 GROUP BY tab2.col2
----
54
54
54

query I rowsort
SELECT DISTINCT 63 FROM tab1 GROUP BY col0
----
63

query I rowsort
SELECT + + 85 * - 4 - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-362
-368
-422

query I rowsort
SELECT - 36 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-36
-36
-36

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4219
SELECT - CAST( NULL AS DECIMAL ) * tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4219
SELECT - CAST ( NULL AS REAL ) * tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col0 - - tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT + 20 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1420
160
900

query I rowsort
SELECT 38 FROM tab1 AS cor0 GROUP BY col0, col0
----
38
38
38

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col1 FROM tab2 AS cor0 GROUP BY col0, col1
----
3772
5369
915

query I rowsort
SELECT ALL + 43 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
3483

onlyif mysql # DIV for integer division: 
query I rowsort label-4225
SELECT DISTINCT - tab1.col2 + + 41 DIV + 35 AS col2 FROM tab1 GROUP BY tab1.col2
----
-44
-7
-70

skipif mysql # not compatible
query I rowsort label-4225
SELECT DISTINCT - tab1.col2 + + 41 / + 35 AS col2 FROM tab1 GROUP BY tab1.col2
----
-44
-7
-70

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1865
28
3204

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + 79 FROM tab0 AS cor0 GROUP BY cor0.col2
----
79

query I rowsort
SELECT ALL 37 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
108
45
82

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
1260
176
5822

query I rowsort
SELECT 96 AS col2 FROM tab1 GROUP BY tab1.col2
----
96
96
96

query I rowsort
SELECT ALL + - 96 FROM tab1 GROUP BY col1
----
-96
-96
-96

query I rowsort
SELECT + 19 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + tab2.col2 col1 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - 98 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-98
-98
-98

query I rowsort
SELECT + 99 - + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
7
8
84

query I rowsort
SELECT DISTINCT + 17 * - tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-1343
-1479
-986

query I rowsort
SELECT 99 + + tab1.col2 * 33 FROM tab1 GROUP BY tab1.col2
----
1584
2442
363

onlyif mysql # DIV for integer division: 
query I rowsort label-4241
SELECT ALL - 5 DIV 88 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-4241
SELECT ALL - 5 / 88 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT 18 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
0
81

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT + 6 AS col0 FROM tab2 GROUP BY tab2.col0
----
6
6
6

query I rowsort
SELECT + ( + tab1.col0 ) * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT 88 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
88

query I rowsort
SELECT DISTINCT 21 FROM tab0 GROUP BY tab0.col0
----
21

query I rowsort
SELECT - + tab1.col0 + + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0
0
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 44, + cor0.col2 ) * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-2508
-264

query I rowsort
SELECT - 28 AS col2 FROM tab1 GROUP BY tab1.col1
----
-28
-28
-28

query I rowsort
SELECT DISTINCT + 73 AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
73

query I rowsort
SELECT DISTINCT - 76 FROM tab1 GROUP BY tab1.col1
----
-76

query I rowsort
SELECT - + col0 + 4 FROM tab0 GROUP BY col0
----
-22
-39
-79

query I rowsort
SELECT - CASE - tab1.col1 WHEN + tab1.col1 THEN + 40 + 29 END FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 71 + cor0.col1 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1752
3552
3792

query I rowsort
SELECT cor0.col0 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1, cor0.col1
----
44
57
6

query I rowsort
SELECT + 0 AS col2 FROM tab1, tab1 AS cor0 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT 23 AS col0 FROM tab1 GROUP BY tab1.col1
----
23
23
23

query I rowsort
SELECT DISTINCT - 34 FROM tab1 GROUP BY tab1.col2
----
-34

query I rowsort
SELECT DISTINCT 16 FROM tab0 GROUP BY tab0.col2
----
16

query I rowsort
SELECT ALL 49 AS col1 FROM tab2 GROUP BY col2
----
49
49
49

query I rowsort
SELECT DISTINCT 29 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
29

query I rowsort
SELECT + col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT 88 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
7128

query I rowsort
SELECT ALL - 5 AS col2 FROM tab2 GROUP BY tab2.col2
----
-5
-5
-5

query I rowsort
SELECT 47 AS col0 FROM tab2 GROUP BY tab2.col0
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + - tab1.col2 * 89 + col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-3960
-6248
-704

query I rowsort
SELECT + - tab0.col0 - - col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4273
SELECT DISTINCT + CAST( NULL AS SIGNED ) + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
NULL

skipif mysql # not compatible
query I rowsort label-4273
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
NULL

query I rowsort
SELECT ALL 19 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
19
19
19

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4275
SELECT - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4275
SELECT - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 67 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
67

query I rowsort
SELECT ALL 31 FROM tab2 GROUP BY tab2.col1
----
31
31
31

query I rowsort
SELECT + 39 AS col2 FROM tab0 GROUP BY tab0.col0
----
39
39
39

query I rowsort
SELECT + 36 FROM tab2 cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT + + 99 * + col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
4455
7029
792

query I rowsort
SELECT ALL - 38 FROM tab1 GROUP BY col2
----
-38
-38
-38

query I rowsort
SELECT ALL tab2.col0 + col0 AS col0 FROM tab2 GROUP BY col0
----
182
184
30

query I rowsort
SELECT ALL - 27 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-27
-27
-27

query I rowsort
SELECT cor0.col0 - + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + + 40 FROM tab1 GROUP BY col1
----
40

query I rowsort
SELECT + cor0.col2 * 20 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1420
160
900

onlyif mysql # DIV for integer division: 
query I rowsort label-4287
SELECT DISTINCT + cor0.col0 DIV - 30 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3
0

skipif mysql # not compatible
query I rowsort label-4287
SELECT DISTINCT + cor0.col0 / - 30 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3
0

query I rowsort
SELECT DISTINCT + col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
24
38
79

query I rowsort
SELECT DISTINCT 23 - + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-15
-56

query I rowsort
SELECT DISTINCT - - tab1.col2 - + tab1.col2 * - col2 FROM tab1 GROUP BY tab1.col2
----
2070
5112
72

query I rowsort
SELECT DISTINCT + - 57 FROM tab2 GROUP BY tab2.col0
----
-57

query I rowsort
SELECT DISTINCT - 83 AS col0 FROM tab1 GROUP BY tab1.col0
----
-83

query I rowsort
SELECT DISTINCT + NULLIF ( 46, tab2.col0 + tab2.col0 * 82 ) FROM tab2 GROUP BY tab2.col0
----
46

query I rowsort
SELECT DISTINCT + 0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT 85 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
85
85
85

query I rowsort
SELECT ALL + 82 FROM tab1 cor0 GROUP BY cor0.col1
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - cor0.col0 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT + - tab0.col2 * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT 23 + - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-22
-48
15

query I rowsort
SELECT 36 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
36
36

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4301
SELECT ALL + CAST( NULL AS DECIMAL ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4301
SELECT ALL + CAST ( NULL AS REAL ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 + - cor0.col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2, cor0.col2
----
-38
-79
57

onlyif mysql # DIV for integer division: 
query I rowsort label-4303
SELECT DISTINCT cor0.col2 + + 58 DIV 44 FROM tab2 AS cor0 GROUP BY cor0.col2
----
59
80
88

skipif mysql # not compatible
query I rowsort label-4303
SELECT DISTINCT cor0.col2 + + 58 / 44 FROM tab2 AS cor0 GROUP BY cor0.col2
----
59
80
88

onlyif mysql # DIV for integer division: 
query I rowsort label-4304
SELECT 48 - + 67 DIV - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
49
49
59

skipif mysql # not compatible
query I rowsort label-4304
SELECT 48 - + 67 / - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
49
49
59

query I rowsort
SELECT ALL - 24 * col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-1968
-528
-672

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col1 * + 52 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2, cor0.col1
----
2074
2989
3085

query I rowsort
SELECT 57 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 30 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
30
30
30

query I rowsort
SELECT + tab0.col0 - col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1806
-650
-6806

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT tab0.col1 + ( tab0.col1 - tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-4312
SELECT - 90 DIV - 10 FROM tab2 AS cor0 GROUP BY cor0.col2
----
9
9
9

skipif mysql # not compatible
query I rowsort label-4312
SELECT - 90 / - 10 FROM tab2 AS cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT DISTINCT + tab2.col1 * 32 FROM tab2 GROUP BY tab2.col1
----
1312
1888
1952

query I rowsort
SELECT 96 + - cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2, cor0.col1
----
17
58
72

query I rowsort
SELECT DISTINCT + cor0.col2 - 1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
44
7
70

query I rowsort
SELECT + 34 FROM tab1 GROUP BY tab1.col1
----
34
34
34

query I rowsort
SELECT ALL - 78 - 53 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-131
-131
-131

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
6561

query I rowsort
SELECT ALL 36 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT ALL - 33 FROM tab2 GROUP BY tab2.col0
----
-33
-33
-33

query I rowsort
SELECT + cor0.col1 * + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT - 23 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-23
-23
-23

onlyif mysql # DIV for integer division: 
query I rowsort label-4323
SELECT DISTINCT + col2 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-4323
SELECT DISTINCT + col2 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT DISTINCT 67 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
67

onlyif mysql # DIV for integer division: 
query I rowsort label-4325
SELECT DISTINCT cor0.col2 DIV ( cor0.col2 * cor0.col2 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-4325
SELECT DISTINCT cor0.col2 / ( cor0.col2 * cor0.col2 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT ALL 39 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col1, col0
----
1014
1677
3237

query I rowsort
SELECT DISTINCT + 48 * 1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
48

query I rowsort
SELECT ALL - 43 FROM tab0 GROUP BY tab0.col2
----
-43
-43
-43

query I rowsort
SELECT + + 76 FROM tab1 GROUP BY tab1.col0
----
76
76
76

onlyif mysql # DIV for integer division: 
query I rowsort label-4330
SELECT ( - 93 ) + cor0.col1 DIV 64 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-93
-93
-93

skipif mysql # not compatible
query I rowsort label-4330
SELECT ( - 93 ) + cor0.col1 / 64 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-93
-93
-93

query I rowsort
SELECT + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
1444
576
6241

query I rowsort
SELECT ( tab2.col1 ) * tab2.col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT - 42 * - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1722
2478
2562

onlyif mysql # DIV for integer division: 
query I rowsort label-4334
SELECT COALESCE ( 52, + cor0.col0, cor0.col1 - - 15 * col1 ) DIV - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
-1
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4334
SELECT COALESCE ( 52, + cor0.col0, cor0.col1 - - 15 * col1 ) / - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
-1
0
0

query I rowsort
SELECT + 26 AS col2 FROM tab0 GROUP BY tab0.col2
----
26
26
26

query I rowsort
SELECT ALL cor0.col1 * - 94 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-4136
-5358
-564

query I rowsort
SELECT ALL - tab0.col2 + - 28 * - col2 FROM tab0 GROUP BY tab0.col2
----
1026
2133
648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col0 * + 82 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
2132
3526
6806

query I rowsort
SELECT COALESCE ( 99, + tab2.col0, 84 ) * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
1485
9009
9108

query I rowsort
SELECT ALL - 33 AS col1 FROM tab2 GROUP BY tab2.col0
----
-33
-33
-33

onlyif mysql # DIV for integer division: 
query I rowsort label-4342
SELECT ALL col0 DIV col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4342
SELECT ALL col0 / col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT 31 * + 31 FROM tab1 AS cor0 GROUP BY cor0.col2
----
961

query I rowsort
SELECT + 26 AS col1 FROM tab1 GROUP BY tab1.col0
----
26
26
26

query I rowsort
SELECT DISTINCT + 33 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
33

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4346
SELECT ALL - - CAST( NULL AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4346
SELECT ALL - - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 77 * + 46 AS col1 FROM tab1 GROUP BY tab1.col0
----
3542
3542
3542

query I rowsort
SELECT ALL - 64 * tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-5184
0

query I rowsort
SELECT DISTINCT + 88 + 15 AS col2 FROM tab0 GROUP BY tab0.col2
----
103

query I rowsort
SELECT tab0.col2 * 52 AS col0 FROM tab0 GROUP BY col2
----
1248
1976
4108

onlyif mysql # DIV for integer division: 
query I rowsort label-4351
SELECT + 13 DIV - 88 FROM tab0 GROUP BY tab0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-4351
SELECT + 13 / - 88 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT + + 11 FROM tab2 GROUP BY tab2.col0
----
11
11
11

query I rowsort
SELECT ALL - 63 * + 29 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
-1827
-1827
-1827

onlyif mysql # DIV for integer division: 
query I rowsort label-4354
SELECT + + tab1.col2 DIV 91 FROM tab1 GROUP BY col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4354
SELECT + + tab1.col2 / 91 FROM tab1 GROUP BY col2
----
0
0
0

query I rowsort
SELECT cor0.col0 * 70 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1050
6370
6440

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4356
SELECT CAST( NULL AS DECIMAL ) AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4356
SELECT CAST ( NULL AS REAL ) AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col2 * - cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2070
5112
72

query I rowsort
SELECT - 47 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-47
-47
-47

query I rowsort
SELECT + cor0.col2 * + 67 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
1608
2546
5293

onlyif mysql # DIV for integer division: 
query I rowsort label-4360
SELECT DISTINCT 66 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
1
8

skipif mysql # not compatible
query I rowsort label-4360
SELECT DISTINCT 66 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
1
8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4361
SELECT DISTINCT - CAST( NULL AS SIGNED ) * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-4361
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT - tab1.col2 FROM tab1 WHERE NOT NULL IS NULL GROUP BY tab1.col2
----

query I rowsort
SELECT + 36 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
115
123
94

query I rowsort
SELECT + + 36 * tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1476
2124
2196

query I rowsort
SELECT DISTINCT - 96 FROM tab0 GROUP BY tab0.col1
----
-96

query I rowsort
SELECT ALL - 10 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-10
-10
-10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 + 87 * 69 col1 FROM tab2 GROUP BY tab2.col1
----
5942
5944
5962

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4368
SELECT + tab2.col0 - + CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4368
SELECT + tab2.col0 - + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab0.col0 col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL NULLIF ( + cor0.col2, - 58 + + col1 / + col1 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, col1, cor0.col0
----
26
43
83

query I rowsort
SELECT + 18 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
18
18
18

query I rowsort
SELECT DISTINCT - - col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL 49 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
49
49
49

query I rowsort
SELECT tab2.col2 + + tab2.col2 * tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
3422
6320
7656

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT ALL - cor0.col2 * 38 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1710
-2698
-304

query I rowsort
SELECT ALL - cor0.col0 + 81 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2
38
55

query I rowsort
SELECT + - 71 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-4118
-5609
-6177

query I rowsort
SELECT + 5 + + col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
5
86

query I rowsort
SELECT DISTINCT - cor0.col1 + + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT 97 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
97
97
97

query I rowsort
SELECT 10 + + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
16
54
67

query I rowsort
SELECT tab1.col1 + - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT - 93 * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-2418
-3999
-7719

query I rowsort
SELECT 43 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
43
43
43

query I rowsort
SELECT + 36 FROM tab1 cor0 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT ALL tab1.col0 + - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT - + 6 FROM tab1 GROUP BY tab1.col0
----
-6
-6
-6

query I rowsort
SELECT + 51 FROM tab0 GROUP BY tab0.col1
----
51
51

query I rowsort
SELECT DISTINCT - 67 AS col1 FROM tab2 GROUP BY tab2.col2
----
-67

query I rowsort
SELECT DISTINCT - tab2.col0 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT 22 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
22
22
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 13 col0 FROM tab1 GROUP BY tab1.col1
----
-13
-13
-13

query I rowsort
SELECT 5 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
5
5
5

query I rowsort
SELECT ALL + 60 + 77 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
137
137
137

query I rowsort
SELECT DISTINCT 62 AS col0 FROM tab0 GROUP BY col0
----
62

query I rowsort
SELECT ALL - 56 FROM tab0 GROUP BY col1
----
-56
-56

query I rowsort
SELECT DISTINCT - 70 * cor0.col1 - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2911
-4189
-4331

query I rowsort
SELECT - 39 AS col1 FROM tab0 GROUP BY tab0.col2
----
-39
-39
-39

query I rowsort
SELECT - 6 AS col0 FROM tab2 GROUP BY tab2.col1
----
-6
-6
-6

query I rowsort
SELECT ALL + cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor0.col1, cor0.col1
----
9 values hashing to 4fe903723f7427a19598c1293ff90703

query I rowsort
SELECT 13 FROM tab2 cor0 GROUP BY cor0.col0
----
13
13
13

query I rowsort
SELECT - 2 AS col2 FROM tab0 GROUP BY tab0.col1
----
-2
-2

query I rowsort
SELECT ALL + tab0.col0 - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT col0 * 30 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2730
2760
450

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4407
SELECT + CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4407
SELECT + CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ( 92 ) - 31 FROM tab2 AS cor0 GROUP BY cor0.col1
----
61
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 34 * cor1.col2 col1 FROM tab2 cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
-1530
-2414
-272

query I rowsort
SELECT DISTINCT - + 91 FROM tab2 GROUP BY col0
----
-91

query I rowsort
SELECT DISTINCT 79 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
79

onlyif mysql # DIV for integer division: 
query I rowsort label-4412
SELECT ALL + - tab1.col0 DIV - tab1.col0 + 97 FROM tab1 GROUP BY tab1.col0
----
98
98
98

skipif mysql # not compatible
query I rowsort label-4412
SELECT ALL + - tab1.col0 / - tab1.col0 + 97 FROM tab1 GROUP BY tab1.col0
----
98
98
98

query I rowsort
SELECT DISTINCT - tab0.col2 + + col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col2, col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + + 34 FROM tab1 GROUP BY tab1.col0
----
34

query I rowsort
SELECT DISTINCT + tab1.col0 * + col0 FROM tab1 GROUP BY tab1.col0 HAVING ( NULL ) IS NULL
----
484
6724
784

query I rowsort
SELECT + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NULL
----
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 ( + tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL + 1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT 89 * + tab2.col1 + 16 FROM tab2 GROUP BY tab2.col1
----
3665
5267
5445

query I rowsort
SELECT ALL + 83 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
83
83
83

query I rowsort
SELECT ALL + 9 FROM tab2 GROUP BY tab2.col0
----
9
9
9

query I rowsort
SELECT 67 + 88 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
155
155
155

query I rowsort
SELECT ALL 57 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
57
57
57

query I rowsort
SELECT 42 * + col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1890
2982
336

query I rowsort
SELECT ALL + - tab0.col2 * tab0.col2 + - 65 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1509
-6306
-641

query I rowsort
SELECT - 0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4429
SELECT DISTINCT - COALESCE ( 79, cor0.col2 DIV + 94 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-79

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4429
SELECT DISTINCT - COALESCE ( 79, cor0.col2 / + 94 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-79

query I rowsort
SELECT - 0 AS col1 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 48 - + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-23
3
40

query I rowsort
SELECT - + ( tab1.col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT - 25 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-25
-25
-25

onlyif mysql # DIV for integer division: 
query I rowsort label-4434
SELECT ALL 2 DIV - 22 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4434
SELECT ALL 2 / - 22 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + col1 * ( + tab2.col1 ) + + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1722
3540
3782

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3772
5369
915

query I rowsort
SELECT ALL - - col2 + - 44 AS col1 FROM tab2 GROUP BY col2
----
14
35
43

onlyif mysql # DIV for integer division: 
query I rowsort label-4438
SELECT - tab0.col0 DIV + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4438
SELECT - tab0.col0 / + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT ( NULL ) IS NOT NULL
----
225
8281
8464

query I rowsort
SELECT DISTINCT 89 FROM tab2 cor0 GROUP BY cor0.col2
----
89

query I rowsort
SELECT ( 50 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - CASE - col0 WHEN cor0.col0 + col2 THEN - cor0.col2 ELSE NULL END * - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0, cor0.col2
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-4443
SELECT + cor1.col2 DIV cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4443
SELECT + cor1.col2 / cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col1
----
1
1
1

query I rowsort
SELECT + 33 FROM tab0 cor0 GROUP BY cor0.col1
----
33
33

query I rowsort
SELECT DISTINCT - 48 FROM tab1, tab0 cor0 GROUP BY tab1.col2
----
-48

query I rowsort
SELECT ALL - 29 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-29
-29

query I rowsort
SELECT DISTINCT - cor0.col0 - + 6 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-28
-34
-88

query I rowsort
SELECT DISTINCT 17 FROM tab0 GROUP BY tab0.col0
----
17

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - - 19 FROM tab2 GROUP BY tab2.col0
----
19
19
19

query I rowsort
SELECT 90 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
90
90
90

query I rowsort
SELECT DISTINCT + 44 + col0 FROM tab2 GROUP BY tab2.col0
----
135
136
59

query I rowsort
SELECT - 10 AS col1 FROM tab2 GROUP BY tab2.col2
----
-10
-10
-10

query I rowsort
SELECT ALL - cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT 46 + cor0.col1 * cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
3529
46
46

query I rowsort
SELECT + 26 + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
108
48
54

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4459
SELECT + - CAST( 28 AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
-28
-28
-28

skipif mysql # not compatible
query I rowsort label-4459
SELECT + - CAST ( 28 AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
-28
-28
-28

query I rowsort
SELECT ALL + cor0.col0 * col1 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
3680
5278
900

query I rowsort
SELECT DISTINCT cor0.col0 * 79 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2054
3397
6557

query I rowsort
SELECT ALL + 5 * 2 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
10
10

query I rowsort
SELECT - 4 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-4
-4

query I rowsort
SELECT cor0.col1 + + 65 FROM tab0 cor0 GROUP BY cor0.col1
----
146
65

query I rowsort
SELECT 50 FROM tab1 cor0 GROUP BY cor0.col0
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT 51 * - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1224
-1938
-4029

query I rowsort
SELECT cor0.col2 + + 86 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
2088
3306
6873

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 77 - cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2
39
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 * - 92 col2 FROM tab1 GROUP BY tab1.col1
----
-1932
-1932
-1932

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4471
SELECT ALL + col0 + CAST( NULL AS SIGNED ) / 54 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4471
SELECT ALL + col0 + CAST ( NULL AS INTEGER ) / 54 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 22 col0 FROM tab2 GROUP BY tab2.col1
----
-22
-22
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 55 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
55
55
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col2 * + 31 col0 FROM tab0 GROUP BY tab0.col2
----
-1178
-2449
-744

query I rowsort
SELECT 19 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
19
19
19

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4476
SELECT DISTINCT + tab2.col1 * - CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-4476
SELECT DISTINCT + tab2.col1 * - CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
NULL

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-4477
SELECT col2 + - CAST( - 76 AS SIGNED ) DIV cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
20
46
72

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4477
SELECT col2 + - CAST ( - 76 AS INTEGER ) / cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
20
46
72

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 WHERE NOT - tab0.col2 * - tab0.col2 IS NOT NULL GROUP BY cor0.col1
----

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 96, cor0.col0 * + col1 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
96
96
96

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, col2
----
166
52
86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4481
SELECT + CAST( 87 AS SIGNED ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
87
87
87

skipif mysql # not compatible
query I rowsort label-4481
SELECT + CAST ( 87 AS INTEGER ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
87
87
87

query I rowsort
SELECT ALL - 13 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-19
-57
-70

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT + cor0.col0 + 53 FROM tab0 AS cor0 GROUP BY cor0.col0
----
136
79
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + 69 FROM tab0 GROUP BY col0
----
69
69
69

query I rowsort
SELECT + tab2.col0 / - col0 FROM tab2 WHERE ( NULL ) > ( NULL ) GROUP BY col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col1 FROM tab1 AS cor0 WHERE NOT NULL IS NOT NULL GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + tab0.col0 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT ALL - 12 AS col2 FROM tab2 GROUP BY tab2.col0
----
-12
-12
-12

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4491
SELECT + - CAST( + 23 AS SIGNED ) col0 FROM tab0 GROUP BY tab0.col2
----
-23
-23
-23

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4491
SELECT + - CAST ( + 23 AS INTEGER ) col0 FROM tab0 GROUP BY tab0.col2
----
-23
-23
-23

query I rowsort
SELECT - 63 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-63
-63
-63

query I rowsort
SELECT DISTINCT 65 + cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
129
2090
5106

query I rowsort
SELECT ALL + 82 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
82
82
82

query I rowsort
SELECT + NULLIF ( - tab0.col0, tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + 19 FROM tab1 GROUP BY tab1.col0
----
19

query I rowsort
SELECT - - ( tab0.col1 ) FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT - 36 + 40 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4
4
4

query I rowsort
SELECT DISTINCT 2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2

query I rowsort
SELECT ALL - - 30 AS col2 FROM tab0 GROUP BY col1
----
30
30

query I rowsort
SELECT DISTINCT + 72 * - 98 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-7056

query I rowsort
SELECT ALL - 46 FROM tab2 GROUP BY tab2.col1
----
-46
-46
-46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 66 col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
66
66
66

query I rowsort
SELECT ALL + col0 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT + 90 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
7290

query I rowsort
SELECT DISTINCT 68 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
68

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-4508
SELECT - + 13 DIV tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4508
SELECT - + 13 / tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 44 + + 82 FROM tab2 AS cor0 GROUP BY cor0.col1
----
126

query I rowsort
SELECT DISTINCT - - 3 AS col2 FROM tab1 GROUP BY tab1.col2
----
3

query I rowsort
SELECT ALL cor0.col1 + + cor0.col2 * 33 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1542
2387
270

query I rowsort
SELECT - 6 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-21
-97
-98

query I rowsort
SELECT 29 * col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2349

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT ALL 72 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
72
72
72

query I rowsort
SELECT + 16 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
57
75
77

query I rowsort
SELECT - cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 30 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
30

query I rowsort
SELECT 34 * + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1462
2822
884

query I rowsort
SELECT 79 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
79
79
79

query I rowsort
SELECT - 65 FROM tab2 GROUP BY tab2.col2
----
-65
-65
-65

query I rowsort
SELECT DISTINCT - + 84 AS col1 FROM tab2 GROUP BY tab2.col2
----
-84

query I rowsort
SELECT DISTINCT ( 57 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
57

query I rowsort
SELECT - 0 * - 84 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4525
SELECT CAST( NULL AS DECIMAL ) * - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4525
SELECT CAST ( NULL AS REAL ) * - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1892
30
3192

query I rowsort
SELECT + + 70 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
3080
3990
420

query I rowsort
SELECT 59 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
59
59
59

query I rowsort
SELECT col2 * NULLIF ( - cor0.col0, - cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-166
-52
-86

query I rowsort
SELECT + 85 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
85
85
85

query I rowsort
SELECT + 25 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
107
47
53

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4533
SELECT - + CAST( NULL AS SIGNED ) / 79 + - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4533
SELECT - + CAST ( NULL AS INTEGER ) / 79 + - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 85 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
85
85
85

onlyif mysql # DIV for integer division: 
query I rowsort label-4535
SELECT DISTINCT 91 DIV + col0 FROM tab2 GROUP BY tab2.col0
----
0
1
6

skipif mysql # not compatible
query I rowsort label-4535
SELECT DISTINCT 91 / + col0 FROM tab2 GROUP BY tab2.col0
----
0
1
6

query I rowsort
SELECT DISTINCT 67 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
105
146
91

query I rowsort
SELECT ALL - + 42 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-3402
0

query I rowsort
SELECT DISTINCT 68 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
68

query I rowsort
SELECT DISTINCT - ( + cor0.col0 ) + + cor0.col0 * - col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1892
-6972
-702

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1849
676
6889

query I rowsort
SELECT - cor0.col2 FROM tab2 cor0 GROUP BY col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT ALL 18 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1476
396
504

query I rowsort
SELECT ALL cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT - col2 FROM tab1 WHERE NULL IS NOT NULL GROUP BY col2
----

query I rowsort
SELECT DISTINCT 97 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
97

query I rowsort
SELECT DISTINCT - tab2.col1 + + col1 * 88 FROM tab2 GROUP BY col1
----
3567
5133
5307

query I rowsort
SELECT DISTINCT col2 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

query I rowsort
SELECT DISTINCT + + col2 + + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT - + 0 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL + - tab2.col0 + + tab2.col0 * - 59 FROM tab2 GROUP BY tab2.col0
----
-5460
-5520
-900

query I rowsort
SELECT - 88 AS col1 FROM tab1 GROUP BY tab1.col0
----
-88
-88
-88

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4552
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4552
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 73 + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
118
144
81

query I rowsort
SELECT - cor0.col2 * 15 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-112
-630
-994

query I rowsort
SELECT - - 93 AS col2 FROM tab1 GROUP BY tab1.col2
----
93
93
93

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4556
SELECT + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4556
SELECT + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 64 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
64

query I rowsort
SELECT DISTINCT + cor0.col1 * - cor0.col1 FROM tab1 cor0 GROUP BY col1, cor0.col0
----
-1936
-3249
-36

query I rowsort
SELECT col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - + 82 FROM tab2 GROUP BY col0
----
-82
-82
-82

query I rowsort
SELECT - 39 AS col0 FROM tab1 GROUP BY tab1.col1
----
-39
-39
-39

query I rowsort
SELECT ALL tab0.col1 * tab0.col1 - + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6480

query I rowsort
SELECT - cor0.col1 + COALESCE ( ( col1 ), - col0 ) * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1722
-3540
-3782

query I rowsort
SELECT + - 60 FROM tab0 GROUP BY tab0.col1
----
-60
-60

query I rowsort
SELECT ALL - 58 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-58
-58
-58

query I rowsort
SELECT ALL col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL col1 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT cor0.col0 - + 12 FROM tab0 AS cor0 GROUP BY col2, cor0.col0, cor0.col1
----
14
31
71

onlyif mysql # DIV for integer division: 
query I rowsort label-4569
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-4569
SELECT + tab2.col2 / + tab2.col2 + + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
59
80
88

query I rowsort
SELECT DISTINCT - 67 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-67

query I rowsort
SELECT ALL - 5 - + cor0.col0 * + 65 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1695
-2800
-5400

query I rowsort
SELECT col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
22
28
82

query I rowsort
SELECT ALL + 13 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
13
13
13

query I rowsort
SELECT ALL - + 32 * - col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1376
2656
832

query I rowsort
SELECT 78 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT - 80 FROM tab0 AS cor0 GROUP BY col0
----
-80
-80
-80

query I rowsort
SELECT - 28 AS col0 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
-28
-28
-28

query I rowsort
SELECT + 13 FROM tab1 GROUP BY col0
----
13
13
13

query I rowsort
SELECT 74 FROM tab0 GROUP BY tab0.col2
----
74
74
74

query I rowsort
SELECT ALL - 69 AS col0 FROM tab1 GROUP BY tab1.col1
----
-69
-69
-69

query I rowsort
SELECT DISTINCT + + 12 AS col2 FROM tab1 GROUP BY col0
----
12

query I rowsort
SELECT 79 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
79
79
79

query I rowsort
SELECT DISTINCT - 79 FROM tab0 cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
-79

query I rowsort
SELECT - - 20 AS col2 FROM tab1 GROUP BY tab1.col1
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * 19 + + cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1140
120
880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 col2 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL IS NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-4587
SELECT - 88 DIV + tab2.col2 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
57
78
86

skipif mysql # not compatible
query I rowsort label-4587
SELECT - 88 / + tab2.col2 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
57
78
86

query I rowsort
SELECT - - CASE ( tab2.col0 ) WHEN tab2.col0 THEN tab2.col0 END * - 47 FROM tab2 GROUP BY tab2.col0
----
-4277
-4324
-705

query I rowsort
SELECT DISTINCT + 20 FROM tab2 GROUP BY tab2.col2
----
20

query I rowsort
SELECT DISTINCT - ( 51 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
-51

query I rowsort
SELECT DISTINCT + 31 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
31

query I rowsort
SELECT ALL NULLIF ( + 18, + 42 ) * col1 FROM tab0 AS cor0 GROUP BY col1
----
0
1458

query I rowsort
SELECT + - tab0.col2 * - 36 FROM tab0 GROUP BY tab0.col2
----
1368
2844
864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 88 + 22 col0 FROM tab0 GROUP BY tab0.col2
----
110
110
110

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 70 ) + cor0.col1 * cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-70
-70
1874

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT 3 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3

query I rowsort
SELECT tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT 57 + 21 FROM tab0 GROUP BY col2
----
78
78
78

query I rowsort
SELECT - tab1.col2 + + tab1.col2 * tab1.col2 FROM tab1 GROUP BY col2
----
1980
4970
56

query I rowsort
SELECT DISTINCT + 67 AS col0 FROM tab2 GROUP BY tab2.col2
----
67

query I rowsort
SELECT + 48 FROM tab2 cor0 GROUP BY cor0.col2
----
48
48
48

query I rowsort
SELECT - 54 + - tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-145
-146
-69

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - 75, + cor0.col0 + + cor0.col0 * cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
75
75
75

query I rowsort
SELECT + + tab0.col2 * col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT 29 FROM tab0 GROUP BY tab0.col1
----
29
29

query I rowsort
SELECT DISTINCT + cor0.col1 - - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
126
28
85

query I rowsort
SELECT ALL - 79 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-79
-79
-79

query I rowsort
SELECT ALL - 62 AS col2 FROM tab1 GROUP BY tab1.col2
----
-62
-62
-62

query I rowsort
SELECT - 84 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-84
-84
-84

query I rowsort
SELECT - col2 + cor0.col2 * 22 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1491
168
945

query I rowsort
SELECT ALL + 42 AS col0 FROM tab0 GROUP BY tab0.col1
----
42
42

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4613
SELECT - + CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4613
SELECT - + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - - tab2.col2 - 43 FROM tab2 GROUP BY tab2.col2
----
15
36
44

query I rowsort
SELECT 68 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
68
68
68

query I rowsort
SELECT + 41 AS col2 FROM tab2 GROUP BY tab2.col1
----
41
41
41

onlyif mysql # DIV for integer division: 
query I rowsort label-4617
SELECT - + col0 DIV - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4617
SELECT - + col0 / - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT DISTINCT 48 * 80 FROM tab2 GROUP BY tab2.col1
----
3840

query I rowsort
SELECT tab2.col0 * - 35 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-3276
-3312
-540

query I rowsort
SELECT 42 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-37
18
4

query I rowsort
SELECT ALL ( - cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + tab0.col1 FROM tab0 WHERE tab0.col1 + - col2 IS NOT NULL GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT 24 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
24

query I rowsort
SELECT DISTINCT 89 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col2, col1
----
3916
5073
534

query I rowsort
SELECT DISTINCT - 37 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-37

query I rowsort
SELECT ALL + cor0.col1 + 53 * - 15 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
-714
-795

query I rowsort
SELECT - - col2 * col2 + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2070
5112
72

query I rowsort
SELECT - cor0.col0 + 12 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-10
-16
-70

query I rowsort
SELECT col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - cor0.col2 * + 90 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-5220
-7110
-7830

query I rowsort
SELECT ALL tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0 HAVING NULL <= NULL
----

query I rowsort
SELECT ALL - tab1.col0 * - tab1.col0 + + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
506
6806
812

query I rowsort
SELECT - cor0.col2 + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 54 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
54

query I rowsort
SELECT DISTINCT + 2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT DISTINCT - tab1.col0 * + tab1.col0 + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-506
-6806
-812

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT - 51 AS col0 FROM tab2 GROUP BY col2
----
-51
-51
-51

query I rowsort
SELECT DISTINCT - NULLIF ( - col0, 41 ) AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-4641
SELECT ALL - 81 DIV - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
2
3

skipif mysql # not compatible
query I rowsort label-4641
SELECT ALL - 81 / - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
2
3

query I rowsort
SELECT DISTINCT + + 94 FROM tab1 GROUP BY tab1.col0
----
94

query I rowsort
SELECT - tab2.col1 * 68 AS col0 FROM tab2 GROUP BY tab2.col1
----
-2788
-4012
-4148

query I rowsort
SELECT 39 * - 62 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-2418
-2418
-2418

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * - cor0.col2 col1 FROM tab0 cor0 GROUP BY cor0.col1, col2
----
1444
576
6241

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
0
81

query I rowsort
SELECT ( + cor0.col0 ) + + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
182
184
30

query I rowsort
SELECT 2 - cor0.col1 * col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-1942
2
2

query I rowsort
SELECT DISTINCT - - 75 AS col2 FROM tab0 GROUP BY tab0.col2
----
75

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4651
SELECT DISTINCT CAST( NULL AS DECIMAL ) - - 31 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-4651
SELECT DISTINCT CAST ( NULL AS REAL ) - - 31 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT - cor0.col2 + - col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-102
-115
-14

query I rowsort
SELECT DISTINCT + cor0.col1 * + 22 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
0
1782

query I rowsort
SELECT ALL + 89 FROM tab2 cor0 GROUP BY cor0.col2
----
89
89
89

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
15
91
92

query I rowsort
SELECT ALL + 14 FROM tab2 AS cor0 GROUP BY cor0.col1
----
14
14
14

query I rowsort
SELECT 64 * 33 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
2112
2112
2112

query I rowsort
SELECT - 2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-2
-2
-2

query I rowsort
SELECT ALL - 95 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-95
-95
-95

query I rowsort
SELECT ( cor0.col1 ) * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT + cor0.col0 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
164
44
56

query I rowsort
SELECT 86 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
86
86
86

query I rowsort
SELECT DISTINCT 20 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
20

query I rowsort
SELECT - cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT - + 16 FROM tab2 GROUP BY tab2.col1
----
-16

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT - cor0.col1 - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-162
0

query I rowsort
SELECT DISTINCT + 28 AS col0 FROM tab2 GROUP BY col1
----
28

query I rowsort
SELECT DISTINCT - 41 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-41

query I rowsort
SELECT + 79 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
79
79
79

query I rowsort
SELECT DISTINCT + cor0.col0 + 32 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
115
58
75

query I rowsort
SELECT - 95 * col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-2280
-3610
-7505

query I rowsort
SELECT DISTINCT + 57 FROM tab0 GROUP BY col2
----
57

query I rowsort
SELECT + 27 FROM tab0 AS cor0 GROUP BY cor0.col2
----
27
27
27

query I rowsort
SELECT ALL + + 72 AS col1 FROM tab1 GROUP BY col0
----
72
72
72

query I rowsort
SELECT + cor0.col2 - + cor0.col1 * + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-6537
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 18 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
18
18

query I rowsort
SELECT + 26 FROM tab1 GROUP BY tab1.col2
----
26
26
26

query I rowsort
SELECT ALL - cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-41
-59
-61

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, col2
----
15
91
92

query I rowsort
SELECT ALL + 43 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
43
43
43

query I rowsort
SELECT - - 16 FROM tab0 GROUP BY tab0.col0
----
16
16
16

query I rowsort
SELECT col1 + - 16 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-16
65

query I rowsort
SELECT tab2.col1 AS col0 FROM tab2 WHERE NOT tab2.col2 NOT IN ( + tab2.col2 ) GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + + 95 AS col0 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
95
95
95

query I rowsort
SELECT DISTINCT - - cor0.col1 + - 65 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-21
-59
-8

query I rowsort
SELECT DISTINCT col1 + 98 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
104
142
155

query I rowsort
SELECT DISTINCT - - 16 AS col0 FROM tab2 GROUP BY tab2.col1
----
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL + col1 * col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL - 6 + col2 FROM tab0 GROUP BY tab0.col2
----
18
32
73

query I rowsort
SELECT ALL - 83 FROM tab2 AS cor0 GROUP BY col0
----
-83
-83
-83

query I rowsort
SELECT ALL ( 35 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
35
35
35

query I rowsort
SELECT 75 FROM tab2 GROUP BY col2
----
75
75
75

query I rowsort
SELECT ALL cor0.col0 * - 94 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2444
-4042
-7802

query I rowsort
SELECT col0 * - 89 + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1936
-2464
-7216

query I rowsort
SELECT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-26
-43
-83

query I rowsort
SELECT - + 93 FROM tab1 GROUP BY col2
----
-93
-93
-93

query I rowsort
SELECT + + 77 + + 36 FROM tab2 GROUP BY tab2.col0
----
113
113
113

query I rowsort
SELECT DISTINCT 49 FROM tab1 AS cor0 GROUP BY cor0.col0
----
49

query I rowsort
SELECT DISTINCT 94 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
94

query I rowsort
SELECT - col0 * 86 FROM tab2 GROUP BY tab2.col0
----
-1290
-7826
-7912

query I rowsort
SELECT tab1.col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT 59 FROM tab2 GROUP BY tab2.col2
----
59
59
59

query I rowsort
SELECT DISTINCT - col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT ( NULL ) > + col1
----

query I rowsort
SELECT col0 FROM tab0 WHERE NOT NULL IS NULL GROUP BY col0
----

query I rowsort
SELECT DISTINCT 8 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
8

query I rowsort
SELECT DISTINCT 58 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, col1
----
58

query I rowsort
SELECT DISTINCT col1 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT + 29 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
110
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 55 col1 FROM tab1 GROUP BY tab1.col2
----
55
55
55

query I rowsort
SELECT DISTINCT 34 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
34

query I rowsort
SELECT + - 79 AS col0 FROM tab2 GROUP BY tab2.col0
----
-79
-79
-79

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
1681
3481
3721

query I rowsort
SELECT DISTINCT tab2.col2 + + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT + col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT 30 FROM tab2 GROUP BY tab2.col0
----
30

query I rowsort
SELECT DISTINCT - 27 FROM tab0 GROUP BY col2
----
-27

query I rowsort
SELECT 88 + 75 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
163
163
163

query I rowsort
SELECT 69 AS col2 FROM tab0 GROUP BY tab0.col1
----
69
69

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 6, 89, tab0.col1 * + 21 - + 28 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
6
6
6

query I rowsort
SELECT 76 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
76
76
76

onlyif mysql # DIV for integer division: 
query I rowsort label-4723
SELECT ALL + ( cor0.col1 ) DIV - cor0.col2 col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-3
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4723
SELECT ALL + ( cor0.col1 ) / - cor0.col2 col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-3
0
0

query I rowsort
SELECT DISTINCT - col1 + - 10 FROM tab2 GROUP BY tab2.col1
----
-51
-69
-71

query I rowsort
SELECT DISTINCT + 56 FROM tab1 GROUP BY tab1.col1
----
56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4726
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-4726
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL + NULLIF ( cor0.col0, + col2 ) * - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1032
-2054
-3154

query I rowsort
SELECT DISTINCT + 10 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
10

query I rowsort
SELECT 6 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-18
-32
-73

query I rowsort
SELECT 93 + 62 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
155
155
155

query I rowsort
SELECT + cor0.col1 + - col1 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1640
-3422
-3660

query I rowsort
SELECT - 21 + - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-112
-113
-36

query I rowsort
SELECT DISTINCT tab1.col1 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT - + tab1.col1 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
-44
-57
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4735
SELECT CAST( - 84 AS SIGNED ) + - 5 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-89
-89
-89

skipif mysql # not compatible
query I rowsort label-4735
SELECT CAST ( - 84 AS INTEGER ) + - 5 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-89
-89
-89

query I rowsort
SELECT cor0.col1 * + 37 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
1517
2183
2257

query I rowsort
SELECT ALL 79 + - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
22
35
73

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 34 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
34

query I rowsort
SELECT DISTINCT tab1.col2 * + col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT ALL 8 FROM tab0 cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT ALL - 83 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-83
-83
-83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4743
SELECT DISTINCT CAST( NULL AS SIGNED ) * - cor0.col0 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-4743
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - cor0.col0 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
NULL

query I rowsort
SELECT ALL - + 72 FROM tab2 GROUP BY tab2.col0
----
-72
-72
-72

query I rowsort
SELECT ALL 42 - + 26 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
16
16

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1 cor0 GROUP BY col1, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + tab2.col2 * 99 FROM tab2 GROUP BY col2
----
5742
7821
8613

query I rowsort
SELECT + tab2.col1 * 6 FROM tab2 GROUP BY tab2.col1
----
246
354
366

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-4750
SELECT DISTINCT - tab0.col0 DIV tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
-1

skipif mysql # not compatible
query I rowsort label-4750
SELECT DISTINCT - tab0.col0 / tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
-1

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT - - tab1.col2 * - ( + 26 ) FROM tab1 GROUP BY tab1.col2
----
-1170
-1846
-208

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col2 * cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-1980
-4970
-56

onlyif mysql # DIV for integer division: 
query I rowsort label-4754
SELECT cor0.col0 DIV cor0.col0 + col0 * 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1121
3281
881

skipif mysql # not compatible
query I rowsort label-4754
SELECT cor0.col0 / cor0.col0 + col0 * 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1121
3281
881

onlyif mysql # DIV for integer division: 
query I rowsort label-4755
SELECT 49 + 46 DIV col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
49
49
52

skipif mysql # not compatible
query I rowsort label-4755
SELECT 49 + 46 / col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
49
49
52

query I rowsort
SELECT ALL + 51 FROM tab2 AS cor0 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT DISTINCT - tab0.col2 + 72 FROM tab0 GROUP BY col2
----
-7
34
48

query I rowsort
SELECT 2 FROM tab0 GROUP BY tab0.col1
----
2
2

query I rowsort
SELECT ALL + col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
0
0
81

query I rowsort
SELECT DISTINCT 75 + - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
30
4
67

query I rowsort
SELECT tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT + col1 * - col1 <> tab1.col1
----

query I rowsort
SELECT + 86 * cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
1290
7826
7912

onlyif mysql # DIV for integer division: 
query I rowsort label-4763
SELECT cor0.col0 DIV cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4763
SELECT cor0.col0 / cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT 56 * - col0 FROM tab1 GROUP BY tab1.col0
----
-1232
-1568
-4592

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 52, cor0.col2 * cor0.col1 ) * cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
3016
4108
4524

query I rowsort
SELECT DISTINCT 28 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
28

query I rowsort
SELECT + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-4768
SELECT 22 DIV - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4768
SELECT 22 / - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col1 + + 36 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1517
2183
2257

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 - - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
114
12
88

query I rowsort
SELECT ALL + col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT DISTINCT - 53 AS col1 FROM tab1 GROUP BY tab1.col2
----
-53

query I rowsort
SELECT ALL - cor0.col2 - 52 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-123
-60
-97

query I rowsort
SELECT - 88 * col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1320
-8008
-8096

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4776
SELECT CAST( NULL AS SIGNED ) col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4776
SELECT CAST ( NULL AS INTEGER ) col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col0 + 19 FROM tab0 AS cor0 GROUP BY cor0.col0
----
102
45
62

query I rowsort
SELECT - 62 FROM tab2 cor0 GROUP BY cor0.col0
----
-62
-62
-62

query I rowsort
SELECT ALL + ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
44
57
6

query I rowsort
SELECT ALL 32 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
2592

query I rowsort
SELECT DISTINCT + + 53 FROM tab2 GROUP BY tab2.col0
----
53

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4782
SELECT cor0.col0 + CAST( NULL AS SIGNED ) FROM tab0 cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4782
SELECT cor0.col0 + CAST ( NULL AS INTEGER ) FROM tab0 cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 92 col1 FROM tab2 GROUP BY tab2.col2
----
-92
-92
-92

query I rowsort
SELECT 42 FROM tab2 cor0 GROUP BY cor0.col2
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + - 2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-10
-47
-73

query I rowsort
SELECT - 31 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-31
-31
-31

onlyif mysql # DIV for integer division: 
query I rowsort label-4787
SELECT cor0.col2 + cor0.col2 DIV 29 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
39
81

skipif mysql # not compatible
query I rowsort label-4787
SELECT cor0.col2 + cor0.col2 / 29 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
39
81

query I rowsort
SELECT 38 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
38
38
38

query I rowsort
SELECT + tab1.col1 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT - tab2.col0 + - col0 FROM tab2 GROUP BY col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING - col2 IS NOT NULL
----
58
79
87

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT col2 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - 42 FROM tab0 GROUP BY col1
----
-42
-42

query I rowsort
SELECT DISTINCT + 78 AS col1 FROM tab1 GROUP BY tab1.col0
----
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 95 col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
95
95
95

query I rowsort
SELECT + 38 AS col1 FROM tab1 GROUP BY tab1.col0
----
38
38
38

query I rowsort
SELECT - 16 FROM tab0 GROUP BY tab0.col0
----
-16
-16
-16

query I rowsort
SELECT DISTINCT + 62 - + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-20
34
40

query I rowsort
SELECT - cor0.col1 * 14 FROM tab2 AS cor0 GROUP BY col1
----
-574
-826
-854

query I rowsort
SELECT cor0.col1 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3483

query I rowsort
SELECT 93 FROM tab0 cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT - 27 FROM tab1 GROUP BY tab1.col1
----
-27
-27
-27

query I rowsort
SELECT + + 28 FROM tab1 GROUP BY tab1.col1
----
28
28
28

query I rowsort
SELECT DISTINCT cor0.col1 + 98 FROM tab0 AS cor0 GROUP BY col1
----
179
98

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 33 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
33

query I rowsort
SELECT ALL cor0.col1 * + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT 45 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT ALL cor0.col0 * 60 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
1560
2580
4980

query I rowsort
SELECT DISTINCT - 66 FROM tab1 GROUP BY tab1.col2
----
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 65 col2 FROM tab0 GROUP BY tab0.col1
----
65
65

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col1 FROM tab2 cor0 GROUP BY col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * - cor0.col2 - - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
-1920
38
79

query I rowsort
SELECT + 61 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-2501
-3599
-3721

query I rowsort
SELECT + ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + 76 - col0 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-6
48
54

onlyif mysql # DIV for integer division: 
query I rowsort label-4819
SELECT DISTINCT + tab1.col2 DIV - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1

skipif mysql # not compatible
query I rowsort label-4819
SELECT DISTINCT + tab1.col2 / - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-4820
SELECT + + tab0.col0 DIV - 52 FROM tab0 GROUP BY col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4820
SELECT + + tab0.col0 / - 52 FROM tab0 GROUP BY col0
----
-1
0
0

query I rowsort
SELECT 64 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
64
64
64

query I rowsort
SELECT ALL - cor0.col2 * - 77 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2, cor0.col1
----
1848
2926
6083

query I rowsort
SELECT DISTINCT + ( col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT DISTINCT - - 74 + + cor0.col0 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
102
156
96

query I rowsort
SELECT ALL - cor0.col2 + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
-53
19
45

query I rowsort
SELECT - - 68 FROM tab1 GROUP BY col0
----
68
68
68

query I rowsort
SELECT col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
3364
6241
7569

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
44
57
6

query I rowsort
SELECT + 32 * 26 FROM tab1 GROUP BY col1
----
832
832
832

query I rowsort
SELECT DISTINCT 14 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
14

query I rowsort
SELECT 48 * 96 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
4608
4608
4608

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 86 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
86
86

query I rowsort
SELECT ALL tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1 HAVING ( NULL ) IS NULL OR NULL IS NULL
----
41
59
61

query I rowsort
SELECT ALL ( + CASE + 28 WHEN - tab2.col1 * col1 THEN + tab2.col1 WHEN - tab2.col1 THEN NULL END ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 23 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
29
67
80

query I rowsort
SELECT DISTINCT 98 AS col2 FROM tab1 GROUP BY tab1.col2
----
98

query I rowsort
SELECT DISTINCT - cor0.col1 - - 27 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-17
-30
21

onlyif mysql # DIV for integer division: 
query I rowsort label-4838
SELECT 87 DIV - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-4838
SELECT 87 / - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-2
-3

query I rowsort
SELECT ALL + 30 + + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
109
54
68

query I rowsort
SELECT DISTINCT 73 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
3212
4161
438

query I rowsort
SELECT 19 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1501
-456
-722

query I rowsort
SELECT + ( 12 ) FROM tab0 GROUP BY tab0.col1
----
12
12

query I rowsort
SELECT + 99 AS col2 FROM tab2 GROUP BY tab2.col1
----
99
99
99

onlyif mysql # DIV for integer division: 
query I rowsort label-4844
SELECT DISTINCT + + 24 DIV + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0

skipif mysql # not compatible
query I rowsort label-4844
SELECT DISTINCT + + 24 / + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT - 40 * 79 FROM tab1 GROUP BY tab1.col1
----
-3160
-3160
-3160

query I rowsort
SELECT ALL + cor0.col1 * 34 FROM tab0 cor0 GROUP BY cor0.col1
----
0
2754

query I rowsort
SELECT + tab2.col0 + + tab2.col0 * - col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-210
-8190
-8372

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT COALESCE ( - 9, + col0 ) * ( + 73 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-657

query I rowsort
SELECT ALL + tab1.col0 * + 10 FROM tab1 GROUP BY tab1.col0
----
220
280
820

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 69 col0 FROM tab1 GROUP BY tab1.col1
----
69
69
69

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL ( + 44 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT - 38 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-38
-38
-38

onlyif mysql # DIV for integer division: 
query I rowsort label-4857
SELECT DISTINCT + tab2.col2 DIV - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-1

skipif mysql # not compatible
query I rowsort label-4857
SELECT DISTINCT + tab2.col2 / - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-1

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
3272
6150
7554

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - col1 * cor0.col1 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1640
-3422
-3660

onlyif mysql # DIV for integer division: 
query I rowsort label-4861
SELECT DISTINCT cor0.col2 DIV col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
3

skipif mysql # not compatible
query I rowsort label-4861
SELECT DISTINCT cor0.col2 / col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
3

query I rowsort
SELECT DISTINCT + 76 + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
120
133
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 23 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT + 69 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
69
69
69

query I rowsort
SELECT 6 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
6
6
6

query I rowsort
SELECT + cor0.col2 * - NULLIF ( cor0.col2, + 89 ) FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-3364
-6241
-7569

query I rowsort
SELECT + 35 AS col1 FROM tab2 GROUP BY tab2.col0
----
35
35
35

query I rowsort
SELECT cor0.col2 * - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT 45 AS col2 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
45
45
45

query I rowsort
SELECT + 28 * + 92 FROM tab1 GROUP BY tab1.col1
----
2576
2576
2576

query I rowsort
SELECT ALL + 80 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT ALL cor0.col1 + - cor0.col1 * 34 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1353
-1947
-2013

query I rowsort
SELECT + tab0.col1 + - 11 AS col2 FROM tab0 GROUP BY tab0.col1
----
-11
70

query I rowsort
SELECT ALL - col2 * col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-1260
-176
-5822

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4875
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-4875
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY col2
----
NULL

query I rowsort
SELECT ALL 2 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
24
30
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 68 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT ALL cor0.col0 * 6 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
546
552
90

query I rowsort
SELECT ALL + - ( tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + cor0.col0 * cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT COALESCE ( tab0.col0, + tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
26
43
83

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4882
SELECT DISTINCT - + tab2.col2 * CAST( NULL AS DECIMAL ) AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-4882
SELECT DISTINCT - + tab2.col2 * CAST ( NULL AS REAL ) AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT - ( - 36 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT DISTINCT + + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 86 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
86
86
86

query I rowsort
SELECT ALL cor0.col1 + + col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
162

query I rowsort
SELECT DISTINCT + 90 FROM tab1 GROUP BY tab1.col2
----
90

query I rowsort
SELECT + 85 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3825
6035
680

query I rowsort
SELECT ALL 1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1
1
1

query I rowsort
SELECT ALL 10 FROM tab2 GROUP BY col1
----
10
10
10

query I rowsort
SELECT ALL + - 64 AS col2 FROM tab1 GROUP BY tab1.col0
----
-64
-64
-64

query I rowsort
SELECT ALL - - ( - tab2.col2 ) * + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 16 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
16
16
16

query I rowsort
SELECT + 36 AS col1 FROM tab1 GROUP BY tab1.col0
----
36
36
36

query I rowsort
SELECT DISTINCT - 99 AS col0 FROM tab1 GROUP BY tab1.col2
----
-99

query I rowsort
SELECT ALL 7 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
7
7
7

query I rowsort
SELECT ALL 25 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT DISTINCT - 99 FROM tab2 AS cor0 GROUP BY col1
----
-99

query I rowsort
SELECT ALL - ( 84 ) * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1848
-2352
-6888

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 DISTINCT - cor0.col2 + - cor1.col2 AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col2, cor0.col0
----
-103
-117
-158
-48
-62
-76

query I rowsort
SELECT DISTINCT - col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT cor0.col2 * ( - cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1944
0

query I rowsort
SELECT ALL - ( + 39 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-39
-39
-39

query I rowsort
SELECT + cor0.col0 + - col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-29
16
38

query I rowsort
SELECT 85 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
85
85
85

query I rowsort
SELECT 91 AS col2 FROM tab0 GROUP BY tab0.col1
----
91
91

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * - 59 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1534
-2537
-4897

onlyif mysql # DIV for integer division: 
query I rowsort label-4911
SELECT - tab0.col0 DIV tab0.col0 + - 14 FROM tab0 GROUP BY tab0.col0
----
-15
-15
-15

skipif mysql # not compatible
query I rowsort label-4911
SELECT - tab0.col0 / tab0.col0 + - 14 FROM tab0 GROUP BY tab0.col0
----
-15
-15
-15

query I rowsort
SELECT ALL COALESCE ( + cor0.col1, + col1 ) FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT - 1 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
21
27
81

query I rowsort
SELECT DISTINCT - 15 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-1215
0

query I rowsort
SELECT - 34 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-34
-34
-34

query I rowsort
SELECT - 16 * + 30 FROM tab2 GROUP BY tab2.col2
----
-480
-480
-480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1936
3249
36

query I rowsort
SELECT - 80 AS col0 FROM tab2 GROUP BY tab2.col0
----
-80
-80
-80

query I rowsort
SELECT DISTINCT + 46 FROM tab2 AS cor0 GROUP BY col0
----
46

query I rowsort
SELECT ALL - 65 + col0 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1914
-6954
-741

query I rowsort
SELECT ALL cor0.col0 * 7 AS col1 FROM tab2 cor0 GROUP BY col1, cor0.col0
----
105
637
644

query I rowsort
SELECT ALL - col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col1 * 14 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0
0
1134

query I rowsort
SELECT DISTINCT - 20 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 col1 FROM tab2 AS cor0 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT + 43 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT DISTINCT + 1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
1

query I rowsort
SELECT ALL 25 * tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1975
600
950

query I rowsort
SELECT - 16 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-16
-16
-16

query I rowsort
SELECT + 4 FROM tab1 GROUP BY col2
----
4
4
4

query I rowsort
SELECT ALL + 14 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
36
42
96

query I rowsort
SELECT + tab0.col0 * 96 AS col2 FROM tab0 GROUP BY tab0.col0
----
2496
4128
7968

query I rowsort
SELECT ALL - 86 FROM tab0 GROUP BY col0
----
-86
-86
-86

onlyif mysql # DIV for integer division: 
query I rowsort label-4934
SELECT DISTINCT cor0.col2 + - 3 DIV - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

skipif mysql # not compatible
query I rowsort label-4934
SELECT DISTINCT cor0.col2 + - 3 / - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL - cor0.col1 * col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT - 85 + - 57 FROM tab2 GROUP BY tab2.col2
----
-142
-142
-142

query I rowsort
SELECT + tab0.col2 - + ( 33 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
-9
46
5

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
45
71
8

query I rowsort
SELECT - 17 FROM tab1 GROUP BY tab1.col0
----
-17
-17
-17

query I rowsort
SELECT ALL + 92 AS col0 FROM tab2 GROUP BY tab2.col2
----
92
92
92

query I rowsort
SELECT ALL 28 AS col1 FROM tab0 GROUP BY tab0.col2
----
28
28
28

query I rowsort
SELECT ALL 34 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
34
34
34

query I rowsort
SELECT ALL + tab2.col0 / tab2.col0 AS col2 FROM tab2 GROUP BY col0 HAVING NOT ( NULL ) BETWEEN col0 AND NULL
----

query I rowsort
SELECT + tab0.col2 FROM tab0 WHERE NULL = ( NULL ) GROUP BY tab0.col2
----

query I rowsort
SELECT - 74 FROM tab1 GROUP BY tab1.col1
----
-74
-74
-74

query I rowsort
SELECT - 35 + col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-35
46

query I rowsort
SELECT ALL ( + 93 ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
93
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * + cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2378
4661
5307

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 88 + tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
146
167
175

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 37 * + cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2997
0

query I rowsort
SELECT + 69 + + 97 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
166
166
166

onlyif mysql # DIV for integer division: 
query I rowsort label-4952
SELECT cor0.col2 DIV + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4952
SELECT cor0.col2 / + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT + 41 * - tab2.col0 + 61 FROM tab2 GROUP BY tab2.col0
----
-3670
-3711
-554

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, col0, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 88 FROM tab2 GROUP BY tab2.col1
----
88

query I rowsort
SELECT - + 87 FROM tab2 GROUP BY tab2.col2
----
-87
-87
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 17 col0 FROM tab0 GROUP BY tab0.col2
----
17

query I rowsort
SELECT ALL - 13 AS col0 FROM tab1 GROUP BY tab1.col2
----
-13
-13
-13

query I rowsort
SELECT + - 35 FROM tab2 GROUP BY col1
----
-35
-35
-35

query I rowsort
SELECT 63 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5103

query I rowsort
SELECT 46 AS col1 FROM tab1 AS cor0 GROUP BY cor0.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
----
-81
0

query I rowsort
SELECT cor0.col1 * - cor0.col1 - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-38
-6585
-79

query I rowsort
SELECT + 11 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
11
11
11

query I rowsort
SELECT ALL + + 18 - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-63
18

query I rowsort
SELECT col2 + - 59 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-21
-35
20

query I rowsort
SELECT DISTINCT - ( - 83 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
83

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT + 12 + col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
18
56
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab2.col0 + ( - 51 ) col0 FROM tab2 GROUP BY tab2.col0
----
-142
-143
-66

query I rowsort
SELECT DISTINCT + 51 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 52 col2 FROM tab2 GROUP BY tab2.col2
----
-52
-52
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 + - 12 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
46
67
75

query I rowsort
SELECT 74 FROM tab1 GROUP BY col1
----
74
74
74

query I rowsort
SELECT cor0.col2 - - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
102
115
14

query I rowsort
SELECT col1 * + tab1.col1 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT - cor0.col2 - - 26 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-19
-45
18

query I rowsort
SELECT + 44 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
101
50
88

query I rowsort
SELECT DISTINCT + 31 + 38 FROM tab2 cor0 GROUP BY cor0.col1
----
69

query I rowsort
SELECT DISTINCT + 78 AS col0 FROM tab0 GROUP BY tab0.col2
----
78

query I rowsort
SELECT - 16 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-16
-16
-16

query I rowsort
SELECT + 20 * + 78 FROM tab0 AS cor0 GROUP BY col0, col0
----
1560
1560
1560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 72 * 12 col1 FROM tab0 cor0 GROUP BY cor0.col2
----
864
864
864

onlyif mysql # DIV for integer division: 
query I rowsort label-4984
SELECT - ( + 25 ) + + 41 DIV - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-25
-25
-25

skipif mysql # not compatible
query I rowsort label-4984
SELECT - ( + 25 ) + + 41 / - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-25
-25
-25

query I rowsort
SELECT + 94 FROM tab2 GROUP BY tab2.col1
----
94
94
94

query I rowsort
SELECT DISTINCT 89 AS col0 FROM tab1 GROUP BY tab1.col1
----
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 59 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
59

query I rowsort
SELECT - - 0 FROM tab0 GROUP BY tab0.col2
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4989
SELECT ALL CAST( - 70 AS SIGNED ) FROM tab1 cor0 GROUP BY col0
----
-70
-70
-70

skipif mysql # not compatible
query I rowsort label-4989
SELECT ALL CAST ( - 70 AS INTEGER ) FROM tab1 cor0 GROUP BY col0
----
-70
-70
-70

query I rowsort
SELECT ALL + 10 + 98 AS col1 FROM tab2 GROUP BY tab2.col0
----
108
108
108

query I rowsort
SELECT DISTINCT - 64 + 83 FROM tab1 GROUP BY tab1.col0
----
19

onlyif mysql # DIV for integer division: 
query I rowsort label-4992
SELECT DISTINCT + 26 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-4992
SELECT DISTINCT + 26 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
1

query I rowsort
SELECT + 38 * + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
1064
3116
836

query I rowsort
SELECT + + 91 FROM tab2 GROUP BY tab2.col1
----
91
91
91

query I rowsort
SELECT DISTINCT - 75 FROM tab1 cor0 GROUP BY col1, cor0.col0, cor0.col1
----
-75

query I rowsort
SELECT - 23 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-23
-23
-23

query I rowsort
SELECT 43 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 32 col2 FROM tab1 GROUP BY col1
----
-32
-32
-32

query I rowsort
SELECT ALL 11 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
11
11
11

query I rowsort
SELECT DISTINCT - tab0.col1 * - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL >= - col0
----

query I rowsort
SELECT - ( - 70 ) - - col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
151
70

query I rowsort
SELECT DISTINCT - 42 + + cor0.col2 * + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1402
534
6199

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 + - col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + + 60 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
142
82
88

query I rowsort
SELECT - 16 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-16
-16
-16

query I rowsort
SELECT 35 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
35
35
35

query I rowsort
SELECT DISTINCT 43 AS col0 FROM tab1 GROUP BY tab1.col2
----
43

query I rowsort
SELECT + 82 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT + cor0.col2 * - 9 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-522
-711
-783

query I rowsort
SELECT DISTINCT + 45 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45

query I rowsort
SELECT DISTINCT - cor0.col1 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-114
-12
-88

query I rowsort
SELECT DISTINCT + col1 + + col1 FROM tab2 AS cor0 GROUP BY col1
----
118
122
82

query I rowsort
SELECT + 13 * - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-104
-585
-923

query I rowsort
SELECT DISTINCT 11 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
11

query I rowsort
SELECT 84 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
84
84
84

query I rowsort
SELECT DISTINCT + 8 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
8

query I rowsort
SELECT ALL - 68 AS col1 FROM tab0 GROUP BY tab0.col1
----
-68
-68

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5021
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5021
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-5022
SELECT - 41 DIV tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-5022
SELECT - 41 / tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-5
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5023
SELECT cor0.col1 + 96 DIV cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
22
46
58

skipif mysql # not compatible
query I rowsort label-5023
SELECT cor0.col1 + 96 / cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
22
46
58

query I rowsort
SELECT 1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT 43 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
43

query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
182
184
30

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col0 * ( + cor0.col0 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1873
6927
755

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 92 * + cor0.col2 + col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5394
7347
8091

query I rowsort
SELECT + cor0.col2 + + col2 * + 19 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1420
160
900

query I rowsort
SELECT DISTINCT 33 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1254
-2607
-792

query I rowsort
SELECT ALL cor1.col1 * cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
6561

query I rowsort
SELECT - ( + 28 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
-28
-28
-28

query I rowsort
SELECT ALL + 29 AS col1 FROM tab2 GROUP BY col2
----
29
29
29

onlyif mysql # DIV for integer division: 
query I rowsort label-5034
SELECT ALL - tab0.col0 + - 61 DIV 90 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif mysql # not compatible
query I rowsort label-5034
SELECT ALL - tab0.col0 + - 61 / 90 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT 27 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
27
27
27

query I rowsort
SELECT ALL + 60 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2640
-3420
-360

query I rowsort
SELECT - 19 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-19
-19
-19

onlyif mysql # DIV for integer division: 
query I rowsort label-5038
SELECT + tab1.col1 DIV tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5038
SELECT + tab1.col1 / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab2 WHERE NULL IS NOT NULL GROUP BY tab2.col0 HAVING NOT NULL < + tab2.col0
----

onlyif mysql # DIV for integer division: 
query I rowsort label-5040
SELECT DISTINCT + tab2.col0 * tab2.col0 + 89 DIV 55 FROM tab2 GROUP BY tab2.col0
----
226
8282
8465

skipif mysql # not compatible
query I rowsort label-5040
SELECT DISTINCT + tab2.col0 * tab2.col0 + 89 / 55 FROM tab2 GROUP BY tab2.col0
----
226
8282
8465

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 68 col1 FROM tab2 GROUP BY tab2.col2
----
-68
-68
-68

query I rowsort
SELECT DISTINCT + - tab2.col1 + - 54 FROM tab2 GROUP BY tab2.col1
----
-113
-115
-95

onlyif mysql # DIV for integer division: 
query I rowsort label-5043
SELECT + 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-5043
SELECT + cor0.col0 / - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT - 21 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-21
-21
-21

query I rowsort
SELECT tab0.col0 - - 22 FROM tab0 GROUP BY tab0.col0
----
105
48
65

query I rowsort
SELECT - 36 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-36
-36
-36

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
26
43
83

query I rowsort
SELECT 75 FROM tab2 AS cor0 GROUP BY cor0.col0
----
75
75
75

query I rowsort
SELECT + 36 + cor0.col1 * + 62 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
2578
3694
3818

query I rowsort
SELECT DISTINCT ( 50 ) * tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
2900
3950
4350

query I rowsort
SELECT + 59 AS col2 FROM tab2 GROUP BY tab2.col2
----
59
59
59

query I rowsort
SELECT ALL cor0.col2 * - ( 27 * col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-136107
-1728
-54675

query I rowsort
SELECT - - col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 62 FROM tab0 AS cor0 GROUP BY col2
----
-62

query I rowsort
SELECT DISTINCT cor0.col2 * 8 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
360
568
64

query I rowsort
SELECT ALL + cor0.col0 + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT - col0 - - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + 63 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
63

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + + COALESCE ( 65, tab2.col2 - - tab2.col2 ) AS col1 FROM tab2 GROUP BY col0
----
65
65
65

query I rowsort
SELECT DISTINCT + - 69 AS col0 FROM tab0 GROUP BY tab0.col1
----
-69

query I rowsort
SELECT DISTINCT - 1 * tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - + tab0.col1 * ( tab0.col1 ) AS col2 FROM tab0 GROUP BY col1
----
-6561
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5063
SELECT tab0.col1 DIV + 34 FROM tab0 GROUP BY tab0.col1
----
0
2

skipif mysql # not compatible
query I rowsort label-5063
SELECT tab0.col1 / + 34 FROM tab0 GROUP BY tab0.col1
----
0
2

query I rowsort
SELECT ALL 63 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
63
63
63

query I rowsort
SELECT ALL - 9 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-9
-9
-9

query I rowsort
SELECT - cor1.col0 * 81 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-2106
-3483
-6723

query I rowsort
SELECT + cor0.col1 * - ( - cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT + col0 + - 16 * - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1394
374
476

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5069
SELECT - CAST( 42 AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
-42
-42
-42

skipif mysql # not compatible
query I rowsort label-5069
SELECT - CAST ( 42 AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
-42
-42
-42

query I rowsort
SELECT tab0.col0 * 17 FROM tab0 GROUP BY tab0.col0
----
1411
442
731

query I rowsort
SELECT ALL - - tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - col2 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1, col0
----
-15
-91
-92

query I rowsort
SELECT - 49 * 3 AS col1 FROM tab1 GROUP BY tab1.col1
----
-147
-147
-147

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5076
SELECT DISTINCT + CAST( NULL AS SIGNED ) * + 85 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-5076
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * + 85 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL

query I rowsort
SELECT - 82 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-82
-82
-82

query I rowsort
SELECT DISTINCT 39 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
39

query I rowsort
SELECT DISTINCT 18 + 43 FROM tab1 AS cor0 GROUP BY cor0.col2
----
61

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - - 53 * + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
1166
1484
4346

query I rowsort
SELECT - + 86 FROM tab2 GROUP BY tab2.col2
----
-86
-86
-86

query I rowsort
SELECT DISTINCT + tab2.col2 + + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT DISTINCT + 0 * 30 AS col2 FROM tab0 GROUP BY tab0.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + COALESCE ( + 84, - tab2.col0 + + tab2.col0 ) col2 FROM tab2 GROUP BY tab2.col2
----
84
84
84

query I rowsort
SELECT DISTINCT + + 81 AS col2 FROM tab0 GROUP BY tab0.col1
----
81

query I rowsort
SELECT ALL 10 AS col1 FROM tab0 GROUP BY tab0.col1
----
10
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 col0 FROM tab1 WHERE NOT ( NULL ) IS NOT NULL GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT + col0 FROM tab0 GROUP BY tab0.col0 HAVING ( NULL ) IS NULL
----
26
43
83

query I rowsort
SELECT - 46 FROM tab2 GROUP BY tab2.col2
----
-46
-46
-46

query I rowsort
SELECT - 83 FROM tab2 GROUP BY col1
----
-83
-83
-83

query I rowsort
SELECT ALL 93 FROM tab2 GROUP BY col1
----
93
93
93

query I rowsort
SELECT cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col1, cor1.col0
----
9 values hashing to 559da8f454c4e5599b87319641a4f49a

query I rowsort
SELECT DISTINCT + cor0.col0 * + 56 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1232
1568
4592

query I rowsort
SELECT - + 68 AS col2 FROM tab1 GROUP BY tab1.col0
----
-68
-68
-68

query I rowsort
SELECT DISTINCT + 78 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
78

query I rowsort
SELECT DISTINCT col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col1 * 78 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3198
4602
4758

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + 7 AS col2 FROM tab2 GROUP BY tab2.col2
----
7
7
7

query I rowsort
SELECT + cor0.col2 * 5 FROM tab2 AS cor0 GROUP BY cor0.col2
----
290
395
435

query I rowsort
SELECT - tab2.col2 * - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + 2 - - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
46
59
8

query I rowsort
SELECT + 18 FROM tab1 AS cor0 GROUP BY cor0.col0
----
18
18
18

query I rowsort
SELECT ALL 26 + 6 FROM tab2 AS cor0 GROUP BY cor0.col2
----
32
32
32

query I rowsort
SELECT ALL + tab1.col2 + COALESCE ( + 26, - col2 ) FROM tab1 GROUP BY col2
----
34
71
97

query I rowsort
SELECT - cor0.col2 + - 68 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-113
-139
-76

query I rowsort
SELECT DISTINCT 56 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
56

query I rowsort
SELECT ALL 82 * - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1230
-7462
-7544

query I rowsort
SELECT DISTINCT - 90 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-90

query I rowsort
SELECT DISTINCT + col0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT - tab0.col0 * - tab0.col0 FROM tab0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT - 20 * cor1.col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-1640
-440
-560

onlyif mysql # DIV for integer division: 
query I rowsort label-5114
SELECT + tab2.col2 DIV 13 FROM tab2 GROUP BY tab2.col2
----
4
6
6

skipif mysql # not compatible
query I rowsort label-5114
SELECT + tab2.col2 / 13 FROM tab2 GROUP BY tab2.col2
----
4
6
6

query I rowsort
SELECT DISTINCT 8 AS col0 FROM tab0 GROUP BY tab0.col2
----
8

query I rowsort
SELECT + - 82 + - col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-140
-161
-169

query I rowsort
SELECT - 62 AS col0 FROM tab0 GROUP BY tab0.col1
----
-62
-62

onlyif mysql # DIV for integer division: 
query I rowsort label-5118
SELECT - NULLIF ( cor0.col1, cor0.col0 + cor0.col0 * + cor0.col1 ) DIV - 65 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5118
SELECT - NULLIF ( cor0.col1, cor0.col0 + cor0.col0 * + cor0.col1 ) / - 65 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 55 col1 FROM tab2 GROUP BY tab2.col0
----
-55

query I rowsort
SELECT DISTINCT + - 51 * + 89 FROM tab0 GROUP BY tab0.col0
----
-4539

query I rowsort
SELECT 30 + + 49 AS col1 FROM tab0 GROUP BY tab0.col2
----
79
79
79

query I rowsort
SELECT DISTINCT - ( + 23 ) * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1012
-1311
-138

query I rowsort
SELECT - 90 * tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1980
-2520
-7380

query I rowsort
SELECT ALL + 47 FROM tab0 GROUP BY tab0.col0
----
47
47
47

query I rowsort
SELECT DISTINCT + ( col0 ) FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - 45 AS col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
-45
-45
-45

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5127
SELECT ALL - col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5127
SELECT ALL - col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-5128
SELECT cor0.col2 DIV col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-23
-43
-83

skipif mysql # not compatible
query I rowsort label-5128
SELECT cor0.col2 / col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-23
-43
-83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5129
SELECT ALL - CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5129
SELECT ALL - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 92 AS col0 FROM tab1 GROUP BY tab1.col1
----
92

onlyif mysql # DIV for integer division: 
query I rowsort label-5131
SELECT - tab0.col0 - 27 DIV - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-25
-43
-83

skipif mysql # not compatible
query I rowsort label-5131
SELECT - tab0.col0 - 27 / - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-25
-43
-83

query I rowsort
SELECT ALL + 1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 99 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-99
-99
-99

query I rowsort
SELECT + 3 FROM tab1 cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT DISTINCT + 17 + + tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2042
5058
81

query I rowsort
SELECT ALL 18 - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-73
-74
3

query I rowsort
SELECT DISTINCT - + tab1.col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT 25 * + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
1450
1975
2175

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 38 col2 FROM tab0 GROUP BY tab0.col2
----
38
38
38

query I rowsort
SELECT - ( - 10 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
10
10
10

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 68, - cor0.col0 * cor0.col1, cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-68
-68
-68

onlyif mysql # DIV for integer division: 
query I rowsort label-5142
SELECT ALL - cor0.col2 DIV + 36 col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-1
-1
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5142
SELECT ALL - cor0.col2 / + 36 col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-1
-1
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5143
SELECT - col0 DIV + cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
25
42
82

skipif mysql # not compatible
query I rowsort label-5143
SELECT - col0 / + cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
25
42
82

query I rowsort
SELECT DISTINCT - 23 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
-23

query I rowsort
SELECT ALL 45 FROM tab1 AS cor0 GROUP BY cor0.col0
----
45
45
45

query I rowsort
SELECT ALL 50 FROM tab1 GROUP BY tab1.col1
----
50
50
50

query I rowsort
SELECT - NULLIF ( - cor0.col2, cor0.col2 ) * - 71 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4118
-5609
-6177

query I rowsort
SELECT 74 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3330
-5254
-592

query I rowsort
SELECT ALL 69 FROM tab2 AS cor0 GROUP BY cor0.col0
----
69
69
69

onlyif mysql # DIV for integer division: 
query I rowsort label-5150
SELECT - cor0.col2 DIV + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5150
SELECT - cor0.col2 / + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL - + 93 AS col0 FROM tab0 GROUP BY tab0.col1
----
-93
-93

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 88 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
88
88
88

query I rowsort
SELECT 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
38
38
38

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 + 80 FROM tab1 GROUP BY tab1.col1
----
80
80
80

query I rowsort
SELECT + 64 FROM tab0 GROUP BY tab0.col0
----
64
64
64

query I rowsort
SELECT ALL + 47 AS col2 FROM tab2 GROUP BY tab2.col1
----
47
47
47

query I rowsort
SELECT DISTINCT cor0.col0 - + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-46
32
51

query I rowsort
SELECT + 31 FROM tab1 AS cor0 GROUP BY cor0.col1
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 31 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-31

query I rowsort
SELECT 73 + 19 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
92
92
92

query I rowsort
SELECT DISTINCT - 75 + + 75 AS col2 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT - 54 AS col0 FROM tab1 GROUP BY tab1.col0
----
-54
-54
-54

query I rowsort
SELECT 6 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6
87

query I rowsort
SELECT + - 49 FROM tab2 GROUP BY tab2.col1
----
-49
-49
-49

query I rowsort
SELECT 91 FROM tab1 AS cor0 GROUP BY col2
----
91
91
91

query I rowsort
SELECT + - col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + cor0.col1 - + 96 * - 29 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, col0
----
2790
2828
2841

query I rowsort
SELECT - tab0.col1 * - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT + tab2.col0 FROM tab2 WHERE NOT tab2.col1 IN ( col0 + tab2.col2 / - tab2.col0 ) GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT 42 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
42
42
42

query I rowsort
SELECT NULLIF ( + cor0.col2, 35 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-5174
SELECT ALL 59 DIV - 50 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5174
SELECT ALL 59 / - 50 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT + 61 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
61
61
61

query I rowsort
SELECT + 87 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT 70 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
70
70
70

query I rowsort
SELECT 23 FROM tab2 AS cor0 GROUP BY cor0.col1
----
23
23
23

query I rowsort
SELECT cor0.col0 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
126
28
85

query I rowsort
SELECT - col0 + 49 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-33
21
27

query I rowsort
SELECT 2 + + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
24
30
84

query I rowsort
SELECT - 38 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-38
-38
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 39 col1 FROM tab0 cor0 GROUP BY cor0.col0
----
39
39
39

query I rowsort
SELECT DISTINCT + - 93 AS col2 FROM tab1 GROUP BY tab1.col2
----
-93

query I rowsort
SELECT - 53 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-53
-53
-53

query I rowsort
SELECT DISTINCT + 50 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
4550
4600
750

query I rowsort
SELECT DISTINCT + 85 AS col0 FROM tab0 GROUP BY tab0.col0
----
85

query I rowsort
SELECT cor0.col2 + - 25 * 68 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-1613
-1621
-1642

query I rowsort
SELECT ALL - 86 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-86
-86
-86

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - 89, + cor0.col1 ) FROM tab2 cor0 GROUP BY cor0.col2
----
89
89
89

query I rowsort
SELECT + 42 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
1890
2982
336

onlyif mysql # DIV for integer division: 
query I rowsort label-5192
SELECT ALL 27 DIV - cor0.col1 + + cor0.col1 * - 80 FROM tab1 cor0 GROUP BY col1
----
-3520
-4560
-484

skipif mysql # not compatible
query I rowsort label-5192
SELECT ALL 27 / - cor0.col1 + + cor0.col1 * - 80 FROM tab1 cor0 GROUP BY col1
----
-3520
-4560
-484

onlyif mysql # DIV for integer division: 
query I rowsort label-5193
SELECT ALL cor0.col1 DIV col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5193
SELECT ALL cor0.col1 / col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + - 41 + + col1 AS col1 FROM tab0 GROUP BY col1
----
-41
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + - 53 * + 93 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-4850
-4891
-4905

query I rowsort
SELECT + 98 * - cor0.col2 + + 68 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4342
-6890
-716

onlyif mysql # DIV for integer division: 
query I rowsort label-5198
SELECT - 15 DIV - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5198
SELECT - 15 / - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT + 60 * - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-2640
-3420
-360

query I rowsort
SELECT ALL + + ( - 43 ) * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1204
-3526
-946

query I rowsort
SELECT ALL + 68 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
68
68

query I rowsort
SELECT 52 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
52
52

query I rowsort
SELECT ALL 83 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4814
6557
7221

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 12 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT DISTINCT 35 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
35

onlyif mysql # DIV for integer division: 
query I rowsort label-5206
SELECT cor0.col1 * NULLIF ( + cor0.col0 DIV + cor0.col1, - col2 * cor0.col0 ) + + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
138
140
87

skipif mysql # not compatible
query I rowsort label-5206
SELECT cor0.col1 * NULLIF ( + cor0.col0 / + cor0.col1, - col2 * cor0.col0 ) + + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
138
140
87

query I rowsort
SELECT ( + tab0.col1 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT - 66 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-66
-66
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 + cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-16
-38
29

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT + + tab2.col1 * 48 AS col0 FROM tab2 GROUP BY tab2.col1
----
1968
2832
2928

onlyif mysql # DIV for integer division: 
query I rowsort label-5212
SELECT + tab2.col2 DIV - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5212
SELECT + tab2.col2 / - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT ALL + 17 AS col2 FROM tab2 GROUP BY tab2.col1
----
17
17
17

query I rowsort
SELECT - + tab0.col2 + 14 AS col1 FROM tab0 GROUP BY tab0.col2
----
-10
-24
-65

query I rowsort
SELECT + 90 AS col0 FROM tab1 GROUP BY tab1.col1
----
90
90
90

query I rowsort
SELECT cor1.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 40 * 66 FROM tab0 cor0 GROUP BY cor0.col1
----
-2640

query I rowsort
SELECT 40 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
40
40
40

query I rowsort
SELECT NULLIF ( tab1.col2, - 31 + 73 * 5 ) FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL 52 FROM tab0 AS cor0 GROUP BY cor0.col1
----
52
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col1 * tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
-6561
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 95 col2 FROM tab0 GROUP BY tab0.col1
----
-95
-95

query I rowsort
SELECT ALL - tab1.col1 * - tab1.col1 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - 41 + 98 FROM tab0 GROUP BY tab0.col1
----
57

query I rowsort
SELECT DISTINCT + 15 FROM tab0 GROUP BY tab0.col1
----
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 35 * + 98 col1 FROM tab2 GROUP BY tab2.col1
----
3430

query I rowsort
SELECT ALL + 68 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
68
68

query I rowsort
SELECT DISTINCT - cor0.col2 * 71 AS col0 FROM tab1 cor0 GROUP BY col2
----
-3195
-5041
-568

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5229
SELECT DISTINCT - CAST( NULL AS SIGNED ) * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
NULL

skipif mysql # not compatible
query I rowsort label-5229
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
NULL

query I rowsort
SELECT DISTINCT ( + 29 ) * + 78 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2262

query I rowsort
SELECT DISTINCT - + ( 22 ) FROM tab0 GROUP BY tab0.col0
----
-22

query I rowsort
SELECT ALL 22 - + tab2.col0 * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
247
8303
8486

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 89 + col0 col1 FROM tab0 GROUP BY tab0.col0
----
115
132
172

query I rowsort
SELECT - 42 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-42
-42
-42

query I rowsort
SELECT DISTINCT 39 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, col1
----
39

query I rowsort
SELECT ALL + 51 FROM tab2 GROUP BY tab2.col0
----
51
51
51

query I rowsort
SELECT ALL + 0 AS col2 FROM tab2 cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT ALL NULLIF ( 59, 14 ) FROM tab2 AS cor0 GROUP BY col0
----
59
59
59

query I rowsort
SELECT ALL 82 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT DISTINCT + tab2.col1 + ( 53 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
112
114
94

query I rowsort
SELECT ALL tab2.col0 * tab2.col0 + + 14 * - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
7007
7176

query I rowsort
SELECT DISTINCT + - tab0.col1 * - 51 + - 43 FROM tab0 GROUP BY col1
----
-43
4088

query I rowsort
SELECT DISTINCT 2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor0.col0, cor1.col0
----
2

query I rowsort
SELECT DISTINCT - 16 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-16

onlyif mysql # DIV for integer division: 
query I rowsort label-5245
SELECT 59 DIV - cor0.col2 + + cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
1
44
71

skipif mysql # not compatible
query I rowsort label-5245
SELECT 59 / - cor0.col2 + + cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
1
44
71

query I rowsort
SELECT + 34 AS col2 FROM tab0 GROUP BY tab0.col0
----
34
34
34

query I rowsort
SELECT ALL + 99 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT 22 AS col0 FROM tab2 GROUP BY tab2.col1
----
22
22
22

query I rowsort
SELECT - 22 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-22
-22

query I rowsort
SELECT - tab2.col1 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 95 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-95
-95

query I rowsort
SELECT ALL - 66 * - 76 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5016
5016
5016

query I rowsort
SELECT - - tab0.col2 * + 51 AS col0 FROM tab0 GROUP BY tab0.col2
----
1224
1938
4029

query I rowsort
SELECT + - tab2.col2 * 8 - 80 AS col0 FROM tab2 GROUP BY tab2.col2
----
-544
-712
-776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT - + 97 AS col1 FROM tab0 GROUP BY tab0.col0
----
-97
-97
-97

query I rowsort
SELECT DISTINCT + tab2.col0 + - 19 FROM tab2 GROUP BY tab2.col0
----
-4
72
73

query I rowsort
SELECT - - tab0.col2 * - tab0.col2 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT + 56 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
56
56
56

query I rowsort
SELECT DISTINCT - 43 FROM tab1 GROUP BY tab1.col0
----
-43

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 0, tab2.col1, tab2.col1, COALESCE ( tab2.col0, - NULLIF ( 19, + tab2.col1 - tab2.col1 ) * - CASE 45 WHEN tab2.col0 THEN - tab2.col0 END, col1 ) + - tab2.col1 ) FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL 86 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
86
86
86

query I rowsort
SELECT ALL - + tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT ALL 50 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
50
50
50

query I rowsort
SELECT tab0.col0 FROM tab0 WHERE NULL NOT IN ( + tab0.col0 * - tab0.col2 ) GROUP BY tab0.col0 HAVING NOT NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT - tab0.col2 AS col0 FROM tab0 GROUP BY col2 HAVING NULL > NULL
----

query I rowsort
SELECT - - 57 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
13
51

query I rowsort
SELECT + 34 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
34
34
34

query I rowsort
SELECT DISTINCT 68 * 62 AS col1 FROM tab1 GROUP BY tab1.col0
----
4216

query I rowsort
SELECT ALL + 24 AS col1 FROM tab0 GROUP BY tab0.col0
----
24
24
24

query I rowsort
SELECT DISTINCT 17 - + col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-28
-54
9

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5273
SELECT - CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5273
SELECT - CAST ( NULL AS REAL ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 * + tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT - + 2 FROM tab0 GROUP BY tab0.col1
----
-2

query I rowsort
SELECT DISTINCT + - 95 AS col2 FROM tab2 GROUP BY tab2.col1
----
-95

query I rowsort
SELECT - ( 19 ) + - col0 FROM tab1 GROUP BY tab1.col0
----
-101
-41
-47

query I rowsort
SELECT ALL col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
58
79
87

query I rowsort
SELECT + col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT + col2 + - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, col2
----
-12
-34
72

query I rowsort
SELECT - 43 + - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-100
-49
-87

query I rowsort
SELECT ALL cor0.col0 - cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, cor0.col2
----
-1997
-42
-4959

query I rowsort
SELECT DISTINCT - 60 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col2
----
-60

query I rowsort
SELECT DISTINCT - tab2.col1 + - 91 FROM tab2 GROUP BY tab2.col1
----
-132
-150
-152

onlyif mysql # DIV for integer division: 
query I rowsort label-5286
SELECT + cor0.col2 DIV - 73 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5286
SELECT + cor0.col2 / - 73 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL 49 * col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
2009
2891
2989

query I rowsort
SELECT ALL + 59 FROM tab0 AS cor0 GROUP BY cor0.col1
----
59
59

query I rowsort
SELECT ALL 35 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
35
35
35

query I rowsort
SELECT - tab1.col1 * 9 AS col0 FROM tab1 GROUP BY tab1.col1
----
-396
-513
-54

query I rowsort
SELECT DISTINCT 88 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 26 col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
26
26
26

query I rowsort
SELECT - 89 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
-2314
-3827
-7387

query I rowsort
SELECT DISTINCT cor0.col2 - - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
142
16
90

query I rowsort
SELECT + 61 AS col1 FROM tab1 GROUP BY tab1.col2
----
61
61
61

onlyif mysql # DIV for integer division: 
query I rowsort label-5296
SELECT DISTINCT - cor0.col0 DIV + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5296
SELECT DISTINCT - cor0.col0 / + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 38 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
38
38
38

query I rowsort
SELECT DISTINCT + 90 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
90

onlyif mysql # DIV for integer division: 
query I rowsort label-5299
SELECT 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-5299
SELECT tab1.col1 / + tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT + 67 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
67
67
67

query I rowsort
SELECT ALL + cor0.col1 + 15 * 78 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1211
1229
1231

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, col2
----
58
79
87

query I rowsort
SELECT ALL + 81 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT + 50 AS col0 FROM tab0 GROUP BY tab0.col2
----
50
50
50

query I rowsort
SELECT + 24 AS col2 FROM tab1 GROUP BY tab1.col2
----
24
24
24

query I rowsort
SELECT ALL - cor0.col0 * - 85 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1275
7735
7820

query I rowsort
SELECT DISTINCT + + 30 FROM tab1 GROUP BY tab1.col2
----
30

query I rowsort
SELECT + NULLIF ( tab1.col2, - tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT tab2.col0 AS col0 FROM tab2 WHERE ( col1 ) NOT IN ( tab2.col0 * + tab2.col1 - tab2.col2 ) GROUP BY tab2.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - - 30 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
101
38
75

query I rowsort
SELECT col2 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
17
20
26

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL 7 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
154
196
574

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 43 col2 FROM tab2 GROUP BY tab2.col2
----
43
43
43

query I rowsort
SELECT - 38 FROM tab1 GROUP BY tab1.col2
----
-38
-38
-38

query I rowsort
SELECT 88 - + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
45
5
62

query I rowsort
SELECT DISTINCT 58 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
58

query I rowsort
SELECT ALL + cor0.col1 + - 40 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
19
21

query I rowsort
SELECT DISTINCT - 88 - + cor0.col2 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3452
-6329
-7657

query I rowsort
SELECT tab1.col1 * tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT + - tab1.col2 * 18 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1207
-136
-765

query I rowsort
SELECT + ( 89 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
89
89
89

query I rowsort
SELECT ALL 75 AS col0 FROM tab1 GROUP BY tab1.col2
----
75
75
75

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5325
SELECT DISTINCT CAST( NULL AS SIGNED ) + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-5325
SELECT DISTINCT CAST ( NULL AS INTEGER ) + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
NULL

query I rowsort
SELECT ALL + tab0.col2 * 59 AS col0 FROM tab0 GROUP BY tab0.col2
----
1416
2242
4661

onlyif mysql # DIV for integer division: 
query I rowsort label-5327
SELECT ALL + + tab2.col2 DIV + 69 - + 32 AS col0 FROM tab2 GROUP BY tab2.col2
----
-31
-31
-32

skipif mysql # not compatible
query I rowsort label-5327
SELECT ALL + + tab2.col2 / + 69 - + 32 AS col0 FROM tab2 GROUP BY tab2.col2
----
-31
-31
-32

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5328
SELECT CAST( NULL AS SIGNED ) * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5328
SELECT CAST ( NULL AS INTEGER ) * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 76 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3420
5396
608

query I rowsort
SELECT + 68 - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3
23
60

query I rowsort
SELECT ALL 34 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
34
34
34

query I rowsort
SELECT - tab1.col2 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT - ( 15 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-15
-15
-15

query I rowsort
SELECT ALL - 74 - - 12 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-62
-62
-62

query I rowsort
SELECT DISTINCT cor0.col2 - + 43 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-19
-5
36

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5336
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-5336
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( 78 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
78

onlyif mysql # DIV for integer division: 
query I rowsort label-5338
SELECT - 98 DIV tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5338
SELECT - 98 / tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 - cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT - 97 FROM tab0 GROUP BY tab0.col0
----
-97
-97
-97

query I rowsort
SELECT ALL 46 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
46
46
46

onlyif mysql # DIV for integer division: 
query I rowsort label-5342
SELECT + tab2.col2 DIV tab2.col2 + col2 col0 FROM tab2 GROUP BY tab2.col2
----
59
80
88

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5342
SELECT + tab2.col2 / tab2.col2 + col2 col0 FROM tab2 GROUP BY tab2.col2
----
59
80
88

query I rowsort
SELECT 88 FROM tab1 cor0 GROUP BY cor0.col1
----
88
88
88

query I rowsort
SELECT ALL 28 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
28
28
28

query I rowsort
SELECT DISTINCT + 99 - + 27 * col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2034
-549
-927

query I rowsort
SELECT DISTINCT + + 16 * tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
704
912
96

query I rowsort
SELECT - col1 * 39 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3159
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5348
SELECT - 90 DIV - 49 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
1
1

skipif mysql # not compatible
query I rowsort label-5348
SELECT - 90 / - 49 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
1
1

query I rowsort
SELECT - ( 92 ) FROM tab1 GROUP BY tab1.col0
----
-92
-92
-92

query I rowsort
SELECT cor1.col2 + - cor1.col2 * 36 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-2030
-2765
-3045

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 42 * - tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
-1176
-3444
-924

query I rowsort
SELECT + 44 AS col2 FROM tab1 GROUP BY tab1.col2
----
44
44
44

query I rowsort
SELECT DISTINCT tab2.col1 + ( 31 ) * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1312
1888
1952

query I rowsort
SELECT ALL 23 * 80 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1840
1840
1840

query I rowsort
SELECT ALL + 98 FROM tab1 AS cor0 GROUP BY col2
----
98
98
98

query I rowsort
SELECT + tab1.col1 FROM tab1 WHERE NOT NULL NOT BETWEEN NULL AND NULL GROUP BY tab1.col1
----

query I rowsort
SELECT 91 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
136
162
99

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT + 39 + col2 FROM tab2 GROUP BY tab2.col2
----
118
126
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 29 col2 FROM tab2 GROUP BY tab2.col2
----
29
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 1 col1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT + 98 * - col1 + 77 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-14175
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 92, - col0 * 2 + + tab2.col0, tab2.col2 + + tab2.col2 ) FROM tab2 GROUP BY tab2.col0
----
-92
-92
-92

query I rowsort
SELECT + 48 FROM tab2 cor0 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT ALL - 20 + 49 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT COALESCE ( - tab1.col2, + tab1.col2 * + tab1.col2 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5367
SELECT - CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5367
SELECT - CAST ( NULL AS REAL ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 26 + 96 AS col1 FROM tab1 GROUP BY tab1.col0
----
122
122
122

query I rowsort
SELECT + 98 AS col0 FROM tab0 GROUP BY tab0.col0
----
98
98
98

query I rowsort
SELECT ALL + 49 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
49
49
49

query I rowsort
SELECT NULLIF ( 85, - cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
85
85
85

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
-24
-38
-79

query I rowsort
SELECT + 93 FROM tab2 GROUP BY col1
----
93
93
93

query I rowsort
SELECT cor1.col1 * cor1.col1 + 13 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
1949
3262
49

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + 3 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
3
3
3

query I rowsort
SELECT DISTINCT col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT + ( 99 ) * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4059
5841
6039

query I rowsort
SELECT - 87 AS col1 FROM tab1 GROUP BY tab1.col0
----
-87
-87
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-5380
SELECT - tab1.col0 DIV - 74 AS col0 FROM tab1 GROUP BY tab1.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5380
SELECT - tab1.col0 / - 74 AS col0 FROM tab1 GROUP BY tab1.col0
----
0
0
1

query I rowsort
SELECT DISTINCT - tab0.col1 * - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * + 27 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1188
1539
162

query I rowsort
SELECT 93 FROM tab1 cor0 GROUP BY cor0.col2
----
93
93
93

query I rowsort
SELECT - tab1.col2 + tab1.col2 * + 13 FROM tab1 GROUP BY tab1.col2
----
540
852
96

query I rowsort
SELECT ALL - 52 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-52
-52
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 91 * + 32 col1 FROM tab1 GROUP BY tab1.col2
----
-2912
-2912
-2912

query I rowsort
SELECT 37 AS col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
37
37
37

onlyif mysql # DIV for integer division: 
query I rowsort label-5388
SELECT - 75 DIV + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1
-1
-12

skipif mysql # not compatible
query I rowsort label-5388
SELECT - 75 / + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1
-1
-12

query I rowsort
SELECT + col0 * + col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT - 35 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-35

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5391
SELECT DISTINCT - CAST( NULL AS DECIMAL ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-5391
SELECT DISTINCT - CAST ( NULL AS REAL ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT DISTINCT ( cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
26
43
83

query I rowsort
SELECT ALL - 63 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
-63
-63

query I rowsort
SELECT ALL + - 35 + tab0.col0 * + 61 AS col1 FROM tab0 GROUP BY tab0.col0
----
1551
2588
5028

query I rowsort
SELECT DISTINCT + tab0.col1 * - tab0.col1 + tab0.col1 FROM tab0 GROUP BY col1
----
-6480
0

query I rowsort
SELECT DISTINCT 23 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
23

query I rowsort
SELECT - - 4 AS col2 FROM tab2 GROUP BY tab2.col1
----
4
4
4

query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
182
184
30

query I rowsort
SELECT ALL 90 AS col0 FROM tab2 GROUP BY tab2.col0
----
90
90
90

query I rowsort
SELECT DISTINCT - 16 FROM tab1 GROUP BY tab1.col0
----
-16

query I rowsort
SELECT - 42 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-16
1
41

query I rowsort
SELECT DISTINCT 57 AS col1 FROM tab2 cor0 GROUP BY col1
----
57

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5403
SELECT ALL - CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5403
SELECT ALL - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 23 ) col1 FROM tab1 GROUP BY tab1.col1
----
23
23
23

query I rowsort
SELECT + tab1.col2 + 86 FROM tab1 GROUP BY col2
----
131
157
94

query I rowsort
SELECT DISTINCT + 71 FROM tab0 GROUP BY tab0.col0
----
71

query I rowsort
SELECT - tab1.col0 * col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5408
SELECT - CAST( col1 AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

skipif mysql # not compatible
query I rowsort label-5408
SELECT - CAST ( col1 AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT - col1 + col0 * + 11 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
236
251
858

query I rowsort
SELECT ALL - cor0.col2 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-38
-79
57

query I rowsort
SELECT DISTINCT + 7 FROM tab2 GROUP BY tab2.col0
----
7

query I rowsort
SELECT DISTINCT 3 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3

query I rowsort
SELECT DISTINCT 22 AS col1 FROM tab2 GROUP BY tab2.col2
----
22

onlyif mysql # DIV for integer division: 
query I rowsort label-5414
SELECT 40 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5414
SELECT 40 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT DISTINCT - 9 FROM tab0 GROUP BY col1
----
-9

query I rowsort
SELECT ALL 81 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT DISTINCT - 45 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
-45

query I rowsort
SELECT ALL + 76 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
104
158
98

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5419
SELECT - tab0.col2 - - CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5419
SELECT - tab0.col2 - - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 * NULLIF ( + cor0.col1, - cor0.col2 * - cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
1936
3249
36

query I rowsort
SELECT + col1 - ( cor0.col0 + cor0.col0 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-120
-38
1

query I rowsort
SELECT DISTINCT tab0.col2 + + 98 AS col0 FROM tab0 GROUP BY tab0.col2
----
122
136
177

query I rowsort
SELECT DISTINCT - 81 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-81

query I rowsort
SELECT DISTINCT 10 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
10

query I rowsort
SELECT DISTINCT 95 FROM tab0 cor0 GROUP BY cor0.col2
----
95

onlyif mysql # DIV for integer division: 
query I rowsort label-5426
SELECT DISTINCT - cor0.col0 DIV cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1

skipif mysql # not compatible
query I rowsort label-5426
SELECT DISTINCT - cor0.col0 / cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1

query I rowsort
SELECT DISTINCT 44 - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-37
44

query I rowsort
SELECT + 32 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
32
32

query I rowsort
SELECT + cor0.col0 * + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
1032
2054
3154

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 91 + 77 FROM tab2 AS cor0 GROUP BY col0
----
168
168
168

query I rowsort
SELECT + 31 FROM tab1 AS cor0 GROUP BY cor0.col2
----
31
31
31

onlyif mysql # DIV for integer division: 
query I rowsort label-5433
SELECT + + tab0.col2 DIV - col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5433
SELECT + + tab0.col2 / - col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT DISTINCT - + 60 FROM tab1 GROUP BY tab1.col1
----
-60

query I rowsort
SELECT ALL - cor0.col0 * + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT tab1.col0 * + 22 FROM tab1 GROUP BY tab1.col0
----
1804
484
616

query I rowsort
SELECT DISTINCT - cor0.col0 * - 55 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1430
2365
4565

query I rowsort
SELECT 19 AS col2 FROM tab1 GROUP BY tab1.col2
----
19
19
19

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col2, cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT + col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + 61 AS col0 FROM tab2 GROUP BY tab2.col1
----
61
61
61

query I rowsort
SELECT DISTINCT + col1 FROM tab1 cor0 GROUP BY col0, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col0 + col0 FROM tab0 cor0 GROUP BY col0, col2
----
166
52
86

query I rowsort
SELECT tab2.col0 * tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
225
8281
8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 71 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
71
71
71

query I rowsort
SELECT ALL + - col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5448
SELECT ALL - tab0.col2 * CAST( NULL AS SIGNED ) col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5448
SELECT ALL - tab0.col2 * CAST ( NULL AS INTEGER ) col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 59 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
59
59
59

query I rowsort
SELECT + + 86 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
25
27
45

onlyif mysql # DIV for integer division: 
query I rowsort label-5451
SELECT - 0 DIV + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5451
SELECT - 0 / + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 48 col0 FROM tab2 GROUP BY tab2.col2
----
-48
-48
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col1 * col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
0
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 + + col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 91 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT DISTINCT ( - 5 ) + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
21
38
78

query I rowsort
SELECT + + 13 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-104
-585
-923

query I rowsort
SELECT DISTINCT - 89 AS col1 FROM tab0 GROUP BY tab0.col2
----
-89

query I rowsort
SELECT + + tab1.col1 - 58 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-14
-52

query I rowsort
SELECT ALL ( + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5462
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5462
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + + 47 FROM tab0 cor0 GROUP BY cor0.col0
----
-36
21
4

onlyif mysql # DIV for integer division: 
query I rowsort label-5464
SELECT cor0.col2 DIV + 22 FROM tab2 cor0 GROUP BY cor0.col2
----
2
3
3

skipif mysql # not compatible
query I rowsort label-5464
SELECT cor0.col2 / + 22 FROM tab2 cor0 GROUP BY cor0.col2
----
2
3
3

query I rowsort
SELECT + 13 AS col2 FROM tab0 GROUP BY tab0.col1
----
13
13

query I rowsort
SELECT ALL + 32 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + tab2.col1 * - col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL - 49 FROM tab0 GROUP BY col1
----
-49
-49

query I rowsort
SELECT ALL - 61 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-61
-61
-61

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + - tab1.col1 + COALESCE ( - 9, + tab1.col0 ) * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-440
-570
-60

query I rowsort
SELECT ALL + + 9 AS col2 FROM tab0 GROUP BY tab0.col2
----
9
9
9

query I rowsort
SELECT cor0.col0  FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 col2  FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL 47 AS col1  FROM tab2 GROUP BY tab2.col1
----
47
47
47

query I rowsort
SELECT - ( 32 ) * col0  FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2624
-704
-896

query I rowsort
SELECT DISTINCT + cor0.col1  FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT tab1.col2 - tab1.col2 AS col2  FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT cor0.col1  FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 93 AS col2  FROM tab1 GROUP BY tab1.col1
----
93
93
93

query I rowsort
SELECT - 95 * + 27  FROM tab0 GROUP BY tab0.col0
----
-2565
-2565
-2565

query I rowsort
SELECT DISTINCT - 85 AS col2  FROM tab0 AS cor0 GROUP BY cor0.col2
----
-85

query I rowsort
SELECT + 7 AS col1  FROM tab2 GROUP BY tab2.col0
----
7
7
7

query I rowsort
SELECT ALL cor0.col2 AS col1  FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 17  FROM tab2 cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT 92  FROM tab2 cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2  FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + 51  FROM tab0 GROUP BY tab0.col0
----
51

query I rowsort
SELECT - cor0.col1 AS col2  FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + cor0.col0  FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - + col2  FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - cor0.col1 + 1 * - cor0.col1 AS col1  FROM tab0 AS cor0 GROUP BY cor0.col1
----
-162
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5493
SELECT ALL + CAST( NULL AS SIGNED ) AS col2  FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5493
SELECT ALL + CAST ( NULL AS INTEGER ) AS col2  FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 63  FROM tab2 GROUP BY tab2.col2
----
63
63
63

query I rowsort
SELECT - cor0.col0 * + 84  FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-1260
-7644
-7728

query I rowsort
SELECT + - 58 AS col2  FROM tab2 GROUP BY tab2.col0
----
-58
-58
-58

query I rowsort
SELECT ALL - col0 AS col2  FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 64 * + cor0.col1 col1  FROM tab2 AS cor0 GROUP BY cor0.col1
----
2624
3776
3904

query I rowsort
SELECT DISTINCT + col1  FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - tab1.col2  FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + tab1.col0  FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT - + 86  FROM tab2 GROUP BY tab2.col0
----
-86
-86
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col1  FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + - 14  FROM tab1 GROUP BY tab1.col2
----
-14
-14
-14

query I rowsort
SELECT ALL + 22 AS col0  FROM tab2 GROUP BY tab2.col1
----
22
22
22

query I rowsort
SELECT 18 AS col2  FROM tab2 GROUP BY tab2.col0
----
18
18
18

query I rowsort
SELECT + cor0.col2  FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - col2  FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT cor0.col0  FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - tab0.col2  FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT 90  FROM tab1 AS cor0 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT tab1.col2  FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT - cor0.col2 AS col2  FROM tab2 AS cor0 GROUP BY col1, col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT tab0.col0 AS col1  FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - tab1.col0 + - tab1.col0  FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

query I rowsort
SELECT DISTINCT 19 AS col0  FROM tab2 cor0 GROUP BY cor0.col1
----
19

query I rowsort
SELECT DISTINCT 76  FROM tab2 AS cor0 GROUP BY col1
----
76

query I rowsort
SELECT DISTINCT + 32 AS col0  FROM tab1 AS cor0 GROUP BY cor0.col1
----
32

query I rowsort
SELECT - cor0.col2  FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 99 * cor0.col1 col1  FROM tab2 AS cor0 GROUP BY col1
----
4059
5841
6039

query I rowsort
SELECT DISTINCT - col2  FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL cor0.col1  FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + tab0.col2  FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - cor0.col1  FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT 66 AS col0  FROM tab0 GROUP BY tab0.col2
----
66
66
66

query I rowsort
SELECT + + tab0.col0 + tab0.col0 AS col2  FROM tab0 GROUP BY col0
----
166
52
86

onlyif mysql # DIV for integer division: 
query I rowsort label-5527
SELECT cor0.col0 DIV - 42 AS col2  FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-5527
SELECT cor0.col0 / - 42 AS col2  FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col0  FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, col1
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col2 AS col0  FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - tab1.col2  FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + cor0.col2 * + 55 + cor0.col2  FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
1344
2128
4424

query I rowsort
SELECT cor0.col1  FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
44
57
6

query I rowsort
SELECT tab1.col1  FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT tab0.col2 + - 94  FROM tab0 GROUP BY col2
----
-15
-56
-70

onlyif mysql # DIV for integer division: 
query I rowsort label-5535
SELECT + - tab1.col1 DIV tab1.col1 + - tab1.col1  FROM tab1 GROUP BY tab1.col1
----
-45
-58
-7

skipif mysql # not compatible
query I rowsort label-5535
SELECT + - tab1.col1 / tab1.col1 + - tab1.col1  FROM tab1 GROUP BY tab1.col1
----
-45
-58
-7

query I rowsort
SELECT 71 AS col0  FROM tab0 AS cor0 GROUP BY cor0.col1
----
71
71

query I rowsort
SELECT ALL cor0.col0 AS col0  FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col1 AS col1  FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - + 44  FROM tab1 GROUP BY tab1.col0
----
-44
-44
-44

query I rowsort
SELECT DISTINCT 57 AS col0  FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
57

query I rowsort
SELECT DISTINCT cor0.col2  FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - 65 AS col2  FROM tab2 AS cor0 GROUP BY cor0.col0
----
-65
-65
-65

query I rowsort
SELECT - cor0.col2 AS col1  FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - tab0.col1  FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT - cor0.col2  FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-5546
SELECT - cor0.col0 DIV 92  FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5546
SELECT - cor0.col0 / 92  FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
0
0

query I rowsort
SELECT ALL + + tab2.col0  FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT + - 88 AS col1  FROM tab2 GROUP BY tab2.col2
----
-88
-88
-88

query I rowsort
SELECT + - tab2.col2 AS col0  FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL tab1.col0  FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT tab0.col2 + 56  FROM tab0 GROUP BY tab0.col2
----
135
80
94

query I rowsort
SELECT - 27  FROM tab2 cor0 GROUP BY cor0.col2
----
-27
-27
-27

query I rowsort
SELECT cor0.col2 AS col2  FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col1 + + cor0.col1  FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
118
122
82

query I rowsort
SELECT ALL - cor0.col1  FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0
0

query I rowsort
SELECT cor0.col1  FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - col0  FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT tab1.col0  FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2  FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 21  FROM tab2 AS cor0 GROUP BY col0
----
-21

query I rowsort
SELECT 37  FROM tab1 AS cor0 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT tab0.col0 * + tab0.col0 AS col1  FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 col2  FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
158
48
76

query I rowsort
SELECT - 11 AS col0  FROM tab0 AS cor0 GROUP BY cor0.col0
----
-11
-11
-11

query I rowsort
SELECT + 42  FROM tab1 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT tab1.col2 AS col0  FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT - cor0.col2 * cor0.col2 + col2 * cor0.col0  FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-4187
1710
456

query I rowsort
SELECT DISTINCT 94 AS col1  FROM tab2 GROUP BY tab2.col1
----
94

query I rowsort
SELECT ALL + + 4  FROM tab0 GROUP BY tab0.col1
----
4
4

query I rowsort
SELECT ALL cor0.col0  FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 89  FROM tab1 AS cor0 GROUP BY cor0.col1
----
89

query I rowsort
SELECT 69 + - cor0.col0  FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-23
54

query I rowsort
SELECT 41  FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
41
41

query I rowsort
SELECT ALL - tab0.col0 AS col1  FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col0  FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT DISTINCT + 73 AS col1  FROM tab0 cor0 GROUP BY cor0.col0
----
73

query I rowsort
SELECT DISTINCT - tab2.col0  FROM tab2 GROUP BY tab2.col0 HAVING + col0 < NULL
----

query I rowsort
SELECT - + tab2.col0  FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL tab1.col0 * + tab1.col0  FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT col1  FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + col2 + 87 AS col0  FROM tab2 AS cor0 GROUP BY cor0.col2
----
145
166
174

query I rowsort
SELECT DISTINCT - tab2.col0  FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + 41  FROM tab2 AS cor0 GROUP BY col2
----
41
41
41

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 + 17  FROM tab2 GROUP BY tab2.col1
----
17
17
17

query I rowsort
SELECT ALL 79  FROM tab1 AS cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT col2 AS col1  FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL + tab0.col2  FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT - col0 + tab0.col0 AS col1  FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT - cor0.col2 AS col2  FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( + 83, - cor1.col2 ) AS col1  FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-83

query I rowsort
SELECT 48  FROM tab1 GROUP BY tab1.col0
----
48
48
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 72 col1  FROM tab1 GROUP BY tab1.col1
----
72
72
72

query I rowsort
SELECT 80  FROM tab0 GROUP BY col1
----
80
80

onlyif mysql # DIV for integer division: 
query I rowsort label-5595
SELECT DISTINCT 21 DIV 2 AS col2  FROM tab0 AS cor0 GROUP BY cor0.col1
----
10

skipif mysql # not compatible
query I rowsort label-5595
SELECT DISTINCT 21 / 2 AS col2  FROM tab0 AS cor0 GROUP BY cor0.col1
----
10

query I rowsort
SELECT + + 52  FROM tab1 GROUP BY tab1.col1
----
52
52
52

query I rowsort
SELECT ALL + cor0.col0  FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL - 2 - cor0.col2 AS col1  FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-40
-81

query I rowsort
SELECT DISTINCT + tab2.col0 * tab2.col0 + 99 * tab2.col0 AS col0  FROM tab2 GROUP BY tab2.col0
----
1710
17290
17572

query I rowsort
SELECT tab2.col0 AS col0  FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL + 62  FROM tab1 AS cor0 GROUP BY cor0.col1
----
62
62
62

query I rowsort
SELECT + 74  FROM tab1 AS cor0 GROUP BY cor0.col1
----
74
74
74

query I rowsort
SELECT + tab1.col1 AS col0  FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL - cor0.col1  FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 20 + - cor0.col1 col1  FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-101
-20

onlyif mysql # DIV for integer division: 
query I rowsort label-5606
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-5606
SELECT ALL - + tab2.col1 / tab2.col1 AS col2  FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - 97  FROM tab0 GROUP BY col0
----
-97

query I rowsort
SELECT - 98  FROM tab0 GROUP BY tab0.col1
----
-98
-98

query I rowsort
SELECT ALL - col0 AS col1  FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - tab2.col1 AS col0  FROM tab2 GROUP BY col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 48 col0  FROM tab0 GROUP BY tab0.col1
----
48
48

query I rowsort
SELECT ALL + cor0.col0 AS col1  FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - col0  FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT + cor0.col1 AS col0  FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT + col1 AS col1  FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT tab1.col2  FROM tab1 GROUP BY tab1.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 * + tab0.col1 col0  FROM tab0 GROUP BY tab0.col1
----
0
6561

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

query I rowsort
SELECT + cor0.col2 * cor0.col0 AS col2  FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT DISTINCT cor0.col0  FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - cor0.col2 AS col0  FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + + tab0.col2 * tab0.col2 AS col0  FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT cor0.col2 + - cor0.col2 AS col2  FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5624
SELECT ALL - col1 - tab2.col1 DIV 79  FROM tab2 GROUP BY col1
----
-41
-59
-61

skipif mysql # not compatible
query I rowsort label-5624
SELECT ALL - col1 - tab2.col1 / 79  FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT cor0.col0  FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT ALL 57 AS col1  FROM tab2 cor0 GROUP BY col2
----
57
57
57

query I rowsort
SELECT ALL cor0.col0 * 25 AS col2  FROM tab1 AS cor0 GROUP BY cor0.col0
----
2050
550
700

query I rowsort
SELECT 87 AS col1  FROM tab1 AS cor0 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT col1 AS col1  FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - - tab1.col1 AS col2  FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL 33 AS col1  FROM tab2 cor0 GROUP BY cor0.col1
----
33
33
33

query I rowsort
SELECT + 83  FROM tab2 AS cor0 GROUP BY cor0.col2
----
83
83
83

query I rowsort
SELECT DISTINCT 37  FROM tab1 GROUP BY tab1.col2
----
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 col0  FROM tab1 GROUP BY tab1.col0
----
47
47
47

query I rowsort
SELECT ALL + col2  FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 1 col2  FROM tab0 GROUP BY tab0.col1
----
1
1

query I rowsort
SELECT ALL + 35 AS col0  FROM tab1 GROUP BY tab1.col0
----
35
35
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 98 col2  FROM tab2 GROUP BY tab2.col0
----
-98

query I rowsort
SELECT - + tab0.col2 AS col2  FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + tab1.col0 AS col1  FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT - 6 AS col0  FROM tab0 AS cor0 GROUP BY col1
----
-6
-6

query I rowsort
SELECT cor0.col1 AS col2  FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col2 + 2  FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
10
47
73

query I rowsort
SELECT ALL col2  FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT 10 AS col2  FROM tab1 AS cor0 GROUP BY col0
----
10
10
10

query I rowsort
SELECT ALL - cor0.col2  FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT - tab0.col0 AS col0  FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + 22 * + cor0.col0  FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
1826
572
946

query I rowsort
SELECT cor0.col1  FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT cor0.col2 AS col0  FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT 19  FROM tab0 cor0 GROUP BY cor0.col2
----
19

query I rowsort
SELECT + cor0.col2 - cor0.col2 AS col0  FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT col0 + + cor0.col0  FROM tab2 cor0 GROUP BY cor0.col0
----
182
184
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 col1  FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + + col0  FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT tab0.col2  FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT tab2.col2  FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT cor0.col1  FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT + + 54 AS col2  FROM tab2 GROUP BY tab2.col1
----
54
54
54

query I rowsort
SELECT ALL 72 + cor0.col0  FROM tab2 AS cor0 GROUP BY cor0.col0
----
163
164
87

query I rowsort
SELECT tab2.col1  FROM tab2 GROUP BY tab2.col1
----
41
59
61

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.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 col1  FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-3364
-6241
-7569

query I rowsort
SELECT ALL tab2.col1 AS col2  FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + tab1.col2 AS col2  FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 43  FROM tab1 cor0 GROUP BY cor0.col1
----
-43

query I rowsort
SELECT - 17  FROM tab2 AS cor0 GROUP BY cor0.col2
----
-17
-17
-17

query I rowsort
SELECT cor0.col1 AS col2  FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT 94  FROM tab2 AS cor0 GROUP BY cor0.col1
----
94
94
94

query I rowsort
SELECT ALL - - 87 AS col2  FROM tab1 GROUP BY tab1.col0
----
87
87
87

query I rowsort
SELECT 78  FROM tab0 cor0 GROUP BY cor0.col1
----
78
78

query I rowsort
SELECT ALL 28 - - tab0.col1  FROM tab0 GROUP BY tab0.col1
----
109
28

onlyif mysql # DIV for integer division: 
query I rowsort label-5673
SELECT DISTINCT + cor0.col1 DIV cor0.col1 col2  FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5673
SELECT DISTINCT + cor0.col1 / cor0.col1 col2  FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT ALL + cor0.col1 AS col1  FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 97  FROM tab2 AS cor0 GROUP BY cor0.col1
----
97

query I rowsort
SELECT + + 95 AS col2  FROM tab2 GROUP BY tab2.col0
----
95
95
95

query I rowsort
SELECT ALL - tab0.col2  FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2  FROM tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT col0 * cor0.col0 + + cor0.col1  FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
286
8340
8505

query I rowsort
SELECT ALL 78  FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
78
78
78

query I rowsort
SELECT col0  FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + tab2.col1 AS col2  FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + cor0.col0 * cor0.col0  FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
225
8281
8464

query I rowsort
SELECT cor0.col0  FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT - cor0.col0 + + cor0.col0 AS col0  FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + tab1.col1  FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - 46 AS col1  FROM tab2 AS cor0 GROUP BY cor0.col2
----
-46
-46
-46

query I rowsort
SELECT - cor0.col2 * - col2  FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab2.col1 col2  FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL col0 * + cor0.col0  FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
1849
676
6889

query I rowsort
SELECT cor0.col0 AS col1  FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-5692
SELECT + cor0.col0 DIV cor0.col2 AS col1  FROM tab1 cor0 GROUP BY cor0.col0, col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-5692
SELECT + cor0.col0 / cor0.col2 AS col1  FROM tab1 cor0 GROUP BY cor0.col0, col2
----
0
1
2

query I rowsort
SELECT ALL + 59 * + tab0.col0 + tab0.col0 AS col0  FROM tab0 GROUP BY tab0.col0
----
1560
2580
4980

query I rowsort
SELECT 33  FROM tab0 GROUP BY tab0.col2
----
33
33
33

query I rowsort
SELECT DISTINCT + col1  FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT cor0.col2 AS col2  FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL col1 * - col1 AS col0  FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
-1681
-3481
-3721

query I rowsort
SELECT ALL + cor0.col1 AS col1  FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT + + 86  FROM tab2 GROUP BY col1
----
86
86
86

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 ALL - 25 AS col0  FROM tab0 GROUP BY tab0.col2
----
-25
-25
-25

query I rowsort
SELECT cor0.col2 AS col0  FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 88  FROM tab0 AS cor0 GROUP BY cor0.col1
----
88

query I rowsort
SELECT + tab1.col1 * tab1.col1  FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT cor0.col1 AS col2  FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col1  FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + tab1.col2  FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 74  FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0  FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + cor0.col2  FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col0 AS col2  FROM tab0 AS cor0 GROUP BY col1, cor0.col0, col1
----
26
43
83

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1  FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

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-5714
SELECT DISTINCT - cor0.col1 DIV cor0.col0 AS col2  FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-1
0

skipif mysql # not compatible
query I rowsort label-5714
SELECT DISTINCT - cor0.col1 / cor0.col0 AS col2  FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-1
0

query I rowsort
SELECT + cor0.col2  FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col0 AS col0  FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-26
-83
38

query I rowsort
SELECT ALL tab2.col1 * - 72 - + tab2.col1  FROM tab2 GROUP BY col1
----
-2993
-4307
-4453

query I rowsort
SELECT ALL + tab2.col1 * col1  FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT + cor0.col1 AS col1  FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
44
57
6

query I rowsort
SELECT - cor0.col0 * col0 AS col1  FROM tab1 cor0 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT ALL cor0.col0  FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - + 37  FROM tab1 GROUP BY tab1.col2
----
-37
-37
-37

query I rowsort
SELECT DISTINCT + 40 + - cor0.col2  FROM tab0 AS cor0 GROUP BY cor0.col2
----
-39
16
2

query I rowsort
SELECT ALL + cor0.col2 AS col2  FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT + cor0.col0 - + cor0.col0  FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - cor0.col0 + - cor0.col0 AS col2  FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-166
-52
-86

query I rowsort
SELECT DISTINCT - tab1.col1  FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 93  FROM tab0 GROUP BY col1
----
93

query I rowsort
SELECT 96 AS col0  FROM tab2 GROUP BY tab2.col1
----
96
96
96

query I rowsort
SELECT + - tab2.col0  FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - 66 AS col2  FROM tab2 GROUP BY col1
----
-66
-66
-66

query I rowsort
SELECT tab0.col0  FROM tab0 GROUP BY tab0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-5733
SELECT ALL - cor0.col2 DIV + cor0.col2 AS col1  FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5733
SELECT ALL - cor0.col2 / + cor0.col2 AS col1  FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-5734
SELECT ALL + tab2.col1 + tab2.col1 DIV + 8  FROM tab2 GROUP BY col1
----
46
66
68

skipif mysql # not compatible
query I rowsort label-5734
SELECT ALL + tab2.col1 + tab2.col1 / + 8  FROM tab2 GROUP BY col1
----
46
66
68

query I rowsort
SELECT + tab1.col2 * 38  FROM tab1 GROUP BY tab1.col2
----
1710
2698
304

query I rowsort
SELECT DISTINCT + cor0.col1 * - 84  FROM tab2 cor0 GROUP BY cor0.col1
----
-3444
-4956
-5124

query I rowsort
SELECT ALL cor0.col2  FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT col1  FROM tab0 AS cor0 GROUP BY col2, cor0.col2, col1
----
0
0
81

query I rowsort
SELECT cor0.col1  FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT ALL cor0.col2 AS col1  FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT - cor0.col0  FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT col1 AS col1  FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 81 col0  FROM tab1 AS cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT DISTINCT cor0.col2  FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + 76 * cor0.col1  FROM tab2 AS cor0 GROUP BY cor0.col1
----
3116
4484
4636

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1  FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - cor0.col2  FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT 90  FROM tab0 GROUP BY tab0.col2
----
90
90
90

query I rowsort
SELECT cor0.col0  FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT 27  FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
27
27
27

query I rowsort
SELECT DISTINCT cor0.col0 AS col1  FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
26
43
83

query I rowsort
SELECT + 61 AS col2  FROM tab0 AS cor0 GROUP BY cor0.col0
----
61
61
61

query I rowsort
SELECT DISTINCT 23 * + cor0.col0 + cor0.col0 AS col0  FROM tab2 AS cor0 GROUP BY col0
----
2184
2208
360

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 95 col2  FROM tab2 GROUP BY tab2.col0
----
-95
-95
-95

query I rowsort
SELECT col2 + - 67 * cor0.col1  FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-5403
38
79

query I rowsort
SELECT ALL 49 AS col1  FROM tab1 AS cor0 GROUP BY cor0.col0
----
49
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col1  FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 33  FROM tab2 AS cor0 GROUP BY cor0.col0
----
33

query I rowsort
SELECT cor0.col2 * - cor0.col2 AS col2  FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-1444
-576
-6241

query I rowsort
SELECT ALL + tab2.col0  FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT tab0.col1  FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT - 3  FROM tab1 AS cor0 GROUP BY cor0.col0
----
-3
-3
-3

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 AS col2  FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT - 32  FROM tab2 GROUP BY col1
----
-32

query I rowsort
SELECT cor0.col0  FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col0 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 + tab0.col2 AS col0  FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL + col0 AS col2  FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col0 * - 15 AS col0  FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to 8081be69d47eec92ee6bc0867399b920

query I rowsort
SELECT ALL + cor0.col0 + + 50  FROM tab0 AS cor0 GROUP BY col0
----
133
76
93

query I rowsort
SELECT col2  FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + tab2.col0  FROM tab2 GROUP BY tab2.col0
----
15
91
92

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

query I rowsort
SELECT DISTINCT + cor0.col2  FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor1.col1 + cor1.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col2, cor0.col0
----
118
122
82

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col2 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT cor0.col0 FROM tab1 cor0 GROUP BY col2, cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
-81
0

query II rowsort
SELECT DISTINCT cor0.col0 AS col2, cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
26
43
43
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col1 col1 FROM tab0 GROUP BY col1
----
0
81

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 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT - col2 * + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col0 * tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT ALL - tab2.col0 * - + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT - col2 + - cor0.col0 + + - col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-118
-224
-38

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * - - cor0.col1 col0 FROM tab0 AS cor0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT ALL cor0.col0 FROM tab0 cor0 GROUP BY col0, col2
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
45
71
8

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
----
-58
-79
-87

query I rowsort
SELECT - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col2 - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor1.col1
----
24
38
79

query I rowsort
SELECT col0 + + + cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
273
276
45

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL cor0.col1 + - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-17
-20
-26

query I rowsort
SELECT DISTINCT - tab0.col1 FROM tab0 WHERE NOT NULL IS NOT NULL GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NULL IS NULL
----
22
28
82

query I rowsort
SELECT + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + + col1 AS col0 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-45
-71
-8

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + AVG ( + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL <= NULL
----

query I rowsort
SELECT ALL col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
15
91
92

query I rowsort
SELECT ALL + col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-15
-91
-92

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 - + tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL col2 AS col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT + col1 FROM tab2 cor0 GROUP BY col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT cor0.col1 col0, - col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
-41
59
-59
61
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 + tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col1 - + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0

query I rowsort
SELECT cor0.col1 + - - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT - - tab1.col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - - AVG ( + tab0.col1 ) FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL + cor0.col0 - col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
0
81

query I rowsort
SELECT DISTINCT tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL IS NOT NULL
----
26
43
83

query I rowsort
SELECT - tab1.col1 FROM tab1 WHERE NOT NULL IS NULL GROUP BY tab1.col1
----

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 GROUP BY col2, col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-5841
SELECT + cor0.col2 DIV + - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
-1
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5841
SELECT + cor0.col2 / + - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
-1
0

query I rowsort
SELECT + cor0.col0 * - - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

onlyif mysql # DIV for integer division: 
query I rowsort label-5843
SELECT + cor0.col0 DIV + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5843
SELECT + cor0.col0 / + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT ALL tab0.col2 * - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NOT NULL
----
-1444
-576
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col2 col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - - tab1.col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-5848
SELECT ALL col1 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5848
SELECT ALL col1 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
1

query I rowsort
SELECT ALL - col1 * + + cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT DISTINCT + cor0.col2 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
102
150
170

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT - col2 AS col2, col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
45
-71
71
-8
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.col1
----
15
91
92

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab1 cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - tab1.col1 AS col2 FROM tab1, tab0 cor0 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col2 col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT ALL - tab2.col1 - + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT DISTINCT cor0.col0 + AVG ( DISTINCT cor1.col2 ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5865
SELECT cor0.col0 DIV - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col1, col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5865
SELECT cor0.col0 / - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col1, col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - tab1.col0 FROM tab1 WHERE NOT NULL IS NULL GROUP BY tab1.col0
----

query I rowsort
SELECT + tab2.col2 + - + col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col1 col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL cor0.col1 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL - tab2.col0 * + tab2.col0 * - + tab2.col0 + - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
3360
753480
778596

query I rowsort
SELECT DISTINCT AVG ( DISTINCT tab1.col1 ) - - + tab1.col2 + col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 * - cor0.col2 FROM tab1 cor0 GROUP BY col2
----
-1980
-4970
-56

onlyif mysql # DIV for integer division: 
query I rowsort label-5874
SELECT DISTINCT tab2.col2 DIV + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1

skipif mysql # not compatible
query I rowsort label-5874
SELECT DISTINCT tab2.col2 / + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0
81

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
26
43
83

query I rowsort
SELECT - tab0.col1 + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - + tab2.col1 AS col0 FROM tab2, tab0 AS cor0 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT - - tab0.col2 AS col0 FROM tab0, tab2 cor0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-5884
SELECT DISTINCT + cor0.col2 DIV - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5884
SELECT DISTINCT + cor0.col2 / - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - col2 FROM tab0 cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL <= NULL
----

query II rowsort
SELECT ALL cor0.col1 AS col2, - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0
81
-81

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col0 - - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
-462
-6642
-756

query I rowsort
SELECT cor0.col1 - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-5895
SELECT ALL - tab1.col1 DIV + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5895
SELECT ALL - tab1.col1 / + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL + tab2.col1 + - - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1, tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab0.col2 + - + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
-158
-48
-76

onlyif mysql # DIV for integer division: 
query I rowsort label-5901
SELECT - cor0.col0 DIV - + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5901
SELECT - cor0.col0 / - + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
1
1
1

query I rowsort
SELECT cor0.col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-1444
-576
-6241

query II rowsort
SELECT - + tab0.col0, - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-26
-43
-43
-83
-83

query II rowsort
SELECT DISTINCT + cor0.col2, - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
-45
71
-71
8
-8

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 WHERE ( NULL ) IS NOT NULL GROUP BY col2
----

query I rowsort
SELECT ALL - - tab0.col1 AS col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT DISTINCT - - col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL + cor0.col2 * + - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT tab2.col1 + + - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query II rowsort
SELECT cor0.col2, + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
24
38
38
79
79

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT - cor0.col2 AS col0, cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
45
-71
71
-8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab2.col1 col0 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-5921
SELECT ALL cor0.col0 DIV + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5921
SELECT ALL cor0.col0 / + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab2.col0 col1 FROM tab2 GROUP BY col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
118
122
82

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0, col0
----
15
91
92

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 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 cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
58
79
87

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
44
57
6

query I rowsort
SELECT DISTINCT + + col0 AS col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT cor0.col0 * + + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT + + col1 + + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IS NOT NULL
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT - col0 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
0
81

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 + + cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

query II rowsort
SELECT DISTINCT cor0.col0 AS col0, + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
22
28
28
82
82

query II rowsort
SELECT ALL - col2 AS col0, tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-58
58
-79
79
-87
87

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-5946
SELECT DISTINCT - cor0.col0 DIV - - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1

skipif mysql # not compatible
query I rowsort label-5946
SELECT DISTINCT - cor0.col0 / - - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT - cor0.col1 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5951
SELECT tab1.col2 DIV tab1.col2 FROM tab1 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5951
SELECT tab1.col2 / tab1.col2 FROM tab1 GROUP BY col2
----
1
1
1

query I rowsort
SELECT - col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, col1
----
-58
-79
-87

query I rowsort
SELECT - cor0.col0 * + col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-484
-6724
-784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT DISTINCT - cor0.col1 AS col0, + cor0.col1 * - cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
-6561
0
0

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor0.col0
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT cor0.col1 * - - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
22
28
82

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 ALL cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, col1
----
24
38
79

query I rowsort
SELECT - col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NULL IS NULL
----
1681
3481
3721

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 tab2.col0 * + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT ALL - + tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + cor0.col1 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0

query I rowsort
SELECT ALL col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
1936
3249
36

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + AVG ( ALL + tab1.col1 ) FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL IS NOT NULL
----
-44
-57
-6

query I rowsort
SELECT ALL + cor0.col0 * + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT cor0.col0 + + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
166
52
86

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT + col2 FROM tab1 GROUP BY col2 HAVING NOT NULL < ( NULL )
----

query I rowsort
SELECT 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 cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT DISTINCT tab1.col2 + - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
26
43
83

query I rowsort
SELECT ALL - cor0.col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT + col1 - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-17
-20
-26

onlyif mysql # DIV for integer division: 
query I rowsort label-5991
SELECT DISTINCT - tab2.col2 DIV tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-1

skipif mysql # not compatible
query I rowsort label-5991
SELECT DISTINCT - tab2.col2 / tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-1

query I rowsort
SELECT + tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col0, col1
----
-81
0
0

query I rowsort
SELECT tab2.col2 FROM tab2 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

query I rowsort
SELECT + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0 HAVING NOT ( NULL ) < NULL
----

query I rowsort
SELECT + cor0.col2 * + - col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1032
-2054
-3154

query I rowsort
SELECT ALL col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1, cor1.col1
----
9 values hashing to a7fc3d55de9b3e11322658ec587831cf

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + tab1.col0 + - col0 col0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1 HAVING NOT ( NULL ) IS NOT NULL
----
41
59
61

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 - cor1.col1 AS col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-81
0

query I rowsort
SELECT + - col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL - col0 AS col0 FROM tab0 cor0 GROUP BY col0 HAVING NOT NULL IS NOT NULL
----
-26
-43
-83

query I rowsort
SELECT + AVG ( cor1.col2 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT ALL col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, col2
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
44
57
6

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT col1 * + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
22
28
82

query I rowsort
SELECT DISTINCT + col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + - col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-43
-83

query II rowsort
SELECT ALL - tab2.col1 AS col1, tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-41
41
-59
59
-61
61

query I rowsort
SELECT ALL - cor0.col0 * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT + cor1.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT ALL + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
44
57
6

query I rowsort
SELECT col2 AS col0 FROM tab0 cor0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
0
0
81

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
-22
-28
-82

query I rowsort
SELECT + - tab0.col2 * + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT cor0.col2 * - - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT - col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
15
91
92

query I rowsort
SELECT - col0 AS col1 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 col0 col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query II rowsort
SELECT - cor0.col1 AS col1, cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
44
-57
57
-6
6

query I rowsort
SELECT DISTINCT - col1 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2 HAVING NULL < NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-6042
SELECT cor0.col0 DIV + + col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6042
SELECT cor0.col0 / + + col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT - tab2.col0 - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - cor0.col2 * - - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL + - tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

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 ALL - tab0.col0 AS col2 FROM tab0 GROUP BY col0 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-6052
SELECT + cor0.col2 DIV cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6052
SELECT + cor0.col2 / cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT DISTINCT cor0.col1 col2, - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
0
81
-81

query I rowsort
SELECT DISTINCT - - col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, col2
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL - - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT + + tab2.col2 + + + tab2.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 ALL cor0.col0 + + cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
41
59
61

query I rowsort
SELECT + tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

query I rowsort
SELECT + cor0.col1 * - - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL - cor1.col1 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col0
----
-81
0
0

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col0, col2
----
-45
-71
-8

query I rowsort
SELECT col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT + + tab2.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 cor1.col1 col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col1
----
41
41
59
59
61
61

query II rowsort
SELECT - tab2.col1, - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-41
-59
-59
-61
-61

query I rowsort
SELECT tab2.col0 + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
182
184
30

onlyif mysql # DIV for integer division: 
query I rowsort label-6073
SELECT tab2.col1 DIV - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6073
SELECT tab2.col1 / - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

query I rowsort
SELECT + + tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * + - cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT + col0 AS col0 FROM tab1 AS cor0 GROUP BY col1, col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query II rowsort
SELECT ALL + cor0.col2, - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
-24
38
-38
79
-79

query I rowsort
SELECT ALL + tab0.col0 AS col0 FROM tab0 WHERE ( NULL ) NOT IN ( + tab0.col1 ) GROUP BY tab0.col0
----

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, cor0.col0
----
41
59
61

query II rowsort
SELECT DISTINCT - cor0.col0, col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-15
61
-91
59
-92
41

query I rowsort
SELECT DISTINCT cor0.col2 * - col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col1 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
116
158
174

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + + col2 AS col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
22
28
82

query I rowsort
SELECT tab1.col2 * - tab1.col2 * + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
357911
512
91125

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 ALL cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
24
38
79

query I rowsort
SELECT DISTINCT col2 * - col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT + col1 AS col2 FROM tab0 GROUP BY tab0.col1 HAVING NOT col1 NOT IN ( - AVG ( DISTINCT col2 ) )
----

query II rowsort
SELECT DISTINCT col0, + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
79
43
24
83
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-6097
SELECT ALL + cor0.col0 DIV - - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col1, col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6097
SELECT ALL + cor0.col0 / - - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col1, col0
----
1
1
1

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
0
81

query I rowsort
SELECT AVG ( ALL col2 ) AS col2 FROM tab1 GROUP BY tab1.col0 HAVING NULL = NULL
----

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
41
59
61

query I rowsort
SELECT + col0 * + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY col0, col2
----
-45
-71
-8

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
26
43
83

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY col1, col1
----
-44
-57
-6

query I rowsort
SELECT - + tab1.col1 * - tab1.col1 * - tab1.col1 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-185136
-210
-85140

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
484
6724
784

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.col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
26
43
83

query I rowsort
SELECT ALL cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT col1 FROM tab0 AS cor0 GROUP BY col1, col0
----
0
0
81

query I rowsort
SELECT + tab2.col1 + - - tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
118
122
82

query I rowsort
SELECT ALL - cor0.col2 * + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT + cor0.col2 - + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
0
0
0

query I rowsort
SELECT ALL + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1, cor1.col0
----
0
0
0
81
81
81

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
-41
-59
-61

query I rowsort
SELECT + - tab0.col0 + + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col2 FROM tab2 cor0 GROUP BY col1, col2
----
58
79
87

query I rowsort
SELECT DISTINCT col2 * - - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

query II rowsort
SELECT + + tab1.col0, + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
22
22
28
28
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT tab1.col2 + - col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT - col2 + - - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - + cor0.col0 FROM tab1, tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT DISTINCT cor0.col2 col1, cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
41
79
59
87
61

query I rowsort
SELECT ALL - - tab0.col0 - tab0.col0 FROM tab0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col1
----
9 values hashing to a7fc3d55de9b3e11322658ec587831cf

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * cor0.col0 + + + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1218
-5278
-7110

onlyif mysql # DIV for integer division: 
query I rowsort label-6132
SELECT - col2 DIV + col2 AS col0 FROM tab0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6132
SELECT - col2 / + col2 AS col0 FROM tab0 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col0
----
-26
-43
-83

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - col0 AS col0 FROM tab0 WHERE NULL IS NULL GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT DISTINCT - - col2 col0, tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
58
79
79
87
87

query I rowsort
SELECT ALL col1 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query II rowsort
SELECT ALL - - tab2.col1, + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
41
41
59
59
61
61

query I rowsort
SELECT ALL col2 FROM tab0 cor0 GROUP BY col2, cor0.col2
----
24
38
79

query I rowsort
SELECT col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * + - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - - col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT AVG ( DISTINCT col0 ) IS NULL
----
24
38
79

query I rowsort
SELECT DISTINCT - - tab0.col2 + - - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col0, col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
22
28
82

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT + - col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
0
81

query I rowsort
SELECT ALL col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
15
91
92

query I rowsort
SELECT - col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col2, col1
----
-81
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + cor0.col2 * + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1444
576
6241

query II rowsort
SELECT - col0, - col0 FROM tab1 GROUP BY tab1.col0
----
-22
-22
-28
-28
-82
-82

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
-15
-91
-92

query II rowsort
SELECT DISTINCT - tab1.col0 AS col0, tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-22
22
-28
28
-82
82

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
58
79
87

query I rowsort
SELECT - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT 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 - tab1.col1 + - - tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT - col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-6168
SELECT DISTINCT cor0.col1 DIV - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-6168
SELECT DISTINCT cor0.col1 / - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1

query I rowsort
SELECT cor0.col2 FROM tab1 cor0 GROUP BY cor0.col1, col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + cor0.col2 * + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1944
0

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
0
0
81

query I rowsort
SELECT + tab2.col2 * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - tab1.col2 - + col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-142
-16
-90

query I rowsort
SELECT + cor0.col2 + + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
0
0
0

query I rowsort
SELECT + tab0.col2 * + tab0.col2 + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1482
600
6320

onlyif mysql # DIV for integer division: 
query I rowsort label-6182
SELECT ALL + tab2.col2 DIV + tab2.col2 FROM tab2 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6182
SELECT ALL + tab2.col2 / + tab2.col2 FROM tab2 GROUP BY col2
----
1
1
1

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
0
81

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 AVG ( ALL tab2.col1 ) FROM tab2 GROUP BY tab2.col1 HAVING NOT + col1 >= NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-6187
SELECT ALL - cor0.col2 DIV cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-5
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6187
SELECT ALL - cor0.col2 / cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-5
0
0

query I rowsort
SELECT ALL - tab2.col2 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - - tab0.col1 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-6195
SELECT cor0.col1 DIV cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6195
SELECT cor0.col1 / cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1
1
1

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
58
79
87

query II rowsort
SELECT ALL - cor0.col1, + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-44
44
-57
57
-6
6

query I rowsort
SELECT ALL col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL + tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT ( NULL ) > NULL
----

query I rowsort
SELECT + tab2.col2 AS col2 FROM tab2, tab2 AS cor0 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL + col2 AS col0 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT + col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
0
81

query I rowsort
SELECT cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, col1
----
0
81

query I rowsort
SELECT ALL - + tab2.col2 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query II rowsort
SELECT - col0 AS col0, cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
0
-43
81
-83
0

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0, cor0.col2
----
45
71
8

query II rowsort
SELECT ALL - cor0.col2 * cor0.col1 AS col1, cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2565
57
-3124
44
-48
6

query I rowsort
SELECT ALL - col0 + - - col0 FROM tab0 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL col2 * - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT + - tab0.col1 - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-162
0

query I rowsort
SELECT ALL col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
24
38
79

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL cor0.col1 / + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT - col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col0, col2
----
58
79
87

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
41
59
61

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 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab1.col2 + + tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT - col1 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + cor0.col1 * + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
22
28
82

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - col2 * + - cor0.col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
3422
6320
7656

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT - tab0.col2 * - tab0.col2 FROM tab0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT cor1.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor1.col1
----
0
0
0
81
81
81

query I rowsort
SELECT ALL + col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 * + tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT tab0.col0 + tab0.col0 * col0 FROM tab0 GROUP BY col0
----
1892
6972
702

query I rowsort
SELECT - cor0.col2 + - cor0.col2 AS 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 col0 col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col2 + - - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT cor1.col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT ALL - tab0.col1 + + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL - cor0.col2 + + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-17
-20
-26

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, col1
----
0
0
81

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col2 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
1056
256168
71820

query II rowsort
SELECT DISTINCT + + tab1.col2, + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
45
45
71
71
8
8

query I rowsort
SELECT ALL - + col0 AS col2 FROM tab0 GROUP BY col0 HAVING ( NULL ) IS NULL
----
-26
-43
-83

query I rowsort
SELECT ALL + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT col1 + - + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - + col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, col2
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 AS col1 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 + + col0 col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL + col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-6257
SELECT DISTINCT cor0.col0 DIV - col0 AS col0 FROM tab0 cor0 GROUP BY col1, cor0.col0, cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-6257
SELECT DISTINCT cor0.col0 / - col0 AS col0 FROM tab0 cor0 GROUP BY col1, cor0.col0, cor0.col1
----
-1

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL - tab2.col2 * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT - col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT ALL cor0.col2 * + col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT cor0.col1 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2378
4661
5307

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 ALL - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
-81
0

query I rowsort
SELECT ALL + - col2 - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-142
-16
-90

onlyif mysql # DIV for integer division: 
query I rowsort label-6267
SELECT - cor0.col1 DIV - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2, cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6267
SELECT - cor0.col1 / - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2, cor0.col0
----
0
0
0

query I rowsort
SELECT tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING ( NULL ) <> ( NULL )
----

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query II rowsort
SELECT + tab1.col1, + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
44
57
57
6
6

query I rowsort
SELECT + col0 * + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1 HAVING NOT col1 IS NOT NULL
----

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
0
81

query II rowsort
SELECT DISTINCT + + tab1.col0, - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
-22
28
-28
82
-82

query I rowsort
SELECT DISTINCT - cor0.col1 * - cor0.col1 - + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1640
3422
3660

query I rowsort
SELECT ALL - cor1.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
-26
-43
-83

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 II rowsort
SELECT - - col2 col2, tab2.col2 FROM tab2 GROUP BY tab2.col2
----
58
58
79
79
87
87

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
45
71
8

query II rowsort
SELECT + col0, - cor0.col1 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
26
0
43
-81
83
0

query I rowsort
SELECT + cor0.col0 + + + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
166
52
86

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 ALL + col0 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 cor0 GROUP BY col0, cor0.col2
----
58
79
87

query I rowsort
SELECT col2 + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + + AVG ( DISTINCT + - tab0.col0 ) AS col0 FROM tab0 GROUP BY tab0.col1 HAVING NOT ( NULL ) <> NULL
----

query II rowsort
SELECT ALL cor0.col0 AS col2, cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
0
43
81
83
0

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT tab2.col1 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL <> NULL
----

query I rowsort
SELECT col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT col2 AS col1 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL - cor0.col0 * - col1 * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
13725
347024
488579

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query II rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0, - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
-15
8281
-91
8464
-92

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
22
28
82

query I rowsort
SELECT DISTINCT tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NULL > ( NULL )
----

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - - col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT cor0.col0 * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1, cor0.col2
----
-3483
0
0

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, col2
----
15
91
92

query I rowsort
SELECT tab2.col1 * + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT ALL + cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT - cor1.col1 FROM tab0 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 cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT tab1.col1 * - col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY col1, cor0.col1, col2, cor0.col1
----
58
79
87

query I rowsort
SELECT - cor0.col2 - - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT + - col2 AS col1 FROM tab2 GROUP BY col2
----
-58
-79
-87

query II rowsort
SELECT ALL + - tab2.col1 AS col2, tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-41
41
-59
59
-61
61

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-58
-79
-87

query I rowsort
SELECT cor0.col0 * - - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
0
81

query I rowsort
SELECT cor0.col0 + + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6322
SELECT DISTINCT cor0.col2 DIV cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-6322
SELECT DISTINCT cor0.col2 / cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT ALL cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT ALL + cor0.col2 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-2565
-3124
-48

query I rowsort
SELECT + + tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - - tab0.col0 + + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT ALL col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NULL
----
44
57
6

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + cor0.col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 + + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
138
148
99

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL + col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col1 FROM tab2 cor0 GROUP BY col0, col1
----
-41
-59
-61

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT tab2.col2 FROM tab2, tab2 AS cor0 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + col0 + - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0, col1
----
-38
26
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT DISTINCT + tab0.col1 * + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
6561

onlyif mysql # DIV for integer division: 
query I rowsort label-6345
SELECT ALL - cor0.col1 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6345
SELECT ALL - cor0.col1 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT tab2.col1 - - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL - col0 AS col1 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT - col1 AS col2 FROM tab1 cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, col1, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-81
0
0

query II rowsort
SELECT DISTINCT col0, - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0, cor0.col1
----
26
0
43
-81
83
0

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - cor0.col0 - + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-182
-184
-30

query II rowsort
SELECT + col1 * - cor0.col2 AS col1, cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2565
45
-3124
71
-48
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - col2 * - - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query II rowsort
SELECT + tab0.col2, tab0.col2 FROM tab0 GROUP BY col2
----
24
24
38
38
79
79

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, col0
----
22
28
82

query I rowsort
SELECT ALL - + col1 AS col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL - col0 FROM tab0 cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
15
91
92

query I rowsort
SELECT ALL - col0 AS col1 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT + cor0.col2 + - + cor0.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor0.col2
----
17
20
26

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - + col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
0
0
81

query I rowsort
SELECT DISTINCT + tab1.col1 * - col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-6373
SELECT DISTINCT - cor0.col0 DIV - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-6373
SELECT DISTINCT - cor0.col0 / - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - + col1 * + - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT - + tab2.col1 + - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col1 FROM tab1 WHERE ( NULL ) IS NULL GROUP BY tab1.col0 HAVING NOT NULL IS NOT NULL
----
22
28
82

query I rowsort
SELECT AVG ( DISTINCT cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL IS NULL
----

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 DISTINCT col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
81

query I rowsort
SELECT - col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT cor0.col2 + - + col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
158
48
76

onlyif mysql # DIV for integer division: 
query I rowsort label-6386
SELECT + tab0.col0 DIV tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6386
SELECT + tab0.col0 / tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT + col0 * - cor0.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 - - tab1.col1 col0 FROM tab1 GROUP BY col1
----
44
57
6

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.col2
----
22
28
82

query II rowsort
SELECT - cor0.col1 AS col2, - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-44
-82
-57
-28
-6
-22

query I rowsort
SELECT - cor0.col2 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2378
-4661
-5307

query II rowsort
SELECT ALL AVG ( + cor0.col1 ) AS col0, - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
-38
0
-79
81
-24

query I rowsort
SELECT ALL - cor0.col1 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-162
0

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
24
38
79

query I rowsort
SELECT ALL tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
26
43
83

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 cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL + AVG ( DISTINCT - cor0.col0 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT DISTINCT + cor0.col0 - col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT - cor0.col0 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - cor0.col2 + cor0.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + cor0.col1 * - cor0.col1 + - col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-6642
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT - cor0.col0 + + - col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-166
-52
-86

query I rowsort
SELECT + col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 col0 FROM tab0 GROUP BY tab0.col2 HAVING NULL < NULL
----

query I rowsort
SELECT DISTINCT + tab0.col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT cor1.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT ALL + - tab2.col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT + col1 AS col0 FROM tab1 cor0 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT - - tab2.col2 + - tab2.col2 FROM tab2 GROUP BY col2
----
0

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT DISTINCT col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
15
91
92

query I rowsort
SELECT col2 AS col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT - - col1 + AVG ( DISTINCT + col1 ) AS col0 FROM tab0 cor0 GROUP BY col1 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col0 FROM tab1 GROUP BY col2, col1
----
45
71
8

query I rowsort
SELECT ALL col1 FROM tab2 AS cor0 GROUP BY col0, col1, col2
----
41
59
61

query I rowsort
SELECT col0 AS col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + col2 FROM tab2 AS cor0 GROUP BY col2, col2
----
58
79
87

query I rowsort
SELECT ALL + col0 AS col2 FROM tab2 GROUP BY col1, col0
----
15
91
92

query I rowsort
SELECT ALL col2 AS col2 FROM tab2 AS cor0 GROUP BY col0, col2
----
58
79
87

query II rowsort
SELECT ALL col2, col2 AS col2 FROM tab2 GROUP BY col2
----
58
58
79
79
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab1 GROUP BY col2, col1
----
45
71
8

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab1 GROUP BY col1, col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col1 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT ALL - + col2 + + col2 FROM tab1 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT col1 AS col1 FROM tab0 cor0 GROUP BY col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col2 FROM tab2 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + col1 col1 FROM tab1 GROUP BY col0, col1, col1
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT col2 AS col1 FROM tab1 AS cor0 WHERE NOT col1 IS NOT NULL GROUP BY col2
----

query I rowsort
SELECT col2 AS col0 FROM tab2 GROUP BY col2, col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT col2 AS col2 FROM tab0 GROUP BY col2, col0 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT ALL - col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, col2, col2
----
-24
-38
-79

query I rowsort
SELECT - - col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, col0
----
45
71
8

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab0 GROUP BY col0, col2
----
26
43
83

query I rowsort
SELECT ALL + col0 - - col0 AS col0 FROM tab2 GROUP BY col0, col0
----
182
184
30

query I rowsort
SELECT DISTINCT col2 FROM tab2 GROUP BY col0, col2
----
58
79
87

query I rowsort
SELECT col2 FROM tab1 AS cor0 GROUP BY col2, col2
----
45
71
8

query I rowsort
SELECT - col0 FROM tab1 GROUP BY col1, col2, col0
----
-22
-28
-82

query I rowsort
SELECT col1 AS col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL + col0 AS col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT + col0 FROM tab0 GROUP BY col0, col2
----
26
43
83

query I rowsort
SELECT + + col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
41
59
61

query I rowsort
SELECT + col2 FROM tab2 AS cor0 GROUP BY col2, col0
----
58
79
87

query I rowsort
SELECT ALL - - col0 AS col1 FROM tab0 cor0 GROUP BY col0, col0
----
26
43
83

query I rowsort
SELECT ALL + col2 AS col1 FROM tab2 GROUP BY col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query II rowsort label-6456
SELECT ALL - col2, - col2 DIV - col2 AS col0 FROM tab2 GROUP BY col2, col2
----
-58
1
-79
1
-87
1

skipif mysql # not compatible
query II rowsort label-6456
SELECT ALL - col2, - col2 / - col2 AS col0 FROM tab2 GROUP BY col2, col2
----
-58
1
-79
1
-87
1

query I rowsort
SELECT ALL col2 * - col2 AS col2 FROM tab1 WHERE NULL >= col1 GROUP BY col0, col2
----

query I rowsort
SELECT + col1 FROM tab2 AS cor0 GROUP BY col1, col1 HAVING NOT ( NULL ) IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col1 FROM tab0 WHERE NULL IS NOT NULL GROUP BY col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 col0 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - col2 FROM tab0 GROUP BY col2, col1 HAVING NOT NULL < NULL
----

query I rowsort
SELECT ALL col0 + col2 + + col2 AS col0 FROM tab0 GROUP BY col0, col2
----
159
184
91

query I rowsort
SELECT DISTINCT - col0 * - col2 FROM tab1 AS cor0 GROUP BY col0, col1, col2
----
1260
176
5822

query I rowsort
SELECT + col2 - col2 + - col2 FROM tab1 AS cor0 GROUP BY col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + + col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT col1 * - col1 FROM tab0 GROUP BY col1, col2
----
-6561
0
0

query I rowsort
SELECT - col1 AS col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT - col2 AS col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NULL = NULL
----

query I rowsort
SELECT col2 + + col2 * - col2 FROM tab0 GROUP BY col2 HAVING NOT NULL <> NULL
----

query I rowsort
SELECT DISTINCT + col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL + col2 * - col0 AS col2 FROM tab0 GROUP BY col0, col2
----
-1032
-2054
-3154

query I rowsort
SELECT DISTINCT + + col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col1 FROM tab1 GROUP BY col0, col2, col1
----
44
57
6

query I rowsort
SELECT + + col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT col0 FROM tab2 GROUP BY col0 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL col2 FROM tab1 AS cor0 GROUP BY col2 HAVING ( NOT NULL IS NULL )
----

query I rowsort
SELECT col2 * - AVG ( + - col2 ) FROM tab2 AS cor0 WHERE ( NULL ) IS NOT NULL GROUP BY col2 HAVING NULL < NULL
----

query I rowsort
SELECT + + col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - - col0 AS col2 FROM tab2 AS cor0 GROUP BY col1, col0, col2
----
15
91
92

query I rowsort
SELECT ALL - col2 FROM tab2 cor0 GROUP BY col2, col2
----
-58
-79
-87

query I rowsort
SELECT + col0 * - + col0 AS col0 FROM tab0 cor0 GROUP BY col0
----
-1849
-676
-6889

onlyif mysql # DIV for integer division: 
query I rowsort label-6483
SELECT ALL col2 DIV - - col2 FROM tab0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6483
SELECT ALL col2 / - - col2 FROM tab0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT ALL col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, col0
----
26
43
83

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab1 AS cor0 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 col0 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT + col1 FROM tab0 AS cor0 GROUP BY col0, col1 HAVING NOT NULL BETWEEN - - col0 AND NULL
----

query I rowsort
SELECT ALL col0 * + col0 + + col0 AS col1 FROM tab0 GROUP BY col0
----
1892
6972
702

onlyif mysql # DIV for integer division: 
query I rowsort label-6489
SELECT DISTINCT col0 DIV + - col0 FROM tab2 GROUP BY col0
----
-1

skipif mysql # not compatible
query I rowsort label-6489
SELECT DISTINCT col0 / + - col0 FROM tab2 GROUP BY col0
----
-1

query I rowsort
SELECT ALL - col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col0 col0 FROM tab1 GROUP BY col1, col0
----
-29
16
38

query I rowsort
SELECT + col1 FROM tab0 GROUP BY col1, col0
----
0
0
81

query I rowsort
SELECT - col1 AS col1 FROM tab2 GROUP BY col1, col2
----
-41
-59
-61

query I rowsort
SELECT - col0 AS col2 FROM tab2 AS cor0 GROUP BY col0 HAVING + col0 = NULL
----

query I rowsort
SELECT - col1 * col2 AS col1 FROM tab2 GROUP BY col1, col2
----
-2378
-4661
-5307

query I rowsort
SELECT ALL + col0 FROM tab0 GROUP BY col0, col0
----
26
43
83

query II rowsort
SELECT + col2, col2 FROM tab1 GROUP BY col2
----
45
45
71
71
8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col2 FROM tab0 GROUP BY col0, col2 HAVING NOT col0 IS NOT NULL
----

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab1 GROUP BY col2, col0, col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, col0
----
-24
-38
-79

query I rowsort
SELECT + - col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - col1 col2 FROM tab2 AS cor0 GROUP BY col1 HAVING NULL IS NULL
----
-118
-122
-82

query I rowsort
SELECT + col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, col2, col0
----
24
38
79

query II rowsort
SELECT ALL - + col2, + col2 + - col2 AS col1 FROM tab2 AS cor0 WHERE NOT NULL <= col0 GROUP BY col2, col2 HAVING NOT NULL IS NOT NULL
----

query I rowsort
SELECT ALL + col1 AS col0 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL + col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query II rowsort
SELECT DISTINCT - - col1, col2 FROM tab0 AS cor0 GROUP BY col1, col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + + col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col2 FROM tab0 AS cor0 GROUP BY col1, col1
----
-81
0

query I rowsort
SELECT ALL - col2 FROM tab0 WHERE + - col1 + col1 IS NOT NULL GROUP BY col1, col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - - col1 + col1 FROM tab0 AS cor0 GROUP BY col1, col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT - col1 - col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT + col2 - + col2 + col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL + col2 AS col1 FROM tab0 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT col1 + col1 FROM tab1 GROUP BY col1
----
114
12
88

query I rowsort
SELECT + col1 * + col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT DISTINCT + + col1 FROM tab2 AS cor0 GROUP BY col2, col1
----
41
59
61

query I rowsort
SELECT - col2 FROM tab2 AS cor0 GROUP BY col2, col2, col2 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col1 col1 FROM tab1 AS cor0 GROUP BY col0, col1
----
132
1596
3608

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab2 GROUP BY col0, col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + col1 col1 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT + + col1 * + col0 FROM tab2 AS cor0 WHERE NOT NULL <> ( NULL ) GROUP BY col1, col0
----

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + col1 FROM tab1 AS cor0 GROUP BY col2, col1
----
44
57
6

query I rowsort
SELECT + - col0 FROM tab2 AS cor0 GROUP BY col2, col0
----
-15
-91
-92

query I rowsort
SELECT + col0 AS col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + - col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT col0 FROM tab1 GROUP BY col0, col0
----
22
28
82

query I rowsort
SELECT ALL col1 AS col2 FROM tab2 GROUP BY col1, col0
----
41
59
61

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab2 AS cor0 GROUP BY col0, col2, col1 HAVING NOT NULL IS NOT NULL
----
41
59
61

query I rowsort
SELECT - col2 FROM tab1 AS cor0 GROUP BY col2, col2
----
-45
-71
-8

query I rowsort
SELECT ALL + - col0 + col2 AS col2 FROM tab0 AS cor0 GROUP BY col0, col2, col2
----
-19
-45
53

query I rowsort
SELECT - col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, col0 HAVING NOT - AVG ( DISTINCT + + col2 ) IS NULL
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, col1
----
-81
0

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + + col0 FROM tab1 AS cor0 GROUP BY col0, col0
----
22
28
82

query I rowsort
SELECT ALL - col1 AS col2 FROM tab2 GROUP BY col1, col2
----
-41
-59
-61

query I rowsort
SELECT + col0 AS col1 FROM tab2 AS cor0 GROUP BY col2, col0
----
15
91
92

query II rowsort
SELECT ALL + col1 AS col0, col1 FROM tab1 AS cor0 GROUP BY col1, col0, col0
----
44
44
57
57
6
6

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, col2
----
22
28
82

query II rowsort
SELECT DISTINCT - col2, - col2 AS col2 FROM tab2 GROUP BY col2
----
-58
-58
-79
-79
-87
-87

query I rowsort
SELECT col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, col0
----
58
79
87

query I rowsort
SELECT ALL - col1 AS col2 FROM tab2 GROUP BY col2, col1
----
-41
-59
-61

query I rowsort
SELECT + - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, col2
----
-44
-57
-6

query I rowsort
SELECT - col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
-81
0
0

query I rowsort
SELECT ALL + col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
0
0
81

query I rowsort
SELECT col0 AS col2 FROM tab2 GROUP BY col0 HAVING NULL IS NULL
----
15
91
92

query I rowsort
SELECT ALL + col0 + col0 AS col0 FROM tab2 GROUP BY col0, col0
----
182
184
30

query I rowsort
SELECT DISTINCT - col2 * col2 + col2 AS col0 FROM tab1 GROUP BY col2
----
-1980
-4970
-56

query I rowsort
SELECT + + col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 col0 FROM tab2 AS cor0 GROUP BY col2, col2
----
58
79
87

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col1 * + + col1 FROM tab2 AS cor0 GROUP BY col1, col1 HAVING NULL >= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col0 FROM tab0 GROUP BY col0, col0, col2
----
24
38
79

query I rowsort
SELECT ALL col2 AS col0 FROM tab1 GROUP BY col2, col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL col0 * col0 AS col0 FROM tab2 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT - col0 AS col0 FROM tab1 GROUP BY col0 HAVING NOT NULL BETWEEN NULL AND - + col0
----

query I rowsort
SELECT DISTINCT col2 * + - col2 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL col2 FROM tab0 WHERE NOT NULL IS NULL GROUP BY col2
----

query I rowsort
SELECT + col0 * - col0 * - col0 AS col1 FROM tab0 GROUP BY col0
----
17576
571787
79507

query II rowsort
SELECT + - col0 AS col0, col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, col2
----
-22
22
-28
28
-82
82

query I rowsort
SELECT - col0 * + col0 AS col1 FROM tab1 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT ALL - col2 AS col1 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT col1 - + col1 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NULL IS NULL
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-6568
SELECT ALL col2 DIV + col0 FROM tab0 AS cor0 GROUP BY col2, col0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-6568
SELECT ALL col2 / + col0 FROM tab0 AS cor0 GROUP BY col2, col0
----
0
0
3

query I rowsort
SELECT ALL - col0 FROM tab1 cor0 GROUP BY col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col1 FROM tab2 GROUP BY col2 HAVING NOT col2 IS NULL
----
58
79
87

query I rowsort
SELECT col1 * - col1 FROM tab0 AS cor0 GROUP BY col1, col1, col2
----
-6561
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col0 FROM tab0 AS cor0 GROUP BY col2, col0
----
24
38
79

query I rowsort
SELECT ALL - col0 FROM tab1 GROUP BY col0, col0
----
-22
-28
-82

query I rowsort
SELECT ALL - col2 AS col2 FROM tab0 WHERE NOT NULL IS NULL GROUP BY col2
----

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT + col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, col2, col1
----
-45
-71
-8

query I rowsort
SELECT + col2 FROM tab0 AS cor0 GROUP BY col2, col0
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT col2 col0, col2 AS col1 FROM tab1 GROUP BY col2
----
45
45
71
71
8
8

query I rowsort
SELECT col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, col1
----
26
43
83

query I rowsort
SELECT + col0 FROM tab2 GROUP BY col0, col2
----
15
91
92

query I rowsort
SELECT col0 FROM tab2 GROUP BY col1, col2, col0
----
15
91
92

query I rowsort
SELECT DISTINCT + col1 FROM tab1 AS cor0 GROUP BY col1, col0
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col0 FROM tab0 GROUP BY col1, col0, col0
----
26
43
83

query I rowsort
SELECT ALL + - col0 FROM tab1 AS cor0 GROUP BY col0, col0 HAVING NOT NULL IS NOT NULL
----
-22
-28
-82

query I rowsort
SELECT ALL col1 FROM tab2 GROUP BY col1, col1
----
41
59
61

query I rowsort
SELECT DISTINCT col2 FROM tab0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT col0 FROM tab0 GROUP BY col0, col1
----
26
43
83

query I rowsort
SELECT + - col0 FROM tab2 AS cor0 GROUP BY col0, col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - col2 - - col2 AS col1 FROM tab1 cor0 GROUP BY col2, col0
----
0

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab0 GROUP BY col2, col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + + col2 FROM tab1 AS cor0 GROUP BY col2, col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col0 * + + col2 * + - col2 AS col0 FROM tab1 AS cor0 GROUP BY col0, col2
----
1408
413362
56700

query I rowsort
SELECT col0 AS col1 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, col0
----
-41
-59
-61

query I rowsort
SELECT + col0 AS col0 FROM tab1 GROUP BY col0, col0, col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + col1 FROM tab0 GROUP BY col2, col1
----
0
0
81

query I rowsort
SELECT DISTINCT col1 FROM tab0 AS cor0 GROUP BY col1, col1
----
0
81

query I rowsort
SELECT - - col0 FROM tab1 AS cor0 GROUP BY col0, col0, col0 HAVING NOT NULL IS NOT NULL
----
22
28
82

query I rowsort
SELECT col1 AS col2 FROM tab0 AS cor0 GROUP BY col0, col1, col1
----
0
0
81

query I rowsort
SELECT + + col1 AS col0 FROM tab0 AS cor0 GROUP BY col2, col1
----
0
0
81

query I rowsort
SELECT ALL + col2 AS col0 FROM tab0 AS cor0 GROUP BY col0, col2
----
24
38
79

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab1 GROUP BY col2, col0
----
45
71
8

query I rowsort
SELECT - col2 FROM tab0 AS cor0 GROUP BY col1, col2
----
-24
-38
-79

query I rowsort
SELECT - - col2 FROM tab2 AS cor0 GROUP BY col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + col1 AS col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT - col0 / + - AVG ( col0 ) FROM tab2 GROUP BY col0 HAVING NOT - col0 <> + col0
----

query I rowsort
SELECT ALL - col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT col2 AS col0 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT NULL < NULL
----

query I rowsort
SELECT DISTINCT + col0 + - col0 * - + col0 FROM tab0 GROUP BY col0
----
1892
6972
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT - col2 * + col2 AS col2 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT + col2 FROM tab2 GROUP BY col2, col1
----
58
79
87

query I rowsort
SELECT + col2 FROM tab2 GROUP BY col2, col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col1 FROM tab1 cor0 GROUP BY col2, col1
----
44
57
6

query I rowsort
SELECT DISTINCT + col2 FROM tab0 cor0 GROUP BY col2, col1
----
24
38
79

query I rowsort
SELECT ALL + col0 AS col1 FROM tab1 GROUP BY col2, col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col1 FROM tab2 GROUP BY col0, col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col1 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - - col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
41
59
61

query I rowsort
SELECT - col2 FROM tab1 AS cor0 GROUP BY col0, col2
----
-45
-71
-8

query I rowsort
SELECT - col1 AS col1 FROM tab2 GROUP BY col2, col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - - col0 AS col1 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL - col0 AS col0 FROM tab2 GROUP BY col0 HAVING NULL IS NULL
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - - col0 AS col2 FROM tab0 AS cor0 GROUP BY col0, col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col0 FROM tab1 cor0 GROUP BY col0, col1
----
44
57
6

query I rowsort
SELECT DISTINCT - col1 FROM tab2 AS cor0 GROUP BY col1, col1
----
-41
-59
-61

query I rowsort
SELECT col1 AS col2 FROM tab0 GROUP BY col1, col1
----
0
81

query I rowsort
SELECT ALL + - col2 AS col1 FROM tab1 AS cor0 GROUP BY col2 HAVING NULL IS NULL
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - + col0 FROM tab0 AS cor0 GROUP BY col2, col0
----
-26
-43
-83

query I rowsort
SELECT - + col1 * col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
-1681
-3481
-3721

query I rowsort
SELECT ALL col1 AS col2 FROM tab1 cor0 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT col0 FROM tab2 GROUP BY col0, col2
----
15
91
92

query II rowsort
SELECT DISTINCT + col1 AS col1, col2 FROM tab1 GROUP BY col1, col2
----
44
71
57
45
6
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL + col2 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL - - col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT + - col2 AS col1 FROM tab0 cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query II rowsort
SELECT DISTINCT - + col1 AS col2, - col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-41
-59
-59
-61
-61

query I rowsort
SELECT ALL + - AVG ( DISTINCT - col2 ) AS col0 FROM tab1 AS cor0 GROUP BY col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - + col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + col0 FROM tab0 GROUP BY col1, col0, col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col1 FROM tab1 cor0 GROUP BY col0, col2
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-6648
SELECT DISTINCT - col1 DIV - col1 col1 FROM tab2 GROUP BY col1
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6648
SELECT DISTINCT - col1 / - col1 col1 FROM tab2 GROUP BY col1
----
1

query I rowsort
SELECT col2 AS col2 FROM tab2 GROUP BY col0, col0, col2
----
58
79
87

query I rowsort
SELECT - col0 AS col0 FROM tab2 GROUP BY col0, col2, col1, col1
----
-15
-91
-92

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab2 AS cor0 GROUP BY col2, col0
----
15
91
92

query I rowsort
SELECT + col2 AS col2 FROM tab1 GROUP BY col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT col1 AS col1 FROM tab2 GROUP BY col2, col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + col2 col1 FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT col2 AS col2 FROM tab0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT + col1 FROM tab0 GROUP BY col1, col1, col1 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT col0 FROM tab1 GROUP BY col2, col0
----
22
28
82

query I rowsort
SELECT DISTINCT - col2 FROM tab1 AS cor0 GROUP BY col2, col2
----
-45
-71
-8

query I rowsort
SELECT ALL + - col1 AS col0 FROM tab0 cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT + col1 FROM tab2 GROUP BY col1, col1
----
41
59
61

query I rowsort
SELECT ALL + col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, col0, col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-6663
SELECT ALL - col0 DIV - col0 AS col1 FROM tab2 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6663
SELECT ALL - col0 / - col0 AS col1 FROM tab2 GROUP BY col0
----
1
1
1

query I rowsort
SELECT ALL + - col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL - - col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT col2 + + col2 * + - col2 FROM tab0 GROUP BY col2
----
-1406
-552
-6162

query II rowsort
SELECT DISTINCT col1, + col1 AS col1 FROM tab2 GROUP BY col1, col2
----
41
41
59
59
61
61

query I rowsort
SELECT col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
0
0
81

query II rowsort
SELECT ALL col0, col0 FROM tab1 GROUP BY col0, col2
----
22
22
28
28
82
82

query I rowsort
SELECT ALL - col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NULL IS NULL
----
-41
-59
-61

query I rowsort
SELECT + col1 FROM tab1 GROUP BY col1 HAVING NULL IS NULL
----
44
57
6

query II rowsort
SELECT - col2, col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
45
-71
71
-8
8

query I rowsort
SELECT DISTINCT col0 FROM tab2 AS cor0 WHERE NOT ( NULL ) <> NULL GROUP BY col0
----

query I rowsort
SELECT ALL + col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL - col1 AS col0 FROM tab1 GROUP BY col2, col1, col1
----
-44
-57
-6

query I rowsort
SELECT + col0 AS col1 FROM tab0 GROUP BY col2, col1, col0 HAVING NULL IS NULL
----
26
43
83

query I rowsort
SELECT + col1 AS col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT + col0 FROM tab0 GROUP BY col0, col0
----
26
43
83

query I rowsort
SELECT ALL col0 FROM tab1 GROUP BY col0 HAVING NOT NULL IS NOT NULL
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-6680
SELECT col1 DIV col1 + - col1 FROM tab1 AS cor0 GROUP BY col1
----
-43
-5
-56

skipif mysql # not compatible
query I rowsort label-6680
SELECT col1 / col1 + - col1 FROM tab1 AS cor0 GROUP BY col1
----
-43
-5
-56

query I rowsort
SELECT ALL col2 + + col2 AS col2 FROM tab1 GROUP BY col2
----
142
16
90

query I rowsort
SELECT DISTINCT col2 FROM tab2 AS cor0 GROUP BY col2, col1
----
58
79
87

query I rowsort
SELECT DISTINCT col1 FROM tab0 WHERE NOT ( NULL ) >= col1 GROUP BY col2, col1
----

query I rowsort
SELECT - - col0 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - col2 AS col0 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL - + col1 FROM tab2 AS cor0 GROUP BY col1, col0
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT - + col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, col0
----
-81
0

query I rowsort
SELECT ALL col0 FROM tab0 AS cor0 GROUP BY col2, col0
----
26
43
83

query I rowsort
SELECT DISTINCT - col1 * + col1 FROM tab1 AS cor0 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT - col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + col2 * - col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT - + col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT col0 FROM tab2 GROUP BY col0, col1
----
15
91
92

query I rowsort
SELECT ALL col1 AS col1 FROM tab1 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - col1 FROM tab1 GROUP BY col1, col1
----
-44
-57
-6

query I rowsort
SELECT ALL + col1 FROM tab2 GROUP BY col0, col1
----
41
59
61

query I rowsort
SELECT ALL - col0 * col0 AS col2 FROM tab1 GROUP BY col0, col2
----
-484
-6724
-784

query I rowsort
SELECT - col2 FROM tab0 AS cor0 GROUP BY col2, col0
----
-24
-38
-79

query I rowsort
SELECT + col0 - col0 + - col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + + col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL + col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query II rowsort
SELECT DISTINCT + col1 AS col2, - col1 FROM tab0 AS cor0 GROUP BY col1
----
0
0
81
-81

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab0 GROUP BY col2, col1
----
24
38
79

query I rowsort
SELECT col2 AS col0 FROM tab2 GROUP BY col0, col2, col0
----
58
79
87

query II rowsort
SELECT DISTINCT - col1 AS col0, col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-44
44
-57
57
-6
6

query I rowsort
SELECT + col1 - - + col1 AS col0 FROM tab0 GROUP BY col1
----
0
162

query I rowsort
SELECT - col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col0 col1 FROM tab0 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL - col2 * - + col2 FROM tab1 cor0 GROUP BY col2, col2
----
2025
5041
64

query I rowsort
SELECT ALL + - col2 FROM tab1 AS cor0 GROUP BY col2, col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT - col0 col1, - col0 AS col2 FROM tab1 GROUP BY col0
----
-22
-22
-28
-28
-82
-82

query II rowsort
SELECT DISTINCT - col2, col2 AS col2 FROM tab1 GROUP BY col2
----
-45
45
-71
71
-8
8

query I rowsort
SELECT ALL + col2 + - col2 * - + col2 AS col2 FROM tab0 GROUP BY col2 HAVING NULL < NULL
----

query I rowsort
SELECT - + col2 + - col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-116
-158
-174

query I rowsort
SELECT col1 + + col1 AS col0 FROM tab2 GROUP BY col1
----
118
122
82

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL + col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + col0 FROM tab2 AS cor0 GROUP BY col0, col1
----
15
91
92

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab2 GROUP BY col0, col1
----
-15
-91
-92

query II rowsort
SELECT ALL col1 AS col1, - col1 FROM tab0 GROUP BY col1, col1 HAVING NOT NULL <> NULL
----

query I rowsort
SELECT col1 AS col1 FROM tab0 GROUP BY col1 HAVING NOT ( NULL ) NOT IN ( + col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col1 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - col0 FROM tab0 AS cor0 GROUP BY col0, col0 HAVING NULL IS NULL
----
-26
-43
-83

query I rowsort
SELECT ALL - - col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, col0 HAVING ( NULL ) <= NULL
----

query I rowsort
SELECT ALL col2 FROM tab0 GROUP BY col2, col0
----
24
38
79

query I rowsort
SELECT ALL col0 * - - col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, col0 HAVING col0 IS NOT NULL
----
484
6724
784

query I rowsort
SELECT ALL - col0 FROM tab0 AS cor0 WHERE NULL IS NULL GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL + col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + col2 * + col2 AS col1 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + col0 * + + col0 FROM tab1 cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT DISTINCT col0 FROM tab2 GROUP BY col0, col0
----
15
91
92

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab2 cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, col0
----
0
0
81

query I rowsort
SELECT DISTINCT - col0 FROM tab2 GROUP BY col1, col0
----
-15
-91
-92

query I rowsort
SELECT + col0 AS col0 FROM tab1 AS cor0 GROUP BY col0 HAVING NULL IS NULL
----
22
28
82

query I rowsort
SELECT ALL - col0 AS col2 FROM tab2 AS cor0 GROUP BY col0 HAVING NULL = NULL
----

query II rowsort
SELECT - col1, col1 FROM tab1 GROUP BY col1 HAVING NULL IS NULL
----
-44
44
-57
57
-6
6

query I rowsort
SELECT - + col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT - col0 AS col2 FROM tab0 GROUP BY col0, col2
----
-26
-43
-83

query I rowsort
SELECT col0 FROM tab2 AS cor0 GROUP BY col0 HAVING NULL IS NULL
----
15
91
92

query I rowsort
SELECT - col0 AS col2 FROM tab0 GROUP BY col1, col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + col0 col0 FROM tab2 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT ALL + col0 AS col2 FROM tab2 GROUP BY col0 HAVING + col0 IS NOT NULL
----
15
91
92

query I rowsort
SELECT + col1 AS col0 FROM tab1 cor0 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT ALL col2 * col2 AS col0 FROM tab0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT + col0 AS col0 FROM tab0 GROUP BY col0, col0
----
26
43
83

query I rowsort
SELECT + col0 FROM tab2 GROUP BY col0, col1
----
15
91
92

query I rowsort
SELECT ALL col2 * col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, col2
----
1260
176
5822

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + - col1 col2 FROM tab1 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT - - col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT - + col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, col1, col0
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-6755
SELECT col1 DIV - col1 FROM tab1 AS cor0 GROUP BY col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6755
SELECT col1 / - col1 FROM tab1 AS cor0 GROUP BY col1
----
-1
-1
-1

query I rowsort
SELECT + col1 AS col1 FROM tab0 cor0 GROUP BY col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 * + col2 col1 FROM tab2 AS cor0 GROUP BY col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + col2 FROM tab2 AS cor0 GROUP BY col2, col2
----
58
79
87

query I rowsort
SELECT ALL col0 FROM tab0 GROUP BY col0, col0
----
26
43
83

query I rowsort
SELECT - col0 * + - col0 FROM tab0 GROUP BY col0, col0
----
1849
676
6889

query I rowsort
SELECT col2 AS col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT col2 FROM tab1 GROUP BY col1, col2
----
45
71
8

query I rowsort
SELECT DISTINCT col2 FROM tab2 GROUP BY col2, col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - col0 AS col0 FROM tab2 GROUP BY col1, col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + col0 - - + col0 + - col2 AS col0 FROM tab1 AS cor0 GROUP BY col0, col2
----
11
36
93

query I rowsort
SELECT col1 * + col1 FROM tab0 AS cor0 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT col2 FROM tab0 GROUP BY col2 HAVING col2 < - AVG ( DISTINCT - col0 )
----
24
38

query I rowsort
SELECT DISTINCT + col1 FROM tab1 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT - col0 FROM tab0 cor0 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + col2 FROM tab1 GROUP BY col0, col2
----
45
71
8

query I rowsort
SELECT ALL - col0 AS col1 FROM tab1 GROUP BY col0, col1
----
-22
-28
-82

query I rowsort
SELECT col2 FROM tab2 GROUP BY col0, col2, col2
----
58
79
87

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + col1 FROM tab0 GROUP BY col1, col2
----
0
0
81

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab2 GROUP BY col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT col1 FROM tab0 GROUP BY col1, col0
----
0
81

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab0 GROUP BY col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL - col2 AS col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - col1 FROM tab2 AS cor0 GROUP BY col1, col0
----
-41
-59
-61

query I rowsort
SELECT ALL - col1 AS col0 FROM tab1 GROUP BY col1, col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + + col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab0 AS cor0 GROUP BY col2, col1
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col2 FROM tab0 GROUP BY col2 HAVING ( NOT ( NULL ) = NULL )
----

query I rowsort
SELECT + col1 FROM tab2 AS cor0 GROUP BY col1, col0
----
41
59
61

query I rowsort
SELECT ALL - - col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + col2 FROM tab1 AS cor0 GROUP BY col2, col0
----
45
71
8

query I rowsort
SELECT ALL + col1 FROM tab2 GROUP BY col1, col2
----
41
59
61

query I rowsort
SELECT + + col0 * col2 AS col2 FROM tab1 AS cor0 GROUP BY col0, col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + col2 AS col0 FROM tab2 GROUP BY col1, col2, col0
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col2 FROM tab0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT ALL - col0 * + col0 + + col0 FROM tab1 GROUP BY col0
----
-462
-6642
-756

query I rowsort
SELECT + col2 AS col2 FROM tab0 GROUP BY col2, col1
----
24
38
79

query I rowsort
SELECT DISTINCT - col2 FROM tab1 AS cor0 GROUP BY col2, col0
----
-45
-71
-8

query I rowsort
SELECT - col2 * - - col2 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT - col1 AS col0 FROM tab1 GROUP BY col1, col1, col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - col1 AS col0 FROM tab0 GROUP BY col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6798
SELECT + + col2 DIV + col2 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6798
SELECT + + col2 / + col2 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab2 GROUP BY col0, col1
----
41
59
61

query I rowsort
SELECT col1 FROM tab2 GROUP BY col1, col1
----
41
59
61

query I rowsort
SELECT DISTINCT col0 FROM tab2 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - + col0 FROM tab2 AS cor0 GROUP BY col0, col1
----
-15
-91
-92

query I rowsort
SELECT - col1 FROM tab2 AS cor0 GROUP BY col2, col1
----
-41
-59
-61

query I rowsort
SELECT col1 * - col1 * + col1 FROM tab2 AS cor0 GROUP BY col1
----
-205379
-226981
-68921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col1 FROM tab0 AS cor0 GROUP BY col2, col0 HAVING NULL IS NULL
----
24
38
79

query I rowsort
SELECT ALL - + col2 FROM tab0 AS cor0 GROUP BY col2, col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - col0 * + + col1 AS col2 FROM tab2 GROUP BY col0, col1
----
-3772
-5369
-915

query I rowsort
SELECT col0 * + - col0 AS col0 FROM tab0 GROUP BY col0, col0 HAVING NOT NULL IS NOT NULL
----
-1849
-676
-6889

query I rowsort
SELECT + col1 AS col0 FROM tab0 GROUP BY col2, col1 HAVING - col1 IS NULL
----

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1 HAVING ( NULL ) < col2
----

query I rowsort
SELECT DISTINCT - col2 * - col2 + - col2 AS col2 FROM tab1 GROUP BY col2, col2
----
1980
4970
56

onlyif mysql # DIV for integer division: 
query I rowsort label-6812
SELECT - col0 DIV + col0 FROM tab2 GROUP BY col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6812
SELECT - col0 / + col0 FROM tab2 GROUP BY col0
----
-1
-1
-1

query II rowsort
SELECT col1, col1 FROM tab2 GROUP BY col1, col1
----
41
41
59
59
61
61

query I rowsort
SELECT + - col1 * - col1 FROM tab0 cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT ALL + + col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL - + col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, col2
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col0 FROM tab2 AS cor0 GROUP BY col2, col0, col0
----
15
91
92

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT col1 AS col2 FROM tab2 GROUP BY col1 HAVING NOT NULL NOT IN ( - col2 )
----

query I rowsort
SELECT col0 * - col0 FROM tab1 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + - col2 FROM tab1 AS cor0 GROUP BY col2, col2
----
-45
-71
-8

query I rowsort
SELECT - AVG ( - col0 ) FROM tab0 GROUP BY col0 HAVING NULL < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL + + col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, col2, col1
----
44
57
6

query I rowsort
SELECT ALL + + col1 FROM tab1 cor0 GROUP BY col1, col1
----
44
57
6

query II rowsort
SELECT + col2, col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
24
24
38
38
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + - col2 FROM tab1 AS cor0 GROUP BY col1, col1, col2
----
-45
-71
-8

query I rowsort
SELECT ALL - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, col1
----
-44
-57
-6

query I rowsort
SELECT ALL - + col2 FROM tab2 cor0 GROUP BY col2, col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col1 FROM tab1 GROUP BY col0, col2
----
45
71
8

query I rowsort
SELECT ALL - col1 AS col1 FROM tab1 GROUP BY col1, col2
----
-44
-57
-6

query II rowsort
SELECT DISTINCT col0, col1 FROM tab1 GROUP BY col1, col0
----
22
6
28
57
82
44

query I rowsort
SELECT DISTINCT col0 + col2 FROM tab2 GROUP BY col0, col2
----
102
150
170

query I rowsort
SELECT ALL + col1 AS col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
0
0
81

query I rowsort
SELECT ALL + col2 FROM tab2 cor0 GROUP BY col1, col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col0 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT NULL NOT BETWEEN NULL AND NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-6839
SELECT - col2 - col1 DIV + col1 col0 FROM tab2 GROUP BY col1, col2
----
-59
-80
-88

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6839
SELECT - col2 - col1 / + col1 col0 FROM tab2 GROUP BY col1, col2
----
-59
-80
-88

query I rowsort
SELECT ALL col1 FROM tab0 AS cor0 GROUP BY col2, col0, col1
----
0
0
81

query I rowsort
SELECT - col2 * - col2 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT ALL + col0 AS col1 FROM tab0 GROUP BY col0, col0
----
26
43
83

query I rowsort
SELECT DISTINCT - col1 FROM tab1 AS cor0 GROUP BY col1, col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, col1
----
0
81

query I rowsort
SELECT ALL - + col1 AS col1 FROM tab1 cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-6847
SELECT DISTINCT - + col1 DIV - col2 FROM tab1 AS cor0 GROUP BY col1, col2
----
0
1

skipif mysql # not compatible
query I rowsort label-6847
SELECT DISTINCT - + col1 / - col2 FROM tab1 AS cor0 GROUP BY col1, col2
----
0
1

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab1 GROUP BY col1, col0
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL - col2 AS col2 FROM tab0 GROUP BY col2, col1 HAVING NULL IS NULL
----
-24
-38
-79

query I rowsort
SELECT - - col2 FROM tab0 cor0 GROUP BY col0, col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col1 FROM tab0 WHERE NULL = ( - col0 ) GROUP BY col1, col1
----

query I rowsort
SELECT col1 FROM tab0 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab1 GROUP BY col0, col1
----
44
57
6

query II rowsort
SELECT + col1 * + col1 AS col0, col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
1681
41
3481
59
3721
61

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT + col2 FROM tab1 GROUP BY col1, col2
----
45
71
8

query I rowsort
SELECT ALL col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT - col2 < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL + col0 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + col1 FROM tab0 GROUP BY col1, col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL col1 + + col1 AS col1 FROM tab0 GROUP BY col1
----
0
162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL + col0 FROM tab2 GROUP BY col0, col1
----
15
91
92

query I rowsort
SELECT + col0 FROM tab1 AS cor0 GROUP BY col2, col2, col0
----
22
28
82

query I rowsort
SELECT col2 + col1 FROM tab2 GROUP BY col1, col0, col2
----
138
148
99

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab2 AS cor0 GROUP BY col2 HAVING NULL IS NULL
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL col2 FROM tab0 AS cor0 GROUP BY col1, col2 HAVING NULL IS NULL
----
24
38
79

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab0 cor0 GROUP BY col1, col0, col1
----
-26
-43
-83

query I rowsort
SELECT ALL col0 FROM tab0 GROUP BY col0, col2 HAVING NOT NULL IS NOT NULL
----
26
43
83

query I rowsort
SELECT ALL + col1 + col1 FROM tab1 AS cor0 GROUP BY col1, col2
----
114
12
88

query I rowsort
SELECT ALL col2 FROM tab1 GROUP BY col2, col0
----
45
71
8

query I rowsort
SELECT col2 FROM tab1 GROUP BY col2, col1
----
45
71
8

query I rowsort
SELECT ALL + col2 - + col2 AS col1 FROM tab2 GROUP BY col1, col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 col0 FROM tab2 AS cor0 GROUP BY col2, col2
----
58
79
87

query I rowsort
SELECT DISTINCT + col0 + + col0 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col0 FROM tab2 GROUP BY col2, col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + col2 FROM tab2 AS cor0 GROUP BY col2, col0
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col0 FROM tab2 AS cor0 GROUP BY col2, col0
----
15
91
92

query I rowsort
SELECT DISTINCT - col0 * - col0 FROM tab0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT + + col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query II rowsort
SELECT + - col0 + - + col0 AS col1, - col0 FROM tab2 AS cor0 GROUP BY col0, col0
----
-182
-91
-184
-92
-30
-15

query I rowsort
SELECT DISTINCT - + col2 FROM tab0 AS cor0 GROUP BY col1, col2
----
-24
-38
-79

query I rowsort
SELECT col2 AS col2 FROM tab2 GROUP BY col2, col0 HAVING NULL IS NULL
----
58
79
87

query I rowsort
SELECT ALL col2 AS col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT col0 FROM tab0 AS cor0 GROUP BY col1, col0
----
26
43
83

query I rowsort
SELECT - col1 FROM tab2 AS cor0 GROUP BY col1, col1, col2
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + + col0 FROM tab1 WHERE NOT NULL IS NOT NULL GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT - + col1 AS col0 FROM tab1 WHERE - + col1 IS NOT NULL GROUP BY col1, col0
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + + col0 col2 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT + col1 AS col1 FROM tab2 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab1 GROUP BY col0 HAVING NOT col0 IS NULL
----
22
28
82

query I rowsort
SELECT - col1 AS col0 FROM tab0 AS cor0 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - col0 FROM tab1 GROUP BY col0, col2
----
-22
-28
-82

query I rowsort
SELECT - + col2 FROM tab0 AS cor0 GROUP BY col2, col0 HAVING NULL > + - AVG ( col1 )
----

query I rowsort
SELECT DISTINCT col0 FROM tab2 cor0 GROUP BY col0 HAVING NULL IS NULL
----
15
91
92

query I rowsort
SELECT col1 * + + col1 * - - col1 FROM tab2 GROUP BY col1, col1
----
205379
226981
68921

query I rowsort
SELECT - - col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT col2 AS col2 FROM tab0 GROUP BY col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT - + col2 AS col1 FROM tab2 AS cor0 GROUP BY col2 HAVING ( NULL ) IS NOT NULL
----

query II rowsort
SELECT col0, col0 FROM tab1 GROUP BY col0
----
22
22
28
28
82
82

query I rowsort
SELECT - col2 + - col2 FROM tab0 AS cor0 GROUP BY col2 HAVING ( col2 ) <> NULL
----

query I rowsort
SELECT DISTINCT col0 - - col0 AS col1 FROM tab2 cor0 GROUP BY col0
----
182
184
30

query I rowsort
SELECT ALL col0 * - + col0 * + - col0 FROM tab1 GROUP BY col0
----
10648
21952
551368

query I rowsort
SELECT col2 AS col2 FROM tab0 GROUP BY col0, col2
----
24
38
79

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab0 cor0 GROUP BY col2, col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - col2 FROM tab2 AS cor0 GROUP BY col2, col1, col2 HAVING ( NULL ) IS NULL
----
-58
-79
-87

query I rowsort
SELECT + - col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT - col0 AS col2 FROM tab2 AS cor0 GROUP BY col1, col0, col0
----
-15
-91
-92

query I rowsort
SELECT ALL + col0 FROM tab2 AS cor0 GROUP BY col1, col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-6913
SELECT ALL - + col2 DIV col2 FROM tab0 AS cor0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6913
SELECT ALL - + col2 / col2 FROM tab0 AS cor0 GROUP BY col2
----
-1
-1
-1

query II rowsort
SELECT + col1 AS col0, col2 AS col0 FROM tab0 AS cor0 WHERE NOT ( NULL ) IS NULL GROUP BY col2, col1
----

query I rowsort
SELECT col2 FROM tab2 AS cor0 GROUP BY col2, col1
----
58
79
87

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab1 GROUP BY col1, col2 HAVING NULL IS NULL
----
45
71
8

query I rowsort
SELECT + col1 AS col2 FROM tab2 cor0 WHERE NOT NULL IS NOT NULL GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT - col0 FROM tab2 AS cor0 GROUP BY col0, col1
----
-15
-91
-92

query I rowsort
SELECT DISTINCT col0 FROM tab2 AS cor0 GROUP BY col0, col1
----
15
91
92

query I rowsort
SELECT col0 FROM tab0 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + + col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
0
0
81

query I rowsort
SELECT ALL col2 FROM tab0 AS cor0 GROUP BY col2, col1
----
24
38
79

query I rowsort
SELECT DISTINCT + AVG ( + col0 ) * - col0 FROM tab0 AS cor0 GROUP BY col0, col0 HAVING NULL > + col0
----

query I rowsort
SELECT DISTINCT col2 + col2 FROM tab2 AS cor0 GROUP BY col2
----
116
158
174

query I rowsort
SELECT + col2 FROM tab1 GROUP BY col2, col2
----
45
71
8

query I rowsort
SELECT + col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, col1, col1
----
0
81

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab0 AS cor0 GROUP BY col0, col2
----
-24
-38
-79

query I rowsort
SELECT - col0 AS col1 FROM tab0 GROUP BY col0, col1
----
-26
-43
-83

query I rowsort
SELECT ALL + col2 + - - col2 FROM tab1 AS cor0 GROUP BY col2, col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT - - col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT DISTINCT + - col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT - - col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT - col2 FROM tab2 GROUP BY col1, col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT col0 FROM tab0 cor0 GROUP BY col0, col2
----
26
43
83

query I rowsort
SELECT + col1 FROM tab2 cor0 GROUP BY col0, col1, col1
----
41
59
61

query I rowsort
SELECT - col2 AS col2 FROM tab0 cor0 GROUP BY col2, col1
----
-24
-38
-79

query I rowsort
SELECT ALL + - col2 + + - col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, col2 HAVING NOT NULL IS NOT NULL
----
-158
-48
-76

query I rowsort
SELECT + col2 FROM tab1 AS cor0 GROUP BY col1, col2
----
45
71
8

query I rowsort
SELECT ALL + col0 AS col1 FROM tab1 GROUP BY col0, col0
----
22
28
82

query I rowsort
SELECT ALL - col0 AS col1 FROM tab1 cor0 GROUP BY col0, col2
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-6941
SELECT + - col2 DIV + col2 FROM tab0 AS cor0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6941
SELECT + - col2 / + col2 FROM tab0 AS cor0 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT col2 FROM tab1 AS cor0 GROUP BY col2, col2
----
45
71
8

query I rowsort
SELECT DISTINCT col0 FROM tab0 AS cor0 GROUP BY col2, col0
----
26
43
83

query I rowsort
SELECT ALL + col1 * - col1 * + - col1 FROM tab0 GROUP BY col1
----
0
531441

query I rowsort
SELECT ALL + col1 * + col1 FROM tab1 AS cor0 GROUP BY col1, col0, col1
----
1936
3249
36

query I rowsort
SELECT ALL + - col1 FROM tab1 AS cor0 GROUP BY col1, col2
----
-44
-57
-6

query I rowsort
SELECT DISTINCT col2 - col2 * col2 FROM tab1 cor0 GROUP BY col2
----
-1980
-4970
-56

query I rowsort
SELECT DISTINCT + col2 + col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
105
38
79

query I rowsort
SELECT - + col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT + col0 AS col1 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + col0 FROM tab0 GROUP BY col2, col0
----
26
43
83

query I rowsort
SELECT - col0 FROM tab2 GROUP BY col0, col0
----
-15
-91
-92

query I rowsort
SELECT - col0 FROM tab1 GROUP BY col2, col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT col1 + col1 FROM tab0 GROUP BY col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT DISTINCT - col1 + col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0

query I rowsort
SELECT - col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT - - col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col2 FROM tab1 GROUP BY col1, col2, col0 HAVING NULL IS NULL
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-6959
SELECT ALL - + col2 DIV col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6959
SELECT ALL - + col2 / col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + col0 + + col0 col0 FROM tab2 GROUP BY col0
----
-210
-8190
-8372

query II rowsort
SELECT + col2, col2 AS col1 FROM tab0 AS cor0 GROUP BY col2 HAVING NULL = NULL
----

query I rowsort
SELECT ALL + col1 AS col1 FROM tab1 cor0 GROUP BY col0, col1
----
44
57
6

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col1 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT col0 FROM tab0 GROUP BY col0 HAVING NOT ( NOT NULL IS NULL )
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT ALL - col0 col1, - col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-26
-43
-43
-83
-83

query I rowsort
SELECT col2 FROM tab1 AS cor0 WHERE NOT col2 = col1 + col1 GROUP BY col1, col2
----
45
71
8

query I rowsort
SELECT - + col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query II rowsort
SELECT col0, - col0 FROM tab0 cor0 WHERE ( NULL ) IN ( + col0 ) GROUP BY col0
----

query I rowsort
SELECT col2 AS col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - col0 FROM tab2 cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT col1 FROM tab2 AS cor0 GROUP BY col1, col1
----
41
59
61

query I rowsort
SELECT ALL col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, col1
----
45
71
8

query I rowsort
SELECT + col1 AS col1 FROM tab2 AS cor0 GROUP BY col2, col1
----
41
59
61

query I rowsort
SELECT ALL + col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, col0
----
58
79
87

query I rowsort
SELECT ALL col2 * col1 FROM tab0 AS cor0 GROUP BY col1, col2
----
0
0
1944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col1 FROM tab2 cor0 GROUP BY col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col1 FROM tab1 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT ALL + + col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT col0 AS col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL + + col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + col0 FROM tab0 AS cor0 GROUP BY col0, col0
----
26
43
83

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT col1 FROM tab0 GROUP BY col2, col1
----
0
0
81

query I rowsort
SELECT + col0 FROM tab1 GROUP BY col0 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT col1 FROM tab1 GROUP BY col0, col1
----
44
57
6

query I rowsort
SELECT - col0 * col0 FROM tab2 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL - col1 AS col1 FROM tab1 GROUP BY col2, col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + col0 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT ( NULL ) IS NOT NULL
----
26
43
83

query I rowsort
SELECT DISTINCT col0 FROM tab0 GROUP BY col2, col0
----
26
43
83

query I rowsort
SELECT - col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, col1
----
-41
-59
-61

query I rowsort
SELECT ALL + col1 FROM tab1 WHERE NOT NULL IS NOT NULL GROUP BY col2, col1
----
44
57
6

query I rowsort
SELECT + col1 FROM tab2 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, col2
----
-24
-38
-79

query I rowsort
SELECT col1 * + + col1 FROM tab0 GROUP BY col1
----
0
6561

query I rowsort
SELECT ALL + col0 FROM tab1 GROUP BY col2, col0
----
22
28
82

query I rowsort
SELECT col0 + - col0 FROM tab2 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL col0 + + col0 FROM tab2 cor0 GROUP BY col0
----
182
184
30

query I rowsort
SELECT ALL col2 FROM tab0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT - col2 FROM tab1 GROUP BY col1, col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + - col0 FROM tab0 WHERE NOT NULL < NULL GROUP BY col0
----

query I rowsort
SELECT - - col2 + - col2 AS col0 FROM tab2 AS cor0 WHERE NOT NULL BETWEEN col0 AND NULL GROUP BY col2
----

query I rowsort
SELECT ALL - col2 * - col2 + + col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
2070
5112
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col0 col2 FROM tab2 GROUP BY col0, col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col1 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL - col1 FROM tab0 WHERE NOT NULL NOT BETWEEN - col2 AND + - col2 GROUP BY col1
----

query I rowsort
SELECT DISTINCT + col0 - - + col0 FROM tab0 GROUP BY col0, col2
----
166
52
86

query I rowsort
SELECT ALL + col0 FROM tab0 GROUP BY col0, col0, col1
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col1 FROM tab1 GROUP BY col2, col0
----
22
28
82

query I rowsort
SELECT DISTINCT col0 FROM tab2 GROUP BY col2, col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col2 FROM tab2 GROUP BY col2 HAVING NULL IS NULL
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col0 FROM tab2 GROUP BY col0, col0 HAVING NOT - col0 IS NOT NULL
----

query I rowsort
SELECT - col1 FROM tab0 AS cor0 GROUP BY col1, col1
----
-81
0

query I rowsort
SELECT DISTINCT + + col1 FROM tab0 cor0 GROUP BY col2, col1, col1
----
0
81

query I rowsort
SELECT + col2 FROM tab0 GROUP BY col2, col0
----
24
38
79

query I rowsort
SELECT + col1 + + col2 AS col1 FROM tab0 GROUP BY col1, col2
----
105
38
79

query I rowsort
SELECT ALL col2 FROM tab2 GROUP BY col2, col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col2 col0 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT - col0 FROM tab2 AS cor0 GROUP BY col0, col0
----
-15
-91
-92

query I rowsort
SELECT ALL col1 FROM tab2 GROUP BY col1, col0, col1
----
41
59
61

query I rowsort
SELECT - col1 FROM tab2 GROUP BY col0, col0, col1
----
-41
-59
-61

query I rowsort
SELECT ALL col0 * + col0 FROM tab0 GROUP BY col0, col1
----
1849
676
6889

query I rowsort
SELECT ALL - col0 AS col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

query II rowsort
SELECT - - col2, col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
58
58
79
79
87
87

query I rowsort
SELECT DISTINCT - + col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col0 FROM tab0 GROUP BY col1, col2
----
-81
0
0

query I rowsort
SELECT DISTINCT col0 FROM tab1 GROUP BY col0, col2, col1
----
22
28
82

query I rowsort
SELECT ALL col0 AS col1 FROM tab0 GROUP BY col0 HAVING NULL IS NULL
----
26
43
83

query I rowsort
SELECT DISTINCT - col1 * - - col1 AS col1 FROM tab0 AS cor0 WHERE ( NULL ) IS NOT NULL GROUP BY col1
----

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab1 GROUP BY col2, col0
----
22
28
82

query I rowsort
SELECT ALL - col1 FROM tab2 AS cor0 GROUP BY col1, col1
----
-41
-59
-61

query I rowsort
SELECT + col0 AS col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - - col2 AS col0 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL - - col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, col2
----
22
28
82

query I rowsort
SELECT col1 FROM tab2 GROUP BY col1 HAVING ( NULL ) > NULL
----

query I rowsort
SELECT DISTINCT AVG ( + col2 ) AS col1 FROM tab2 GROUP BY col2 HAVING NULL <> - col2
----

query I rowsort
SELECT ALL - col2 AS col1 FROM tab2 cor0 GROUP BY col2
----
-58
-79
-87

query II rowsort
SELECT ALL + col0, col0 FROM tab1 GROUP BY col0
----
22
22
28
28
82
82

query I rowsort
SELECT ALL + col2 AS col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL - + col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT col2 AS col2 FROM tab1 WHERE NULL IS NULL GROUP BY col2
----
45
71
8

query I rowsort
SELECT col0 FROM tab2 GROUP BY col1, col0, col1
----
15
91
92

query I rowsort
SELECT + col2 * col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 col0 FROM tab2 cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT col1 FROM tab2 GROUP BY col1 HAVING ( NULL ) <= NULL
----

query I rowsort
SELECT + - col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT + col1 FROM tab2 GROUP BY col0, col1
----
41
59
61

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab1 AS cor0 GROUP BY col1, col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * col1 col2 FROM tab1 AS cor0 GROUP BY col1, col0
----
1936
3249
36

query I rowsort
SELECT ALL + + col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query II rowsort
SELECT + col2, + col2 FROM tab2 AS cor0 GROUP BY col2
----
58
58
79
79
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 col2 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab1 AS cor0 GROUP BY col2, col1
----
-44
-57
-6

query I rowsort
SELECT col0 AS col0 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT - col1 FROM tab1 AS cor0 GROUP BY col0, col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - - col1 FROM tab0 AS cor0 GROUP BY col0, col1, col1 HAVING NOT - - col1 IS NOT NULL
----

query I rowsort
SELECT col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT ALL - + col0 FROM tab1 cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT ALL col1 AS col1 FROM tab2 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
41
59
61

query I rowsort
SELECT col1 * - col1 AS col0 FROM tab0 GROUP BY col0, col1, col2
----
-6561
0
0

query I rowsort
SELECT col2 AS col0 FROM tab2 GROUP BY col2, col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab0 GROUP BY col2, col0, col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col1 FROM tab2 GROUP BY col1, col1, col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col0 FROM tab1 GROUP BY col2, col0
----
45
71
8

query I rowsort
SELECT - + col0 * + + col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL col2 * + col2 AS col1 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT + - col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, col1 HAVING NOT NULL IS NOT NULL
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col0 FROM tab2 AS cor0 GROUP BY col1, col2
----
-41
-59
-61

query I rowsort
SELECT ALL - col1 FROM tab2 GROUP BY col1, col1
----
-41
-59
-61

query I rowsort
SELECT + col1 FROM tab2 GROUP BY col1, col2
----
41
59
61

query I rowsort
SELECT col0 AS col2 FROM tab1 GROUP BY col2, col0
----
22
28
82

query I rowsort
SELECT ALL col2 FROM tab2 AS cor0 GROUP BY col2, col2
----
58
79
87

query I rowsort
SELECT + col0 FROM tab1 AS cor0 GROUP BY col0, col0
----
22
28
82

query I rowsort
SELECT - col0 + + col1 FROM tab2 AS cor0 GROUP BY col0, col1 HAVING NULL IS NULL
----
-32
-51
46

query I rowsort
SELECT ALL col2 FROM tab0 GROUP BY col1, col2
----
24
38
79

query I rowsort
SELECT col1 * + col1 * + col1 + - col1 FROM tab2 AS cor0 GROUP BY col1
----
205320
226920
68880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL + col1 * + col1 + - col1 FROM tab1 AS cor0 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + col1 AS col2 FROM tab0 GROUP BY col2, col1, col2
----
0
81

query I rowsort
SELECT + col2 + col2 - - col2 FROM tab1 AS cor0 WHERE NOT col2 IS NOT NULL GROUP BY col2, col2, col2
----

query I rowsort
SELECT ALL + + col1 FROM tab1 cor0 WHERE col0 IS NULL GROUP BY col1
----

query I rowsort
SELECT DISTINCT col0 FROM tab2 GROUP BY col0, col2
----
15
91
92

query I rowsort
SELECT - - col0 FROM tab1 AS cor0 WHERE NOT NULL > col1 GROUP BY col0
----

query I rowsort
SELECT + col2 * + col2 + - col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
1980
4970
56

query I rowsort
SELECT DISTINCT col2 FROM tab0 GROUP BY col2, col1
----
24
38
79

query I rowsort
SELECT - col2 AS col1 FROM tab1 GROUP BY col2 HAVING NULL = col2
----

query I rowsort
SELECT + - col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + + col0 FROM tab2 AS cor0 WHERE NOT col1 IS NOT NULL GROUP BY col0, col0
----

query I rowsort
SELECT + col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
41
59
61

query I rowsort
SELECT + col1 - - + col1 AS col1 FROM tab1 GROUP BY col1
----
114
12
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + col2 AS col2 FROM tab2 cor0 GROUP BY col2, col2
----
58
79
87

query I rowsort
SELECT ALL col1 AS col1 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT + col2 AS col2 FROM tab2 GROUP BY col2, col1, col2
----
58
79
87

query I rowsort
SELECT DISTINCT + col0 FROM tab0 GROUP BY col2, col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + - col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT col0 + col0 - - col0 FROM tab2 GROUP BY col0
----
273
276
45

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT + col2 * - col2 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL + col1 + + col1 FROM tab2 GROUP BY col1, col1
----
118
122
82

query I rowsort
SELECT + + col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col2 FROM tab1 GROUP BY col2, col2
----
45
71
8

query I rowsort
SELECT - col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT col1 FROM tab1 WHERE col0 IS NULL GROUP BY col0, col1
----

query I rowsort
SELECT - + col0 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL - col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL + col2 / + col2 / - - col1 / - col1 + - col1 FROM tab1 GROUP BY col2, col1 HAVING NULL <> - col2
----

onlyif mysql # DIV for integer division: 
query II rowsort label-7113
SELECT ALL - col1, - col1 DIV + col1 AS col0 FROM tab1 GROUP BY col0, col1
----
-44
-1
-57
-1
-6
-1

skipif mysql # not compatible
query II rowsort label-7113
SELECT ALL - col1, - col1 / + col1 AS col0 FROM tab1 GROUP BY col0, col1
----
-44
-1
-57
-1
-6
-1

query I rowsort
SELECT ALL col2 AS col0 FROM tab2 GROUP BY col2, col0, col0
----
58
79
87

query I rowsort
SELECT + + col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL - col2 AS col0 FROM tab0 GROUP BY col2, col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT col1 FROM tab1 AS cor0 WHERE NULL IS NULL GROUP BY col1, col0
----
44
57
6

query II rowsort
SELECT col1, col1 AS col1 FROM tab2 GROUP BY col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT + - col2 AS col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NULL IS NULL
----
-24
-38
-79

query I rowsort
SELECT + col1 + + col1 AS col2 FROM tab1 GROUP BY col1
----
114
12
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * - - col0 col0 FROM tab2 AS cor0 GROUP BY col0, col0, col1
----
225
8281
8464

query I rowsort
SELECT - col0 AS col2 FROM tab1 cor0 GROUP BY col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 col2 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT col1 FROM tab2 GROUP BY col1, col0
----
41
59
61

query I rowsort
SELECT ALL - col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query II rowsort
SELECT + col2 AS col1, col2 FROM tab2 cor0 GROUP BY col2, col2
----
58
58
79
79
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col0 FROM tab1 AS cor0 GROUP BY col0, col2, col1
----
22
28
82

query I rowsort
SELECT ALL col1 * + + col1 AS col1 FROM tab1 GROUP BY col1
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab1 AS cor0 GROUP BY col2 HAVING NOT ( NULL ) > NULL
----

query I rowsort
SELECT ALL + - col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL col1 FROM tab0 GROUP BY col1, col1, col2
----
0
0
81

query I rowsort
SELECT col0 AS col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - col2 AS col2 FROM tab2 cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + col1 FROM tab0 AS cor0 WHERE ( NULL ) IS NULL GROUP BY col1
----
0
81

query I rowsort
SELECT + col0 FROM tab1 GROUP BY col0, col0
----
22
28
82

query I rowsort
SELECT ALL col0 FROM tab1 GROUP BY col0, col1
----
22
28
82

query I rowsort
SELECT - - col2 FROM tab0 AS cor0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT ALL + col2 AS col1 FROM tab2 GROUP BY col0, col2, col2
----
58
79
87

query I rowsort
SELECT DISTINCT + - col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - col1 FROM tab1 cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT col1 * + col1 FROM tab1 AS cor0 WHERE NULL IS NULL GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT ALL col1 FROM tab2 GROUP BY col1 HAVING NULL IS NOT NULL
----

query II rowsort
SELECT col1 AS col2, col1 + - col1 FROM tab2 GROUP BY col1
----
41
0
59
0
61
0

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-7146
SELECT - col2 DIV + col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7146
SELECT - col2 / + col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT - col0 AS col0 FROM tab2 cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT + col0 AS col0 FROM tab2 GROUP BY col0, col0
----
15
91
92

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab1 GROUP BY col1, col0 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col0 FROM tab1 cor0 GROUP BY col0, col0
----
22
28
82

query II rowsort
SELECT DISTINCT col0 AS col0, + col0 AS col1 FROM tab0 GROUP BY col0
----
26
26
43
43
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - col0 col2 FROM tab2 GROUP BY col0
----
0

query I rowsort
SELECT + col0 FROM tab1 GROUP BY col1, col0
----
22
28
82

query I rowsort
SELECT DISTINCT - col2 FROM tab2 cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT - col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab0 cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL - col2 AS col1 FROM tab0 GROUP BY col2, col0 HAVING col0 BETWEEN - col2 AND ( NULL )
----

query I rowsort
SELECT - col1 AS col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
-81
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col1 FROM tab0 GROUP BY col0, col2
----
24
38
79

query I rowsort
SELECT + - col0 + + col0 FROM tab0 AS cor0 GROUP BY col0 HAVING NULL IS NULL
----
0
0
0

query I rowsort
SELECT + col1 AS col1 FROM tab0 GROUP BY col1, col2
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT + - col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL + - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab2 GROUP BY col2, col1
----
58
79
87

query I rowsort
SELECT DISTINCT col2 FROM tab2 GROUP BY col1, col2
----
58
79
87

query I rowsort
SELECT col0 * col0 FROM tab1 GROUP BY col0, col0, col1
----
484
6724
784

query I rowsort
SELECT DISTINCT + - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL - col1 * + col0 FROM tab2 GROUP BY col0, col1
----
-3772
-5369
-915

query I rowsort
SELECT - col0 * + col0 + + col0 FROM tab2 AS cor0 GROUP BY col0
----
-210
-8190
-8372

query I rowsort
SELECT ALL col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, col2
----
44
57
6

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab2 AS cor0 WHERE + col1 IS NOT NULL GROUP BY col1, col0
----
-15
-91
-92

query I rowsort
SELECT - - col2 AS col2 FROM tab2 cor0 GROUP BY col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-7174
SELECT + - col0 DIV col0 - - + col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
21
27
81

skipif mysql # not compatible
query I rowsort label-7174
SELECT + - col0 / col0 - - + col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
21
27
81

query I rowsort
SELECT DISTINCT col1 FROM tab1 WHERE NOT NULL <> NULL GROUP BY col1
----

query I rowsort
SELECT ALL - col0 * + - col0 * + col0 FROM tab1 GROUP BY col0
----
10648
21952
551368

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col2 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL col1 FROM tab2 GROUP BY col2, col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col0 FROM tab1 AS cor0 GROUP BY col1, col0
----
44
57
6

query II rowsort
SELECT col1 AS col1, col1 * + - col1 AS col0 FROM tab0 GROUP BY col1
----
0
0
81
-6561

query I rowsort
SELECT - col2 AS col0 FROM tab2 GROUP BY col2 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col2 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query II rowsort
SELECT - col1, col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
44
-57
57
-6
6

query I rowsort
SELECT DISTINCT - col0 * + + col0 FROM tab1 AS cor0 GROUP BY col0, col0
----
-484
-6724
-784

query I rowsort
SELECT + - col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT + - AVG ( ALL - col1 ) + + - col1 AS col2 FROM tab0 cor0 GROUP BY col1, col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL - + col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, col2, col0
----
-41
-59
-61

query I rowsort
SELECT ALL + col0 AS col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT + + col0 + col0 FROM tab2 AS cor0 GROUP BY col0
----
182
184
30

query I rowsort
SELECT DISTINCT + col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL + + col1 FROM tab0 AS cor0 GROUP BY col1, col1
----
0
81

query I rowsort
SELECT col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col0 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT - col2 + + col2 FROM tab0 GROUP BY col0, col1, col2 HAVING NOT col2 IS NOT NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-7197
SELECT ALL col0 DIV + col0 FROM tab0 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7197
SELECT ALL col0 / + col0 FROM tab0 GROUP BY col0
----
1
1
1

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab2 AS cor0 GROUP BY col2, col0, col0
----
15
91
92

query I rowsort
SELECT ALL - col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, col0
----
-24
-38
-79

query I rowsort
SELECT - col1 AS col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL + + col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT AVG ( col2 ) * col2 FROM tab2 GROUP BY col2, col2, col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab2 GROUP BY col2, col2
----
-58
-79
-87

query I rowsort
SELECT - col2 - + + col2 FROM tab2 AS cor0 GROUP BY col2
----
-116
-158
-174

query I rowsort
SELECT DISTINCT col1 + + - col1 FROM tab2 GROUP BY col1
----
0

query I rowsort
SELECT + col0 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL col0 AS col1 FROM tab0 GROUP BY col2, col0
----
26
43
83

query I rowsort
SELECT - col0 FROM tab2 GROUP BY col0, col0 HAVING NOT NULL IS NOT NULL
----
-15
-91
-92

query I rowsort
SELECT + col1 FROM tab0 AS cor0 GROUP BY col1 HAVING NULL <= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * - col2 col1 FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT + col1 AS col0 FROM tab2 GROUP BY col0, col1
----
41
59
61

query I rowsort
SELECT - col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL + col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT ALL - col1 FROM tab1 cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab1 GROUP BY col1, col0
----
44
57
6

query I rowsort
SELECT + - col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab2 GROUP BY col1, col1
----
41
59
61

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab0 WHERE NOT col2 <> col0 GROUP BY col2, col2, col2
----

onlyif mysql # DIV for integer division: 
query I rowsort label-7220
SELECT ALL + col2 DIV + col2 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7220
SELECT ALL + col2 / + col2 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT ALL + + col0 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL - col0 AS col1 FROM tab2 GROUP BY col0, col2, col0
----
-15
-91
-92

query I rowsort
SELECT ALL + + col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL col0 + col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
164
44
56

query I rowsort
SELECT - col2 + - col2 AS col1 FROM tab0 GROUP BY col2
----
-158
-48
-76

query I rowsort
SELECT - - col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, col0 HAVING - col0 * col0 BETWEEN NULL AND ( col0 )
----

query I rowsort
SELECT ALL - col1 FROM tab2 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT col2 FROM tab1 GROUP BY col0, col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col0 FROM tab0 GROUP BY col0, col2
----
-26
-43
-83

query I rowsort
SELECT ALL - - col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query II rowsort
SELECT + col2, + col2 AS col0 FROM tab2 GROUP BY col2
----
58
58
79
79
87
87

query I rowsort
SELECT + col1 AS col1 FROM tab1 cor0 GROUP BY col1, col2
----
44
57
6

query I rowsort
SELECT ALL + col0 + + col0 + + - col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL + + col1 FROM tab2 AS cor0 GROUP BY col1, col0, col1
----
41
59
61

query I rowsort
SELECT DISTINCT col2 FROM tab0 GROUP BY col0, col2
----
24
38
79

query I rowsort
SELECT ALL + + col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL col2 FROM tab0 GROUP BY col2, col1
----
24
38
79

query I rowsort
SELECT col0 FROM tab0 AS cor0 GROUP BY col2, col0
----
26
43
83

query I rowsort
SELECT ALL col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL - col2 FROM tab2 AS cor0 GROUP BY col0, col2
----
-58
-79
-87

query I rowsort
SELECT + col2 AS col2 FROM tab1 AS cor0 GROUP BY col0, col2, col2 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col0 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL col2 AS col2 FROM tab0 GROUP BY col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - col0 + col0 FROM tab2 cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT + col2 FROM tab0 GROUP BY col2, col2 HAVING NOT NULL > NULL
----

query I rowsort
SELECT ALL + + col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT + col1 AS col0 FROM tab1 GROUP BY col1, col0
----
44
57
6

query I rowsort
SELECT + col0 AS col0 FROM tab0 GROUP BY col2, col0, col0 HAVING - col0 < NULL
----

query I rowsort
SELECT DISTINCT + + col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL col2 FROM tab0 AS cor0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT - col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, col1
----
-81
0

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT + col2 + col2 AS col0 FROM tab0 AS cor0 WHERE NOT - col2 IS NULL GROUP BY col2
----
158
48
76

query I rowsort
SELECT - col2 AS col1 FROM tab0 AS cor0 WHERE NOT ( NULL ) IS NULL GROUP BY col2
----

query I rowsort
SELECT col1 + - - col1 FROM tab1 GROUP BY col1
----
114
12
88

query I rowsort
SELECT ALL + col2 * col2 FROM tab0 AS cor0 GROUP BY col2, col0
----
1444
576
6241

query I rowsort
SELECT - col1 FROM tab1 cor0 GROUP BY col0, col0, col1
----
-44
-57
-6

query I rowsort
SELECT col2 * + col2 AS col1 FROM tab0 GROUP BY col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col0 FROM tab1 GROUP BY col0, col1
----
44
57
6

query I rowsort
SELECT ALL - col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + col2 * - col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT col1 FROM tab2 AS cor0 WHERE NOT NULL IS NULL GROUP BY col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col0 col1 FROM tab2 GROUP BY col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, col1, col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 col2 FROM tab0 GROUP BY col1, col2
----
-24
-38
-79

query I rowsort
SELECT col2 * + + col2 AS col0 FROM tab1 GROUP BY col0, col2, col1
----
2025
5041
64

query I rowsort
SELECT col0 + col0 * + + col0 FROM tab0 AS cor0 GROUP BY col0
----
1892
6972
702

query I rowsort
SELECT ALL - col0 FROM tab0 AS cor0 GROUP BY col2, col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT col0 FROM tab2 cor0 GROUP BY col0, col1
----
15
91
92

query I rowsort
SELECT ALL - col1 FROM tab1 GROUP BY col2, col2, col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - col2 - col2 FROM tab0 GROUP BY col2
----
-158
-48
-76

query I rowsort
SELECT + col0 AS col1 FROM tab2 GROUP BY col0, col0
----
15
91
92

query I rowsort
SELECT ALL - + col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, col0 HAVING NOT NULL > ( NULL )
----

query I rowsort
SELECT ALL + col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT DISTINCT col1 FROM tab0 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
0
81

query I rowsort
SELECT col1 AS col0 FROM tab1 GROUP BY col1 HAVING - col1 <= NULL
----

query I rowsort
SELECT ALL col1 FROM tab0 AS cor0 GROUP BY col1, col1
----
0
81

query I rowsort
SELECT col1 * + col1 AS col2 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - + col2 FROM tab1 AS cor0 GROUP BY col0, col2
----
-45
-71
-8

query I rowsort
SELECT + col0 AS col0 FROM tab2 GROUP BY col0 HAVING NULL IS NULL
----
15
91
92

query I rowsort
SELECT ALL - col2 AS col0 FROM tab0 AS cor0 GROUP BY col1, col2
----
-24
-38
-79

query I rowsort
SELECT ALL + col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT col2 AS col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + col1 FROM tab2 AS cor0 GROUP BY col0, col1
----
41
59
61

query I rowsort
SELECT col1 FROM tab2 GROUP BY col1 HAVING NULL IS NULL
----
41
59
61

query I rowsort
SELECT - col1 AS col2 FROM tab1 AS cor0 GROUP BY col0, col1
----
-44
-57
-6

query I rowsort
SELECT col1 AS col1 FROM tab0 GROUP BY col1, col1
----
0
81

query I rowsort
SELECT col2 FROM tab1 GROUP BY col0, col2 HAVING NOT NULL <> - col2
----

query I rowsort
SELECT ALL col2 AS col0 FROM tab0 AS cor0 GROUP BY col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL + - col0 FROM tab2 AS cor0 WHERE NOT - col0 IS NOT NULL GROUP BY col1, col0
----

onlyif mysql # DIV for integer division: 
query I rowsort label-7296
SELECT ALL + col0 DIV + col0 + + + col0 + - col0 FROM tab1 AS cor0 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7296
SELECT ALL + col0 / + col0 + + + col0 + - col0 FROM tab1 AS cor0 GROUP BY col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT + col1 FROM tab0 GROUP BY col1, col1
----
0
81

query I rowsort
SELECT DISTINCT col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
0
81

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL col0 AS col2 FROM tab0 GROUP BY col0, col0 HAVING NOT - col2 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT - + col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, col1 HAVING NOT - - col1 IS NULL
----
-44
-57
-6

query I rowsort
SELECT ALL col0 AS col2 FROM tab0 GROUP BY col2, col0, col0
----
26
43
83

query I rowsort
SELECT col0 * + col0 FROM tab2 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT + col1 * col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT ALL col0 FROM tab1 GROUP BY col2, col0
----
22
28
82

query I rowsort
SELECT + col2 * col2 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT + col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - col1 AS col0 FROM tab1 GROUP BY col2, col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - - AVG ( ALL + col2 ) FROM tab2 AS cor0 WHERE - col1 IS NULL GROUP BY col2
----

query I rowsort
SELECT ALL + col0 FROM tab2 cor0 GROUP BY col2, col0
----
15
91
92

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab1 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT col1 + - col2 FROM tab0 GROUP BY col2, col1
----
-38
-79
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col1 FROM tab1 GROUP BY col2, col0
----
45
71
8

query I rowsort
SELECT DISTINCT col1 - + col1 FROM tab2 cor0 WHERE NOT NULL IS NOT NULL GROUP BY col1
----
0

query I rowsort
SELECT col1 + col1 * - col1 + - col1 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT - col2 AS col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT col2 FROM tab1 AS cor0 GROUP BY col2 HAVING NOT col2 < NULL
----

query I rowsort
SELECT col0 FROM tab2 GROUP BY col0 HAVING NOT - - col0 <> NULL
----

query I rowsort
SELECT ALL - col1 * col1 AS col0 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT DISTINCT - col1 FROM tab2 GROUP BY col1, col1
----
-41
-59
-61

query I rowsort
SELECT ALL col1 FROM tab1 GROUP BY col1, col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-7322
SELECT + col0 DIV col0 FROM tab2 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7322
SELECT + col0 / col0 FROM tab2 GROUP BY col0
----
1
1
1

query I rowsort
SELECT DISTINCT col2 + - col0 * - col2 AS col1 FROM tab2 GROUP BY col2, col0
----
1392
5394
7268

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, col2
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col2 FROM tab0 GROUP BY col1, col0
----
-26
-43
-83

query I rowsort
SELECT ALL + col0 AS col2 FROM tab1 GROUP BY col0, col0
----
22
28
82

query II rowsort
SELECT ALL + col1, + col1 AS col2 FROM tab2 GROUP BY col1
----
41
41
59
59
61
61

query I rowsort
SELECT DISTINCT - col0 FROM tab0 AS cor0 GROUP BY col0, col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT ALL col2 FROM tab0 GROUP BY col0, col2
----
24
38
79

query I rowsort
SELECT col0 FROM tab0 cor0 GROUP BY col0, col1
----
26
43
83

query I rowsort
SELECT ALL col0 FROM tab1 GROUP BY col1, col0
----
22
28
82

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + - col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, col1
----
-81
0

query I rowsort
SELECT DISTINCT + + col1 FROM tab1 AS cor0 GROUP BY col2, col1 HAVING - col1 IS NOT NULL
----
44
57
6

query I rowsort
SELECT - col2 AS col0 FROM tab0 GROUP BY col2, col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + col2 * - col1 FROM tab0 GROUP BY col1, col2, col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - - col1 AS col2 FROM tab0 AS cor0 GROUP BY col1 HAVING NULL IS NULL
----
0
81

query I rowsort
SELECT DISTINCT + col1 * - col1 - + col1 + + col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT DISTINCT - col1 FROM tab2 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT col1 / + - col1 AS col2 FROM tab0 AS cor0 GROUP BY col1 HAVING NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT - - col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - + col2 AS col2 FROM tab2 AS cor0 WHERE NOT - col2 > NULL GROUP BY col2, col2, col0
----

query I rowsort
SELECT col2 FROM tab1 WHERE + + col1 IS NOT NULL GROUP BY col2, col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col1 FROM tab2 AS cor0 GROUP BY col2, col1, col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-7347
SELECT + col2 * + col2 DIV col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

skipif mysql # not compatible
query I rowsort label-7347
SELECT + col2 * + col2 / col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col1 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL + col0 AS col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + col2 FROM tab2 AS cor0 WHERE ( NULL ) IS NULL GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, col1
----
26
43
83

query I rowsort
SELECT col2 FROM tab1 GROUP BY col2, col2
----
45
71
8

query I rowsort
SELECT + col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
41
59
61

query I rowsort
SELECT DISTINCT - col2 FROM tab1 AS cor0 GROUP BY col1, col2 HAVING + col2 NOT BETWEEN - col2 AND NULL
----

query I rowsort
SELECT - col0 * + - col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, col0
----
225
8281
8464

query I rowsort
SELECT col0 AS col1 FROM tab2 GROUP BY col1, col0
----
15
91
92

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + col2 AS col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT col1 AS col0 FROM tab1 GROUP BY col1 HAVING NOT NULL >= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 col2 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT col2 AS col1 FROM tab0 WHERE NOT NULL NOT BETWEEN NULL AND NULL GROUP BY col2
----

query I rowsort
SELECT + + col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + col1 + - + col1 FROM tab1 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT col0 AS col2 FROM tab2 GROUP BY col0, col0, col1
----
15
91
92

query I rowsort
SELECT - + col2 FROM tab2 AS cor0 WHERE col2 IS NULL GROUP BY col2, col2, col1
----

query I rowsort
SELECT DISTINCT - col2 FROM tab0 AS cor0 GROUP BY col2, col2
----
-24
-38
-79

query I rowsort
SELECT ALL col1 AS col1 FROM tab0 GROUP BY col0, col1
----
0
0
81

query I rowsort
SELECT col2 FROM tab2 AS cor0 GROUP BY col2, col0
----
58
79
87

query I rowsort
SELECT + col2 * col2 AS col0 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT col0 AS col2 FROM tab0 AS cor0 GROUP BY col0, col0
----
26
43
83

query I rowsort
SELECT DISTINCT - col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
41
59
61

query II rowsort
SELECT DISTINCT col2 AS col1, + col2 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
58
58
79
79
87
87

onlyif mysql # DIV for integer division: 
query I rowsort label-7375
SELECT - - col1 DIV - + col1 + + col1 FROM tab1 AS cor0 GROUP BY col1, col1
----
43
5
56

skipif mysql # not compatible
query I rowsort label-7375
SELECT - - col1 / - + col1 + + col1 FROM tab1 AS cor0 GROUP BY col1, col1
----
43
5
56

query I rowsort
SELECT ALL + col0 AS col2 FROM tab2 GROUP BY col0, col2
----
15
91
92

query I rowsort
SELECT col2 AS col0 FROM tab1 GROUP BY col0, col2
----
45
71
8

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab1 GROUP BY col2, col1
----
44
57
6

query I rowsort
SELECT col0 AS col1 FROM tab1 GROUP BY col0 HAVING NOT NULL IS NOT NULL
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-7380
SELECT DISTINCT col0 DIV + col0 FROM tab0 GROUP BY col1, col0, col0
----
1

skipif mysql # not compatible
query I rowsort label-7380
SELECT DISTINCT col0 / + col0 FROM tab0 GROUP BY col1, col0, col0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col1 FROM tab1 GROUP BY col2, col2
----
45
71
8

query I rowsort
SELECT DISTINCT + col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL - AVG ( DISTINCT + col1 ) + - AVG ( + col1 ) FROM tab0 GROUP BY col0, col1, col1 HAVING NOT NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT col1 + - col1 FROM tab2 GROUP BY col1
----
0

query I rowsort
SELECT col1 + col0 FROM tab0 AS cor0 GROUP BY col1, col0
----
124
26
83

query I rowsort
SELECT + - col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT - - col2 AS col0 FROM tab1 AS cor0 GROUP BY col2 HAVING ( NULL ) <> NULL
----

query I rowsort
SELECT ALL + col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT - col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, col1 HAVING NULL IS NULL
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - - col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + col0 + + col1 + + col1 FROM tab1 GROUP BY col1, col0
----
142
170
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col2 FROM tab2 AS cor0 GROUP BY col2, col1
----
41
59
61

query I rowsort
SELECT col1 FROM tab0 AS cor0 GROUP BY col1, col1
----
0
81

query I rowsort
SELECT ALL + col2 - - - col2 FROM tab1 GROUP BY col2, col2
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 FROM tab0 GROUP BY col1
----
-81
0

query II rowsort
SELECT DISTINCT - col0 AS col0, col2 FROM tab2 AS cor0 GROUP BY col0, col1, col2
----
-15
87
-91
79
-92
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 - - col0 col2 FROM tab0 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT DISTINCT col0 - - + col0 FROM tab1 AS cor0 GROUP BY col0
----
164
44
56

query II rowsort
SELECT DISTINCT + col2 AS col2, + col2 FROM tab1 AS cor0 GROUP BY col2
----
45
45
71
71
8
8

onlyif mysql # DIV for integer division: 
query I rowsort label-7400
SELECT + col0 DIV + + col0 FROM tab0 AS cor0 GROUP BY col2, col1, col0, col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7400
SELECT + col0 / + + col0 FROM tab0 AS cor0 GROUP BY col2, col1, col0, col2
----
1
1
1

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL + col1 FROM tab0 GROUP BY col1, col1 HAVING col1 IS NOT NULL
----
0
81

query I rowsort
SELECT DISTINCT - - col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT col1 AS col2 FROM tab1 WHERE NULL >= NULL GROUP BY col1
----

query I rowsort
SELECT ALL + col1 FROM tab1 WHERE NULL IS NOT NULL GROUP BY col1
----

query I rowsort
SELECT - - col0 + - col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
0
0
0

query I rowsort
SELECT DISTINCT - - col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + col1 FROM tab0 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT + + col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - - col2 AS col1 FROM tab0 AS cor0 GROUP BY col0, col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + + col2 FROM tab0 AS cor0 GROUP BY col0, col2
----
24
38
79

query I rowsort
SELECT ALL col1 FROM tab2 GROUP BY col0, col1
----
41
59
61

query I rowsort
SELECT - col2 - - col2 FROM tab0 AS cor0 GROUP BY col2, col2 HAVING NULL IS NULL
----
0
0
0

query I rowsort
SELECT + col0 FROM tab1 GROUP BY col0, col2
----
22
28
82

query I rowsort
SELECT ALL - col1 + - + col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-118
-122
-82

query I rowsort
SELECT ALL - col1 AS col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL - col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL - col2 FROM tab1 AS cor0 WHERE NOT ( NULL ) IS NOT NULL GROUP BY col2, col1 HAVING + col1 * + + col2 + + - col2 IS NOT NULL
----
-45
-71
-8

query I rowsort
SELECT col1 FROM tab1 GROUP BY col1, col0, col0
----
44
57
6

query I rowsort
SELECT + col0 FROM tab2 GROUP BY col0, col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col1 FROM tab0 GROUP BY col0, col0
----
26
43
83

query I rowsort
SELECT DISTINCT + col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col2 col2 FROM tab0 cor0 GROUP BY col2 HAVING NOT NULL IS NULL
----

query II rowsort
SELECT - + col1, + col1 AS col0 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT NULL IS NULL
----

query II rowsort
SELECT - col0 AS col1, col0 FROM tab2 cor0 GROUP BY col0
----
-15
15
-91
91
-92
92

query II rowsort
SELECT - + col0 AS col2, - col0 FROM tab1 AS cor0 GROUP BY col0, col2
----
-22
-22
-28
-28
-82
-82

query I rowsort
SELECT + + col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT ALL - col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, col1
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col0 FROM tab0 GROUP BY col0
----
26
43
83

query II rowsort
SELECT col0, - col0 * + - col0 FROM tab1 GROUP BY col0
----
22
484
28
784
82
6724

query I rowsort
SELECT ALL col2 FROM tab1 AS cor0 GROUP BY col2, col2
----
45
71
8

query I rowsort
SELECT - col1 AS col0 FROM tab1 AS cor0 GROUP BY col1 HAVING + + col1 IS NULL
----

query I rowsort
SELECT ALL + col2 FROM tab0 GROUP BY col2, col2, col0 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT DISTINCT col0 FROM tab0 AS cor0 WHERE NULL >= NULL GROUP BY col0
----

query I rowsort
SELECT col0 FROM tab1 GROUP BY col2, col0
----
22
28
82

query I rowsort
SELECT - col2 * col2 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT - col1 + + col1 FROM tab2 GROUP BY col1, col1 HAVING NULL IS NULL
----
0
0
0

query I rowsort
SELECT + - col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT col1 AS col0 FROM tab0 GROUP BY col1, col1 HAVING NOT ( NULL ) IS NOT NULL
----
0
81

query I rowsort
SELECT ALL col1 FROM tab1 GROUP BY col0, col1
----
44
57
6

query I rowsort
SELECT DISTINCT col0 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab1 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT + - col2 AS col2 FROM tab2 AS cor0 GROUP BY col1, col2
----
-58
-79
-87

query I rowsort
SELECT - col2 - - - col2 FROM tab2 AS cor0 GROUP BY col2
----
-116
-158
-174

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab0 AS cor0 GROUP BY col0, col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-7447
SELECT col2 DIV - col2 FROM tab1 GROUP BY col2, col0, col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7447
SELECT col2 / - col2 FROM tab1 GROUP BY col2, col0, col0
----
-1
-1
-1

query I rowsort
SELECT - col2 FROM tab0 GROUP BY col2, col1
----
-24
-38
-79

query I rowsort
SELECT + col0 AS col0 FROM tab1 GROUP BY col0, col0
----
22
28
82

query I rowsort
SELECT col1 FROM tab0 AS cor0 GROUP BY col1, col1 HAVING + - col1 IS NOT NULL
----
0
81

query I rowsort
SELECT + col2 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + col0 FROM tab2 GROUP BY col0, col0, col0
----
15
91
92

query I rowsort
SELECT ALL + col2 FROM tab1 AS cor0 GROUP BY col2, col0
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col0 FROM tab2 GROUP BY col0, col0
----
15
91
92

query I rowsort
SELECT col2 AS col1 FROM tab1 GROUP BY col2, col2
----
45
71
8

query II rowsort
SELECT col0, - col0 FROM tab1 GROUP BY col0, col0
----
22
-22
28
-28
82
-82

query I rowsort
SELECT - col1 AS col0 FROM tab2 GROUP BY col0, col1 HAVING col0 IS NOT NULL
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 col0 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL + - col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL + - col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL col2 * - - col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, col1
----
3364
6241
7569

query I rowsort
SELECT col1 AS col2 FROM tab1 GROUP BY col1, col0
----
44
57
6

query I rowsort
SELECT ALL - col1 AS col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL + col2 FROM tab2 GROUP BY col2, col2
----
58
79
87

query I rowsort
SELECT + col1 FROM tab0 GROUP BY col1, col1
----
0
81

query I rowsort
SELECT ALL col0 * - + col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT + col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - col2 FROM tab1 AS cor0 GROUP BY col2, col1
----
-45
-71
-8

query I rowsort
SELECT + + col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT DISTINCT + col1 * - col1 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
-1936
-3249
-36

query I rowsort
SELECT + + col2 * - col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT col2 AS col0 FROM tab2 GROUP BY col0, col2
----
58
79
87

query I rowsort
SELECT DISTINCT + col0 + col1 FROM tab0 GROUP BY col1, col0
----
124
26
83

query I rowsort
SELECT + col0 AS col1 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT col2 * col2 * col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
357911
512
91125

query I rowsort
SELECT col1 * col1 FROM tab1 AS cor0 GROUP BY col1 HAVING NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT AVG ( + col1 ) FROM tab0 AS cor0 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab2 GROUP BY col2, col2
----
58
79
87

query I rowsort
SELECT ALL - col1 AS col1 FROM tab2 GROUP BY col1, col2
----
-41
-59
-61

query I rowsort
SELECT - col2 / + col2 FROM tab1 WHERE ( NULL ) IS NOT NULL GROUP BY col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
0
0
81

query I rowsort
SELECT + col0 + + col0 + col0 AS col2 FROM tab1 GROUP BY col0, col0
----
246
66
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL col1 FROM tab2 GROUP BY col0, col1 HAVING - - col1 IS NULL
----

query I rowsort
SELECT + col1 AS col2 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL + col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + col0 FROM tab0 GROUP BY col0, col0
----
26
43
83

query II rowsort
SELECT + col2 + - col2 AS col1, + col2 FROM tab2 GROUP BY col2, col0
----
0
58
0
79
0
87

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab1 GROUP BY col2, col2, col1
----
-44
-57
-6

query I rowsort
SELECT ALL - + col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT + col2 FROM tab1 cor0 GROUP BY col2, col2
----
45
71
8

query I rowsort
SELECT col0 - + col1 AS col0 FROM tab1 GROUP BY col1, col0, col1, col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + col2 AS col2 FROM tab2 AS cor0 GROUP BY col2 HAVING NULL IS NULL
----
58
79
87

query I rowsort
SELECT col2 * + col2 FROM tab2 AS cor0 WHERE ( col1 + + - col0 ) IS NULL GROUP BY col2 HAVING ( NULL ) NOT BETWEEN ( AVG ( col0 ) ) AND ( NULL )
----

query I rowsort
SELECT col2 FROM tab2 AS cor0 WHERE NULL < NULL GROUP BY col2
----

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT NULL IS NOT NULL
----
26
43
83

query I rowsort
SELECT ALL - + col0 FROM tab2 AS cor0 GROUP BY col1, col0
----
-15
-91
-92

query I rowsort
SELECT ALL + col0 AS col0 FROM tab0 GROUP BY col0, col0, col2
----
26
43
83

query I rowsort
SELECT - col2 AS col0 FROM tab1 GROUP BY col2, col2
----
-45
-71
-8

query I rowsort
SELECT ALL - + col1 + col1 FROM tab1 AS cor0 GROUP BY col1, col0, col1
----
0
0
0

query I rowsort
SELECT ALL col2 AS col2 FROM tab1 GROUP BY col2, col2
----
45
71
8

query I rowsort
SELECT + + col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query II rowsort
SELECT DISTINCT col0, col0 AS col0 FROM tab0 GROUP BY col0
----
26
26
43
43
83
83

query I rowsort
SELECT ALL + col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT col2 AS col1 FROM tab1 GROUP BY col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL col2 + + col2 AS col1 FROM tab0 GROUP BY col2, col0
----
158
48
76

query I rowsort
SELECT ALL col2 AS col0 FROM tab1 GROUP BY col1, col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col0 * - + col0 AS col0 FROM tab1 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + col1 FROM tab1 cor0 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 col1 FROM tab1 cor0 WHERE NOT + col1 IS NOT NULL GROUP BY col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col0 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, col1
----
0
81

query I rowsort
SELECT ALL - col0 FROM tab2 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + + col0 * - col0 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab0 GROUP BY col1, col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL + - col1 FROM tab1 AS cor0 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + col1 FROM tab0 GROUP BY col1, col1, col1 HAVING NOT col1 NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT - col2 * - col2 AS col0 FROM tab0 GROUP BY col2, col1
----
1444
576
6241

query I rowsort
SELECT ALL col1 AS col0 FROM tab1 GROUP BY col1, col2 HAVING NOT + col1 IS NOT NULL
----

query I rowsort
SELECT ALL - col1 AS col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - col2 - + col2 * + col2 FROM tab1 GROUP BY col2
----
-2070
-5112
-72

onlyif mysql # DIV for integer division: 
query I rowsort label-7527
SELECT + + col0 DIV col0 + + col0 FROM tab0 AS cor0 GROUP BY col1, col0
----
27
44
84

skipif mysql # not compatible
query I rowsort label-7527
SELECT + + col0 / col0 + + col0 FROM tab0 AS cor0 GROUP BY col1, col0
----
27
44
84

query I rowsort
SELECT + + col1 + - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
0
0
0

query II rowsort
SELECT col0 * col2 AS col0, col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, col2
----
1260
28
176
22
5822
82

query I rowsort
SELECT + col0 AS col0 FROM tab2 GROUP BY col1, col0
----
15
91
92

query I rowsort
SELECT + col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, col0
----
58
79
87

query I rowsort
SELECT ALL col0 AS col1 FROM tab1 GROUP BY col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - col1 AS col2 FROM tab2 cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT + col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, col2 HAVING + - AVG ( col0 ) IS NOT NULL
----
58
79
87

query I rowsort
SELECT - col2 - - col2 FROM tab2 AS cor0 GROUP BY col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7536
SELECT col1 DIV col1 DIV col1 FROM tab1 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7536
SELECT col1 / col1 / col1 FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT col0 FROM tab0 GROUP BY col2, col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT col1 AS col1 FROM tab0 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + + col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab1 GROUP BY col2, col0
----
22
28
82

query I rowsort
SELECT ALL col0 AS col0 FROM tab1 AS cor0 GROUP BY col1, col0, col2
----
22
28
82

query I rowsort
SELECT - col2 AS col2 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT + col2 AS col1 FROM tab2 GROUP BY col1, col2
----
58
79
87

query I rowsort
SELECT ALL + col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, col1
----
41
59
61

query I rowsort
SELECT - col2 + + col1 FROM tab2 cor0 GROUP BY col1, col2
----
-17
-20
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL + col1 FROM tab0 GROUP BY col1, col2
----
0
0
81

query I rowsort
SELECT ALL + col1 FROM tab2 GROUP BY col1, col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab0 AS cor0 GROUP BY col1, col2 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT DISTINCT col1 + + col1 AS col0 FROM tab1 GROUP BY col1
----
114
12
88

query I rowsort
SELECT ALL col0 FROM tab0 GROUP BY col1, col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT col2 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT col1 AS col1 FROM tab0 GROUP BY col1, col2
----
0
0
81

query I rowsort
SELECT ALL + col2 * + col2 * - col2 * - - col2 FROM tab1 GROUP BY col2
----
-25411681
-4096
-4100625

query II rowsort
SELECT col0, - col0 + - col0 AS col1 FROM tab0 cor0 GROUP BY col0, col0
----
26
-52
43
-86
83
-166

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL + col1 AS col2 FROM tab0 AS cor0 GROUP BY col1 HAVING NULL IS NULL
----
0
81

query I rowsort
SELECT col0 FROM tab0 GROUP BY col1, col0
----
26
43
83

query I rowsort
SELECT col2 - col2 FROM tab1 GROUP BY col1, col2, col2
----
0
0
0

query I rowsort
SELECT + col2 FROM tab0 cor0 GROUP BY col2, col1
----
24
38
79

query I rowsort
SELECT - + col0 FROM tab2 AS cor0 GROUP BY col0, col0
----
-15
-91
-92

query I rowsort
SELECT col2 FROM tab0 GROUP BY col2, col0
----
24
38
79

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT + col0 * col0 AS col2 FROM tab1 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT col0 AS col2 FROM tab1 GROUP BY col0 HAVING NULL <> NULL
----

query I rowsort
SELECT col0 + + + col0 FROM tab2 GROUP BY col0
----
182
184
30

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT col0 FROM tab1 GROUP BY col0, col1
----
22
28
82

query I rowsort
SELECT - col1 * - - col1 AS col0 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL - col0 FROM tab0 AS cor0 GROUP BY col0, col0 HAVING col0 IS NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-7573
SELECT col0 - - col0 DIV col2 FROM tab2 cor0 GROUP BY col2, col0
----
15
92
93

skipif mysql # not compatible
query I rowsort label-7573
SELECT col0 - - col0 / col2 FROM tab2 cor0 GROUP BY col2, col0
----
15
92
93

query I rowsort
SELECT - + col1 FROM tab0 AS cor0 GROUP BY col1, col1, col1
----
-81
0

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab0 GROUP BY col2, col2
----
-24
-38
-79

query I rowsort
SELECT - + col0 AS col1 FROM tab0 AS cor0 GROUP BY col0 HAVING NULL < NULL
----

query I rowsort
SELECT col0 + col0 AS col2 FROM tab0 GROUP BY col0, col0
----
166
52
86

query I rowsort
SELECT ALL - col2 FROM tab2 AS cor0 GROUP BY col2, col1
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col1 FROM tab0 GROUP BY col0, col2
----
24
38
79

query I rowsort
SELECT ALL + col1 FROM tab2 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
41
59
61

query I rowsort
SELECT - col0 AS col2 FROM tab1 GROUP BY col0, col0
----
-22
-28
-82

query I rowsort
SELECT ALL + col0 * - - col2 FROM tab1 GROUP BY col0, col2
----
1260
176
5822

query II rowsort
SELECT DISTINCT col0 AS col1, col0 FROM tab2 GROUP BY col0
----
15
15
91
91
92
92

query I rowsort
SELECT DISTINCT + col1 FROM tab2 AS cor0 GROUP BY col2, col1 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT - col2 FROM tab2 GROUP BY col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - col0 AS col1 FROM tab0 GROUP BY col0 HAVING NULL > + col0
----

query II rowsort
SELECT ALL - col1 AS col1, col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-81
81
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7588
SELECT DISTINCT col0 DIV + col0 FROM tab2 GROUP BY col0, col0
----
1

skipif mysql # not compatible
query I rowsort label-7588
SELECT DISTINCT col0 / + col0 FROM tab2 GROUP BY col0, col0
----
1

query I rowsort
SELECT ALL col2 AS col2 FROM tab2 GROUP BY col2, col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col0 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT - col0 FROM tab1 GROUP BY col0 HAVING NOT col0 <= NULL
----

query I rowsort
SELECT ALL - col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, col1
----
-81
0

query I rowsort
SELECT col2 AS col2 FROM tab1 GROUP BY col2 HAVING NOT ( NULL ) IS NOT NULL
----
45
71
8

query I rowsort
SELECT DISTINCT - col1 FROM tab2 AS cor0 GROUP BY col2, col1
----
-41
-59
-61

query I rowsort
SELECT ALL col2 FROM tab2 GROUP BY col0, col2
----
58
79
87

query I rowsort
SELECT - col2 FROM tab2 AS cor0 GROUP BY col2, col2
----
-58
-79
-87

query I rowsort
SELECT col2 FROM tab2 GROUP BY col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + - col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, col2
----
-45
-71
-8

query I rowsort
SELECT col1 * col1 FROM tab0 AS cor0 GROUP BY col1, col0
----
0
0
6561

query I rowsort
SELECT col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, col0
----
15
91
92

query I rowsort
SELECT col2 AS col1 FROM tab1 GROUP BY col2, col0
----
45
71
8

query I rowsort
SELECT ALL col1 FROM tab0 GROUP BY col1 HAVING NULL IS NOT NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-7603
SELECT ALL col0 DIV col0 FROM tab2 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7603
SELECT ALL col0 / col0 FROM tab2 GROUP BY col0
----
1
1
1

query II rowsort
SELECT + col0, col0 AS col2 FROM tab0 GROUP BY col0, col0, col1
----
26
26
43
43
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col2 FROM tab2 AS cor0 GROUP BY col1, col1
----
41
59
61

query I rowsort
SELECT + col1 FROM tab0 AS cor0 GROUP BY col1, col2
----
0
0
81

query II rowsort
SELECT DISTINCT col1 AS col0, - col1 - - col1 + - col1 FROM tab2 GROUP BY col1, col1
----
41
-41
59
-59
61
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col0 FROM tab1 AS cor0 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab1 AS cor0 GROUP BY col2, col1
----
44
57
6

query I rowsort
SELECT col2 * - - col2 AS col1 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT ALL col1 AS col2 FROM tab2 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + col1 FROM tab2 AS cor0 GROUP BY col0, col1, col1
----
41
59
61

query I rowsort
SELECT DISTINCT col1 + - + col1 FROM tab2 GROUP BY col1
----
0

query I rowsort
SELECT DISTINCT col1 FROM tab2 AS cor0 WHERE - col1 IS NULL GROUP BY col1
----

query I rowsort
SELECT DISTINCT - col1 FROM tab0 cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT - col2 FROM tab1 GROUP BY col2, col2 HAVING NOT NULL >= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 col1 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL + col0 FROM tab2 AS cor0 GROUP BY col0 HAVING NOT NULL IS NOT NULL
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 col2 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-7620
SELECT col1 DIV + - col1 FROM tab2 GROUP BY col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7620
SELECT col1 / + - col1 FROM tab2 GROUP BY col1
----
-1
-1
-1

query I rowsort
SELECT - col2 AS col1 FROM tab1 GROUP BY col2, col2
----
-45
-71
-8

query I rowsort
SELECT ALL + col0 FROM tab2 WHERE NULL <> NULL GROUP BY col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col0 FROM tab1 GROUP BY col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col2 FROM tab0 AS cor0 GROUP BY col2, col2
----
-24
-38
-79

query I rowsort
SELECT col2 AS col1 FROM tab0 AS cor0 GROUP BY col0, col2
----
24
38
79

query I rowsort
SELECT DISTINCT + - col2 FROM tab1 cor0 GROUP BY col2
----
-45
-71
-8

query II rowsort
SELECT - col2, + col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-24
24
-38
38
-79
79

query I rowsort
SELECT - col0 AS col1 FROM tab0 GROUP BY col1, col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab2 GROUP BY col0, col0, col2
----
58
79
87

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL col2 AS col1 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL + - col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT ALL col1 AS col0 FROM tab2 GROUP BY col1
----
41
59
61

query II rowsort
SELECT + col2, + col2 FROM tab2 GROUP BY col1, col2
----
58
58
79
79
87
87

query I rowsort
SELECT - col0 * + + col0 FROM tab0 AS cor0 GROUP BY col0, col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + col0 col0 FROM tab2 GROUP BY col0, col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY col0, col1
----
44
57
6

query II rowsort
SELECT DISTINCT + + AVG ( + col0 ), col0 AS col1 FROM tab2 AS cor0 GROUP BY col2, col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT DISTINCT col2 FROM tab0 GROUP BY col2, col0
----
24
38
79

query I rowsort
SELECT ALL - col2 FROM tab2 GROUP BY col2, col1
----
-58
-79
-87

query I rowsort
SELECT col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col2 FROM tab0 GROUP BY col1, col2 HAVING NOT AVG ( ALL - col2 ) IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 col1 FROM tab0 GROUP BY col0, col1
----
-81
0

query I rowsort
SELECT ALL - col2 AS col2 FROM tab0 GROUP BY col2 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col1 FROM tab1 GROUP BY col1, col1
----
-44
-57
-6

query I rowsort
SELECT col0 FROM tab2 AS cor0 WHERE + col2 IS NULL GROUP BY col2, col0, col0
----

query II rowsort
SELECT ALL + col1, col1 * + col1 AS col2 FROM tab2 AS cor0 GROUP BY col2, col1
----
41
1681
59
3481
61
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col1 + + + col1 - + col1 col1 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT + + col0 AS col1 FROM tab1 AS cor0 WHERE col0 + - col0 - col2 * - - col1 IS NOT NULL GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL col2 AS col2 FROM tab1 GROUP BY col2, col1
----
45
71
8

query I rowsort
SELECT col0 AS col2 FROM tab2 cor0 GROUP BY col0, col1
----
15
91
92

query I rowsort
SELECT col0 * + col0 AS col0 FROM tab0 GROUP BY col0
----
1849
676
6889

query II rowsort
SELECT ALL - + col2 AS col1, col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, col2
----
-45
45
-71
71
-8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + + + col0 col2 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT + + col1 FROM tab1 AS cor0 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT + col1 * + col1 + col1 FROM tab1 GROUP BY col1
----
1980
3306
42

query I rowsort
SELECT col0 FROM tab2 GROUP BY col2, col0
----
15
91
92

query I rowsort
SELECT DISTINCT + col0 FROM tab2 cor0 GROUP BY col0, col0
----
15
91
92

query II rowsort
SELECT + + col0, - col2 FROM tab2 AS cor0 GROUP BY col0, col2
----
15
-87
91
-79
92
-58

query II rowsort
SELECT + col2, - col2 * + col2 FROM tab0 AS cor0 GROUP BY col2
----
24
-576
38
-1444
79
-6241

query I rowsort
SELECT DISTINCT + + col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, col0
----
22
28
82

query I rowsort
SELECT ALL col2 * + col2 FROM tab2 GROUP BY col2, col2, col1
----
3364
6241
7569

query I rowsort
SELECT DISTINCT col2 - col2 FROM tab0 AS cor0 GROUP BY col2
----
0

query II rowsort
SELECT col1 * + col1 AS col0, - col1 FROM tab2 WHERE NULL IS NULL GROUP BY col1, col1
----
1681
-41
3481
-59
3721
-61

query I rowsort
SELECT - col2 FROM tab1 GROUP BY col2, col0
----
-45
-71
-8

query I rowsort
SELECT col2 FROM tab0 GROUP BY col2, col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT - col1 FROM tab1 GROUP BY col0, col1
----
-44
-57
-6

query I rowsort
SELECT col1 * col1 FROM tab0 GROUP BY col0, col1, col1
----
0
0
6561

query I rowsort
SELECT ALL + col2 AS col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL - col2 AS col1 FROM tab1 GROUP BY col0, col2
----
-45
-71
-8

query I rowsort
SELECT ALL - col1 FROM tab2 cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT + col2 FROM tab1 AS cor0 GROUP BY col2, col2 HAVING NOT NULL IS NOT NULL
----
45
71
8

query I rowsort
SELECT - col1 AS col0 FROM tab1 GROUP BY col1, col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col1 col2 FROM tab2 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT col2 AS col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
58
79
87

query I rowsort
SELECT DISTINCT + - col0 * + + col0 * + - col0 FROM tab0 cor0 GROUP BY col0
----
17576
571787
79507

query I rowsort
SELECT + col0 * - col0 AS col1 FROM tab1 GROUP BY col1, col0
----
-484
-6724
-784

query I rowsort
SELECT ALL - col2 + - col2 FROM tab2 AS cor0 GROUP BY col2
----
-116
-158
-174

query I rowsort
SELECT ALL - col2 * - col2 AS col1 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT ALL col0 + + col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, col0
----
124
26
83

query I rowsort
SELECT + - AVG ( col1 ) FROM tab0 WHERE NOT + col0 IS NULL GROUP BY col0, col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + col0 FROM tab0 GROUP BY col0 HAVING NOT - col0 = AVG ( + col2 )
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-7685
SELECT - col0 DIV col0 FROM tab0 GROUP BY col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7685
SELECT - col0 / col0 FROM tab0 GROUP BY col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + col0 * col0 AS col2 FROM tab1 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT ALL col2 + - col2 FROM tab1 GROUP BY col2
----
0
0
0

query II rowsort
SELECT ALL + col0 AS col1, - col0 * - col0 AS col2 FROM tab2 AS cor0 GROUP BY col0 HAVING ( NULL ) > NULL
----

query I rowsort
SELECT DISTINCT + col0 FROM tab2 GROUP BY col1, col0
----
15
91
92

query I rowsort
SELECT DISTINCT + col1 * - col1 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT - col0 FROM tab0 GROUP BY col0, col1
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - col0 FROM tab2 cor0 GROUP BY col0, col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col1 FROM tab2 GROUP BY col2, col1
----
-41
-59
-61

query I rowsort
SELECT + - col0 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT + col0 * + + col1 FROM tab0 GROUP BY col1, col0 HAVING NULL IS NULL
----
0
0
3483

query I rowsort
SELECT ALL + + col2 * + col2 - col2 FROM tab0 AS cor0 GROUP BY col2, col2
----
1406
552
6162

query I rowsort
SELECT + + col0 FROM tab2 AS cor0 GROUP BY col0, col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL - + col2 FROM tab2 AS cor0 GROUP BY col2, col2, col1
----
-58
-79
-87

query I rowsort
SELECT - col2 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT NULL <> NULL
----

query I rowsort
SELECT ALL col1 + + col1 FROM tab2 AS cor0 GROUP BY col1
----
118
122
82

query I rowsort
SELECT - col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + col2 FROM tab1 GROUP BY col2, col2
----
45
71
8

query I rowsort
SELECT - col1 AS col1 FROM tab0 AS cor0 GROUP BY col0, col1
----
-81
0
0

query I rowsort
SELECT ALL col0 AS col2 FROM tab1 AS cor0 GROUP BY col1, col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT + col2 AS col1 FROM tab0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT - col0 FROM tab1 GROUP BY col0, col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT col0 + - + col0 AS col1 FROM tab2 GROUP BY col2, col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col0 FROM tab1 GROUP BY col2, col2 HAVING NOT NULL IS NOT NULL
----
45
71
8

query I rowsort
SELECT + col1 FROM tab2 AS cor0 GROUP BY col2, col1
----
41
59
61

query I rowsort
SELECT DISTINCT col2 FROM tab1 AS cor0 WHERE - col0 IS NULL GROUP BY col2
----

query I rowsort
SELECT DISTINCT - col0 * col0 FROM tab2 GROUP BY col0, col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL col2 FROM tab0 AS cor0 GROUP BY col2, col2, col1 HAVING - - col2 <> NULL
----

query I rowsort
SELECT ALL - - col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL + col0 + + col0 FROM tab2 GROUP BY col0
----
182
184
30

query I rowsort
SELECT ALL col2 AS col2 FROM tab1 WHERE NULL <= NULL GROUP BY col0, col2 HAVING NOT NULL IS NOT NULL
----

query I rowsort
SELECT col1 FROM tab2 cor0 GROUP BY col2, col1
----
41
59
61

query I rowsort
SELECT DISTINCT - col0 * + col0 FROM tab0 cor0 GROUP BY col2, col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT - col1 FROM tab2 AS cor0 GROUP BY col2, col0, col1
----
-41
-59
-61

query I rowsort
SELECT ALL col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, col1
----
41
59
61

query I rowsort
SELECT col2 AS col0 FROM tab2 AS cor0 WHERE NOT NULL IS NULL GROUP BY col2, col2
----

query I rowsort
SELECT DISTINCT + - col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT - col0 + + col0 FROM tab2 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL col2 AS col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - col1 AS col2 FROM tab1 GROUP BY col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT col1 AS col1 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL col1 FROM tab1 AS cor0 GROUP BY col2, col1
----
44
57
6

query I rowsort
SELECT ALL - col0 FROM tab2 GROUP BY col0, col1
----
-15
-91
-92

query I rowsort
SELECT col2 AS col1 FROM tab2 AS cor0 GROUP BY col0, col1, col2
----
58
79
87

query I rowsort
SELECT DISTINCT col1 FROM tab0 AS cor0 GROUP BY col1, col0
----
0
81

query I rowsort
SELECT + col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-7731
SELECT ALL + col0 DIV col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7731
SELECT ALL + col0 / col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
1
1
1

query I rowsort
SELECT + + col2 * - col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, col2 HAVING NOT + AVG ( ALL + col1 ) NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT + col0 * col0 * col0 FROM tab0 AS cor0 GROUP BY col0
----
17576
571787
79507

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - + col1 col0 FROM tab1 AS cor0 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + + col1 * + col1 + col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
1722
3540
3782

query I rowsort
SELECT col0 * - col0 FROM tab1 GROUP BY col0, col2
----
-484
-6724
-784

query I rowsort
SELECT + col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, col0
----
44
57
6

query I rowsort
SELECT ALL col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL - + col1 * col2 FROM tab2 WHERE NOT NULL IS NULL GROUP BY col1, col2
----

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab0 GROUP BY col0, col1
----
-26
-43
-83

query I rowsort
SELECT col2 FROM tab1 AS cor0 GROUP BY col2, col1 HAVING NOT NULL IS NOT NULL
----
45
71
8

query I rowsort
SELECT ALL col2 AS col0 FROM tab2 GROUP BY col2, col0 HAVING NULL <> NULL
----

query I rowsort
SELECT col1 AS col0 FROM tab2 GROUP BY col0, col1
----
41
59
61

query I rowsort
SELECT DISTINCT + col2 * - col2 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT - col1 FROM tab1 AS cor0 GROUP BY col0, col1
----
-44
-57
-6

query I rowsort
SELECT - col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
-24
-38
-79

query I rowsort
SELECT - - col2 + - col1 FROM tab2 cor0 GROUP BY col2, col1, col2
----
17
20
26

query I rowsort
SELECT + - col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col1 FROM tab1 GROUP BY col2, col0, col0
----
-45
-71
-8

query I rowsort
SELECT - col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, col2
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL - col2 FROM tab2 AS cor0 GROUP BY col1, col2
----
-58
-79
-87

query I rowsort
SELECT ALL col2 FROM tab1 GROUP BY col0, col2
----
45
71
8

query I rowsort
SELECT col1 * + + col2 + - col2 AS col0 FROM tab0 AS cor0 GROUP BY col1, col2
----
-38
-79
1920

query I rowsort
SELECT col2 / - col2 FROM tab1 WHERE NULL IS NOT NULL GROUP BY col2
----

query I rowsort
SELECT ALL col2 AS col1 FROM tab2 GROUP BY col2, col2
----
58
79
87

query I rowsort
SELECT ALL col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
41
59
61

query I rowsort
SELECT - col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, col2, col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + + col0 AS col1 FROM tab2 cor0 GROUP BY col2, col0
----
15
91
92

query I rowsort
SELECT ALL - col2 * - col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab2 GROUP BY col2, col1
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-7762
SELECT ALL col2 DIV + col2 FROM tab0 AS cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7762
SELECT ALL col2 / + col2 FROM tab0 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT + + col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL - col0 AS col2 FROM tab0 AS cor0 GROUP BY col1, col0
----
-26
-43
-83

query I rowsort
SELECT col0 FROM tab1 AS cor0 GROUP BY col0, col2
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - - col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL + col0 AS col0 FROM tab2 GROUP BY col0, col0
----
15
91
92

query I rowsort
SELECT ALL - - col1 - - col1 * col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
1980
3306
42

query I rowsort
SELECT ALL + col0 FROM tab0 AS cor0 GROUP BY col2, col0
----
26
43
83

query I rowsort
SELECT ALL - col2 AS col0 FROM tab1 GROUP BY col0, col0, col2
----
-45
-71
-8

query I rowsort
SELECT - col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, col2
----
-58
-79
-87

query I rowsort
SELECT col1 AS col1 FROM tab1 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT ALL - - col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL + col0 * - col0 FROM tab1 AS cor0 GROUP BY col2, col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab2 GROUP BY col1 HAVING NOT - col1 IS NULL
----
41
59
61

query I rowsort
SELECT ALL + col2 AS col1 FROM tab1 GROUP BY col2, col2
----
45
71
8

query I rowsort
SELECT - - col0 FROM tab2 AS cor0 GROUP BY col2, col0
----
15
91
92

query I rowsort
SELECT DISTINCT + col0 + - col0 AS col0 FROM tab0 GROUP BY col1, col1, col0
----
0

query I rowsort
SELECT + col1 AS col2 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL col0 AS col1 FROM tab0 GROUP BY col0, col1
----
26
43
83

query I rowsort
SELECT DISTINCT + + col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab0 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT col0 + - col0 FROM tab1 GROUP BY col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7786
SELECT + col0 DIV - col2 FROM tab1 cor0 GROUP BY col0, col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-7786
SELECT + col0 / - col2 FROM tab1 cor0 GROUP BY col0, col2
----
-1
-2
0

query I rowsort
SELECT + + col1 AS col0 FROM tab1 cor0 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
44
57
6

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, col1, col0 HAVING NOT NULL < ( NULL )
----

query II rowsort
SELECT col0 AS col1, + col0 FROM tab0 GROUP BY col0
----
26
26
43
43
83
83

query I rowsort
SELECT ALL - col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT col1 * - - col1 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - - col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, col2, col1
----
45
71
8

query I rowsort
SELECT col1 * + - col1 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL col2 FROM tab2 GROUP BY col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT col2 FROM tab1 cor0 GROUP BY col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT + col0 FROM tab0 AS cor0 GROUP BY col1, col0
----
26
43
83

query I rowsort
SELECT ALL col2 AS col0 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, col2, col2
----
-22
-28
-82

query I rowsort
SELECT DISTINCT col0 FROM tab1 GROUP BY col0 HAVING NULL IS NULL
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-7800
SELECT ALL + col0 DIV - col0 col0 FROM tab2 AS cor0 GROUP BY col1, col0
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7800
SELECT ALL + col0 / - col0 col0 FROM tab2 AS cor0 GROUP BY col1, col0
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-7801
SELECT + col1 DIV col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, col2, col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7801
SELECT + col1 / col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, col2, col1
----
0
0
0

query I rowsort
SELECT ALL + col1 AS col0 FROM tab1 GROUP BY col2, col1
----
44
57
6

query I rowsort
SELECT + + col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - col0 AS col1 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT col1 FROM tab1 GROUP BY col0, col1, col2
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-7806
SELECT - col0 DIV + col0 + - + col0 FROM tab1 GROUP BY col0 HAVING + col0 IS NOT NULL
----
-23
-29
-83

skipif mysql # not compatible
query I rowsort label-7806
SELECT - col0 / + col0 + - + col0 FROM tab1 GROUP BY col0 HAVING + col0 IS NOT NULL
----
-23
-29
-83

query I rowsort
SELECT ALL + col0 + - col0 FROM tab1 GROUP BY col1, col0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, col1
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col2 FROM tab2 GROUP BY col0, col1
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab1 AS cor0 GROUP BY col0, col2
----
45
71
8

query I rowsort
SELECT + - col2 * + + col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT - col1 FROM tab2 GROUP BY col2, col1
----
-41
-59
-61

query I rowsort
SELECT - col1 / + - col0 AS col2 FROM tab1 GROUP BY col1, col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL col1 FROM tab2 WHERE NOT ( - col2 ) IS NULL GROUP BY col1
----
41
59
61

query I rowsort
SELECT - col0 FROM tab2 GROUP BY col0 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab2 GROUP BY col2, col1 HAVING NOT col2 IS NULL
----
58
79
87

query I rowsort
SELECT - col2 FROM tab2 GROUP BY col2, col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + col2 FROM tab1 GROUP BY col2, col1
----
45
71
8

query I rowsort
SELECT - col0 AS col0 FROM tab2 AS cor0 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - - col0 FROM tab2 AS cor0 GROUP BY col1, col0
----
15
91
92

query I rowsort
SELECT DISTINCT + + col0 - + col0 FROM tab2 AS cor0 GROUP BY col2, col0, col0
----
0

query I rowsort
SELECT col2 FROM tab1 WHERE NOT NULL IS NOT NULL GROUP BY col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
22
28
82

query I rowsort
SELECT ALL + col2 + col2 + col2 FROM tab1 AS cor0 GROUP BY col2
----
135
213
24

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab0 cor0 GROUP BY col2, col1
----
-24
-38
-79

query I rowsort
SELECT - + col2 FROM tab2 AS cor0 GROUP BY col2, col1
----
-58
-79
-87

query I rowsort
SELECT ALL col1 FROM tab1 AS cor0 WHERE NOT NULL NOT BETWEEN ( - col1 ) AND col0 * - col2 GROUP BY col1
----

query I rowsort
SELECT + col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT - col1 * + col0 AS col0 FROM tab2 GROUP BY col1, col0 HAVING NULL IS NOT NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-7831
SELECT + col1 DIV - col1 FROM tab2 GROUP BY col1, col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7831
SELECT + col1 / - col1 FROM tab2 GROUP BY col1, col2
----
-1
-1
-1

query I rowsort
SELECT ALL - col1 AS col1 FROM tab1 AS cor0 GROUP BY col1 HAVING NULL <= NULL
----

query I rowsort
SELECT - + col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT col2 * col2 FROM tab2 AS cor0 GROUP BY col2, col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col0 FROM tab2 GROUP BY col1, col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT col2 FROM tab1 GROUP BY col1, col2
----
45
71
8

query II rowsort
SELECT ALL + + col2 AS col1, + col2 FROM tab0 AS cor0 GROUP BY col2
----
24
24
38
38
79
79

query I rowsort
SELECT + - col0 * col0 AS col2 FROM tab1 AS cor0 GROUP BY col1, col0
----
-484
-6724
-784

query I rowsort
SELECT + col2 FROM tab1 GROUP BY col0, col1, col2
----
45
71
8

query I rowsort
SELECT DISTINCT - - col2 * + - col2 AS col1 FROM tab0 WHERE NOT NULL <= NULL GROUP BY col2, col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col0 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL + col0 AS col1 FROM tab1 cor0 GROUP BY col1, col0
----
22
28
82

query I rowsort
SELECT col1 FROM tab1 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT ALL col1 FROM tab0 AS cor0 GROUP BY col2, col1 HAVING NULL IS NULL
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col0 FROM tab1 GROUP BY col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-7846
SELECT + col0 DIV - col0 FROM tab0 GROUP BY col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7846
SELECT + col0 / - col0 FROM tab0 GROUP BY col0
----
-1
-1
-1

query I rowsort
SELECT ALL col2 AS col2 FROM tab2 GROUP BY col2, col1
----
58
79
87

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT - col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, col2, col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + col0 + + + col0 * col0 FROM tab0 AS cor0 GROUP BY col0
----
1892
6972
702

query I rowsort
SELECT ALL col1 * + col1 - + - col1 AS col0 FROM tab1 GROUP BY col1
----
1980
3306
42

query I rowsort
SELECT - - col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL - col2 * - col2 FROM tab2 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
3364
6241
7569

query I rowsort
SELECT ALL + + col0 * + col0 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT - col1 * + col1 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT - col2 AS col0 FROM tab1 cor0 GROUP BY col0, col2
----
-45
-71
-8

query I rowsort
SELECT ALL col2 * - col2 FROM tab2 GROUP BY col2, col2
----
-3364
-6241
-7569

query I rowsort
SELECT - col1 + + col1 AS col2 FROM tab1 GROUP BY col0, col1
----
0
0
0

query II rowsort
SELECT DISTINCT + - col2, col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-45
45
-71
71
-8
8

query I rowsort
SELECT DISTINCT col2 FROM tab1 AS cor0 GROUP BY col2, col0
----
45
71
8

query I rowsort
SELECT - col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT + col2 AS col2 FROM tab1 AS cor0 GROUP BY col1, col2
----
45
71
8

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, col1
----
15
91
92

query I rowsort
SELECT ALL - col0 * + col0 FROM tab2 AS cor0 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL + col1 * + col1 FROM tab0 GROUP BY col1
----
0
6561

query I rowsort
SELECT DISTINCT - col2 FROM tab2 GROUP BY col0, col2
----
-58
-79
-87

query I rowsort
SELECT - - col2 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab1 cor0 GROUP BY col2, col2
----
-45
-71
-8

query I rowsort
SELECT + + col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + col2 * + col2 * - col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-195112
-493039
-658503

query I rowsort
SELECT DISTINCT + col0 * - + col2 - + col2 AS col0 FROM tab0 cor0 GROUP BY col0, col2
----
-1056
-2133
-3192

query I rowsort
SELECT - col0 AS col0 FROM tab2 cor0 GROUP BY col0, col2
----
-15
-91
-92

query I rowsort
SELECT + col0 + - col0 AS col1 FROM tab1 GROUP BY col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 col2 FROM tab2 AS cor0 GROUP BY col2, col2
----
58
79
87

query I rowsort
SELECT DISTINCT + col1 AS col2 FROM tab2 cor0 GROUP BY col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL col0 AS col1 FROM tab2 cor0 GROUP BY col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT + col2 AS col2 FROM tab1 GROUP BY col0, col2 HAVING ( NULL ) <> - col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - col2 col1 FROM tab1 GROUP BY col2
----
0
0
0

query I rowsort
SELECT col2 AS col2 FROM tab1 GROUP BY col0, col0, col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col0 FROM tab0 AS cor0 GROUP BY col0, col1
----
26
43
83

query I rowsort
SELECT ALL - col2 * - + col2 * - col2 FROM tab1 GROUP BY col2
----
-357911
-512
-91125

query I rowsort
SELECT + col1 * col1 FROM tab1 AS cor0 GROUP BY col0, col1, col1
----
1936
3249
36

query I rowsort
SELECT ALL - col1 * + col1 AS col1 FROM tab0 GROUP BY col1, col0
----
-6561
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col1 FROM tab1 AS cor0 GROUP BY col0, col0 HAVING + + col0 <> NULL
----

query I rowsort
SELECT - col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, col0
----
-15
-91
-92

query I rowsort
SELECT - col2 AS col1 FROM tab0 GROUP BY col2, col1
----
-24
-38
-79

query I rowsort
SELECT ALL + - col0 FROM tab2 AS cor0 GROUP BY col0, col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - col2 FROM tab0 GROUP BY col2, col1, col2
----
-24
-38
-79

query II rowsort
SELECT DISTINCT - - col0, + col0 AS col2 FROM tab2 cor0 GROUP BY col0
----
15
15
91
91
92
92

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab2 AS cor0 GROUP BY col0 HAVING NULL <> NULL
----

query I rowsort
SELECT col2 + col2 * - col2 FROM tab1 GROUP BY col2
----
-1980
-4970
-56

query I rowsort
SELECT col1 FROM tab1 AS cor0 WHERE - col0 <= NULL GROUP BY col1, col0
----

query I rowsort
SELECT + col2 AS col0 FROM tab2 GROUP BY col2, col1
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col0 FROM tab0 GROUP BY col0, col2
----
26
43
83

query I rowsort
SELECT DISTINCT col0 FROM tab0 AS cor0 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL - + col1 FROM tab1 AS cor0 GROUP BY col2, col2, col1
----
-44
-57
-6

query I rowsort
SELECT + col0 FROM tab0 AS cor0 GROUP BY col0, col1
----
26
43
83

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col2 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT col0 AS col2 FROM tab2 GROUP BY col0, col0
----
15
91
92

query I rowsort
SELECT ALL col1 FROM tab2 GROUP BY col0, col1, col2
----
41
59
61

query I rowsort
SELECT DISTINCT + + col0 + + - col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT - col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, col2
----
-41
-59
-61

query I rowsort
SELECT + + col0 + - col0 FROM tab0 AS cor0 GROUP BY col0
----
0
0
0

query II rowsort
SELECT + col0 AS col1, - col1 FROM tab0 AS cor0 GROUP BY col0, col2, col1
----
26
0
43
-81
83
0

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
44
57
6

query I rowsort
SELECT DISTINCT + col1 + - - col1 FROM tab2 AS cor0 GROUP BY col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col1 FROM tab0 GROUP BY col0, col0
----
-26
-43
-83

query I rowsort
SELECT + col1 * - col1 * + col1 FROM tab1 GROUP BY col1, col1, col0, col1
----
-185193
-216
-85184

query I rowsort
SELECT col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL - col1 FROM tab1 GROUP BY col0, col1
----
-44
-57
-6

query I rowsort
SELECT ALL + col1 FROM tab0 AS cor0 GROUP BY col1, col1
----
0
81

query I rowsort
SELECT + + col1 FROM tab0 AS cor0 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL + col2 FROM tab0 GROUP BY col1, col2
----
24
38
79

query II rowsort
SELECT col0, col0 * + - col0 AS col1 FROM tab2 GROUP BY col0, col0
----
15
-225
91
-8281
92
-8464

query I rowsort
SELECT ALL col2 AS col1 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

query I rowsort
SELECT ALL col1 FROM tab0 GROUP BY col1, col2
----
0
0
81

query I rowsort
SELECT + col1 AS col2 FROM tab0 cor0 GROUP BY col1, col1, col1
----
0
81

query I rowsort
SELECT ALL col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, col1
----
41
59
61

query I rowsort
SELECT col0 AS col0 FROM tab1 GROUP BY col0, col1 HAVING NULL IS NOT NULL
----

query II rowsort
SELECT DISTINCT - col0 AS col0, - col0 + + - col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-30
-91
-182
-92
-184

query I rowsort
SELECT - col0 + + col0 AS col2 FROM tab1 cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT + col2 FROM tab2 AS cor0 GROUP BY col0, col2
----
58
79
87

query I rowsort
SELECT col2 AS col2 FROM tab1 GROUP BY col2, col0
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col1 FROM tab0 GROUP BY col1, col0
----
26
43
83

query I rowsort
SELECT ALL + col1 FROM tab0 GROUP BY col2, col1
----
0
0
81

query I rowsort
SELECT + col0 AS col0 FROM tab2 GROUP BY col0, col0 HAVING NULL IS NULL
----
15
91
92

query I rowsort
SELECT DISTINCT + + col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
41
59
61

query I rowsort
SELECT col1 FROM tab0 cor0 GROUP BY col0, col1
----
0
0
81

query I rowsort
SELECT - - col0 - + + col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT col1 * + - col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT - col1 FROM tab0 AS cor0 GROUP BY col1, col2
----
-81
0
0

query I rowsort
SELECT - + col2 * - - col2 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT - col2 FROM tab0 GROUP BY col1, col2
----
-24
-38
-79

query I rowsort
SELECT + col2 * col1 AS col2 FROM tab0 GROUP BY col2, col1, col0
----
0
0
1944

query I rowsort
SELECT ALL - col1 AS col2 FROM tab0 GROUP BY col1, col1
----
-81
0

query I rowsort
SELECT - + col2 * col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - - col1 FROM tab2 WHERE NOT col2 IS NOT NULL GROUP BY col1, col1
----

query I rowsort
SELECT + - col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, col0
----
-15
-91
-92

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY col1, col2
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col2 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + col2 FROM tab1 GROUP BY col0, col2, col2
----
45
71
8

query I rowsort
SELECT ALL - col0 FROM tab0 AS cor0 GROUP BY col0, col0 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col0 FROM tab2 cor0 GROUP BY col1, col1, col0, col0
----
-15
-91
-92

query I rowsort
SELECT + + col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab1 AS cor0 GROUP BY col2 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 col2 FROM tab2 AS cor0 GROUP BY col1, col1 HAVING NOT NULL IS NOT NULL
----
41
59
61

query I rowsort
SELECT - - col2 FROM tab2 cor0 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 col0 FROM tab2 cor0 GROUP BY col2, col1 HAVING NOT NULL >= NULL
----

query I rowsort
SELECT + col0 FROM tab1 WHERE - col0 IS NOT NULL GROUP BY col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL - + col2 FROM tab1 cor0 GROUP BY col2 HAVING NULL IS NULL
----
-45
-71
-8

query I rowsort
SELECT - col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, col0 HAVING NULL < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + + col2 col0 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL + col0 FROM tab1 GROUP BY col0, col1
----
22
28
82

query II rowsort
SELECT DISTINCT col0 AS col0, col0 * col0 FROM tab0 AS cor0 GROUP BY col0, col0, col0
----
26
676
43
1849
83
6889

query I rowsort
SELECT ALL - col2 FROM tab1 cor0 GROUP BY col0, col2
----
-45
-71
-8

query I rowsort
SELECT col1 AS col2 FROM tab1 GROUP BY col0, col1
----
44
57
6

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT + - col0 AS col2 FROM tab1 AS cor0 GROUP BY col2, col0
----
-22
-28
-82

query I rowsort
SELECT ALL - + col2 - + col2 FROM tab2 AS cor0 GROUP BY col2
----
-116
-158
-174

query II rowsort
SELECT DISTINCT + col0, col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
15
15
91
91
92
92

query I rowsort
SELECT - col2 AS col1 FROM tab0 AS cor0 GROUP BY col2 HAVING col2 >= NULL
----

query I rowsort
SELECT - col2 FROM tab2 AS cor0 GROUP BY col2, col0
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - col2 * col2 FROM tab2 GROUP BY col2, col2, col0
----
-3364
-6241
-7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col2 FROM tab1 AS cor0 GROUP BY col1, col0
----
44
57
6

query I rowsort
SELECT col0 AS col2 FROM tab1 cor0 GROUP BY col0, col1 HAVING NULL >= NULL
----

query I rowsort
SELECT DISTINCT - col2 FROM tab2 AS cor0 GROUP BY col1, col2
----
-58
-79
-87

query I rowsort
SELECT + col2 * - col2 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col2 FROM tab1 AS cor0 GROUP BY col0, col1
----
22
28
82

query I rowsort
SELECT DISTINCT col2 - - col2 FROM tab2 AS cor0 GROUP BY col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col0 FROM tab2 GROUP BY col0, col1 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
45
71
8

query I rowsort
SELECT col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, col0
----
44
57
6

query I rowsort
SELECT ALL col2 * - col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, col2, col2 HAVING - col0 > NULL
----

query I rowsort
SELECT + col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT col1 AS col1 FROM tab0 GROUP BY col1, col0
----
0
0
81

query I rowsort
SELECT DISTINCT col0 + col0 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT ALL col1 FROM tab1 GROUP BY col2, col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col0 FROM tab1 GROUP BY col0, col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col1 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT col0 FROM tab1 cor0 WHERE ( NULL ) IS NOT NULL GROUP BY col0
----

query I rowsort
SELECT ALL - col2 * - col2 AS col1 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT + col0 FROM tab0 AS cor0 GROUP BY col1, col0
----
26
43
83

query I rowsort
SELECT ALL + col2 FROM tab2 AS cor0 GROUP BY col0, col2
----
58
79
87

query I rowsort
SELECT - col2 + - - col2 FROM tab0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT ALL - col0 FROM tab0 AS cor0 GROUP BY col0, col1, col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT - col0 FROM tab2 cor0 GROUP BY col2, col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + col2 + - + col2 / AVG ( + + col2 ) FROM tab0 WHERE NULL IS NOT NULL GROUP BY col2
----

query I rowsort
SELECT col2 FROM tab1 AS cor0 WHERE ( NOT + col2 > NULL ) GROUP BY col1, col2 HAVING NOT NULL < NULL
----

query I rowsort
SELECT ALL col2 FROM tab0 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT + + col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
41
59
61

query I rowsort
SELECT DISTINCT col0 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT NULL IS NOT NULL
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT - col0 col2, col0 FROM tab0 GROUP BY col0
----
-26
26
-43
43
-83
83

query I rowsort
SELECT - col1 AS col1 FROM tab2 GROUP BY col1, col0, col2 HAVING NOT NULL <> NULL
----

query I rowsort
SELECT - col2 FROM tab1 GROUP BY col2, col2
----
-45
-71
-8

query I rowsort
SELECT ALL - + col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab0 AS cor0 GROUP BY col0, col1
----
0
81

query I rowsort
SELECT col2 FROM tab0 AS cor0 GROUP BY col2, col0
----
24
38
79

query I rowsort
SELECT ALL - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL + col0 AS col2 FROM tab0 GROUP BY col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-8006
SELECT - col2 DIV + col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8006
SELECT - col2 / + col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + col1 FROM tab1 AS cor0 WHERE ( NULL ) <= ( NULL ) GROUP BY col1
----

query II rowsort
SELECT - col2 AS col1, + col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
58
-79
79
-87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col1 FROM tab1 AS cor0 GROUP BY col1, col1
----
-44
-57
-6

query I rowsort
SELECT - + col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT + col2 AS col0 FROM tab1 cor0 GROUP BY col0, col2
----
45
71
8

query I rowsort
SELECT col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
41
59
61

query I rowsort
SELECT col2 * + col2 AS col0 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT - col2 FROM tab0 WHERE NOT NULL IS NULL GROUP BY col2, col2
----

query I rowsort
SELECT ALL col0 AS col2 FROM tab0 GROUP BY col0 HAVING NULL IS NULL
----
26
43
83

query I rowsort
SELECT - col0 AS col0 FROM tab1 GROUP BY col0, col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col2 FROM tab0 AS cor0 GROUP BY col1, col0
----
0
0
81

query I rowsort
SELECT + col2 AS col1 FROM tab1 AS cor0 GROUP BY col1, col2, col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-8019
SELECT ALL + col1 DIV col1 AS col0 FROM tab1 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8019
SELECT ALL + col1 / col1 AS col0 FROM tab1 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
1
1
1

query I rowsort
SELECT + col0 + + col1 AS col1 FROM tab1 GROUP BY col1, col0
----
126
28
85

query I rowsort
SELECT + col0 * + - col0 FROM tab1 cor0 GROUP BY col0, col2
----
-484
-6724
-784

query I rowsort
SELECT col0 * - col0 AS col1 FROM tab2 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab0 GROUP BY col0, col2, col0 HAVING NOT NULL IS NOT NULL
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - col2 + + col1 FROM tab2 AS cor0 GROUP BY col2, col1
----
-17
-20
-26

query I rowsort
SELECT col0 FROM tab2 GROUP BY col0, col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT col1 FROM tab0 GROUP BY col1, col1
----
0
81

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab2 GROUP BY col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - + col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL - + col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + - col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + col0 FROM tab0 GROUP BY col1, col0, col2
----
26
43
83

query I rowsort
SELECT + col0 + + col0 FROM tab2 GROUP BY col2, col0
----
182
184
30

query I rowsort
SELECT col1 AS col1 FROM tab2 GROUP BY col1, col1 HAVING NOT AVG ( col1 ) < NULL
----

query I rowsort
SELECT ALL col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, col1, col2
----
58
79
87

query I rowsort
SELECT + col2 AS col0 FROM tab2 GROUP BY col2, col0
----
58
79
87

query I rowsort
SELECT DISTINCT - - col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL col0 AS col1 FROM tab0 AS cor0 GROUP BY col1, col0
----
26
43
83

query I rowsort
SELECT - + col2 * - col0 AS col0 FROM tab1 cor0 GROUP BY col0, col2
----
1260
176
5822

query I rowsort
SELECT AVG ( DISTINCT + col1 ) FROM tab2 GROUP BY col2, col1 HAVING NOT col2 <> NULL
----

query I rowsort
SELECT ALL - - col2 FROM tab0 cor0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab2 GROUP BY col0, col2
----
58
79
87

query I rowsort
SELECT - col2 * col2 AS col1 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab1 AS cor0 GROUP BY col0, col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - col2 FROM tab1 AS cor0 GROUP BY col2 HAVING + + col2 IS NOT NULL
----
-45
-71
-8

query I rowsort
SELECT - - col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT col2 FROM tab0 WHERE NOT NULL IS NOT NULL GROUP BY col2, col0
----
24
38
79

query I rowsort
SELECT ALL col0 AS col1 FROM tab1 AS cor0 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + - col0 + - col0 AS col2 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT DISTINCT col2 - + col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, col2, col2
----
0

query I rowsort
SELECT + col0 FROM tab2 GROUP BY col0 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL - col2 FROM tab1 GROUP BY col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + col2 FROM tab0 AS cor0 GROUP BY col2, col0 HAVING NOT NULL IS NOT NULL
----
24
38
79

query II rowsort
SELECT col0 AS col2, col0 FROM tab0 GROUP BY col0, col0
----
26
26
43
43
83
83

query I rowsort
SELECT - col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, col1
----
-22
-28
-82

query I rowsort
SELECT ALL col2 AS col0 FROM tab2 GROUP BY col2, col2
----
58
79
87

query I rowsort
SELECT - col0 FROM tab2 GROUP BY col0, col2, col1
----
-15
-91
-92

query I rowsort
SELECT col0 AS col2 FROM tab2 GROUP BY col1, col0
----
15
91
92

query I rowsort
SELECT - - col2 + col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT ALL + - col1 FROM tab1 AS cor0 GROUP BY col1, col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + - col1 col2 FROM tab0 GROUP BY col2, col1, col0
----
-38
26
83

query I rowsort
SELECT ALL + - col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT col0 AS col2 FROM tab1 AS cor0 WHERE ( col2 ) > + col0 + + col2 GROUP BY col0
----

query I rowsort
SELECT + col1 FROM tab1 GROUP BY col1, col1, col2, col2
----
44
57
6

query I rowsort
SELECT DISTINCT - col0 FROM tab1 GROUP BY col0, col2 HAVING NOT NULL IS NOT NULL
----
-22
-28
-82

query I rowsort
SELECT + col1 FROM tab1 AS cor0 GROUP BY col1, col0
----
44
57
6

query I rowsort
SELECT ALL col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NULL = NULL
----

query I rowsort
SELECT ALL + col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT + col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT - col2 FROM tab2 AS cor0 GROUP BY col0, col2
----
-58
-79
-87

query I rowsort
SELECT ALL - - col2 + + - col2 FROM tab0 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT + col2 * + col2 AS col1 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT + col1 AS col1 FROM tab0 GROUP BY col1 HAVING NOT NULL >= NULL
----

query I rowsort
SELECT ALL col2 AS col2 FROM tab1 GROUP BY col2, col0, col2
----
45
71
8

query I rowsort
SELECT DISTINCT + - col2 * - col2 - col2 * col2 AS col2 FROM tab1 AS cor0 GROUP BY col1, col2
----
0

query I rowsort
SELECT ALL + col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT col1 AS col1 FROM tab1 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
44
57
6

query I rowsort
SELECT ALL col1 AS col1 FROM tab2 GROUP BY col1, col1
----
41
59
61

query I rowsort
SELECT DISTINCT col2 FROM tab2 AS cor0 GROUP BY col0, col2
----
58
79
87

query I rowsort
SELECT ALL + - col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL - col0 FROM tab0 GROUP BY col0, col2
----
-26
-43
-83

query I rowsort
SELECT col2 FROM tab1 GROUP BY col2, col0
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col0 FROM tab2 GROUP BY col2, col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - col0 AS col1 FROM tab2 GROUP BY col0, col2, col2
----
-15
-91
-92

query I rowsort
SELECT - col2 FROM tab0 cor0 GROUP BY col2, col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - col2 FROM tab2 GROUP BY col2, col2, col1
----
-58
-79
-87

query I rowsort
SELECT ALL col0 * + col0 AS col1 FROM tab0 cor0 GROUP BY col1, col0
----
1849
676
6889

query I rowsort
SELECT - col2 * - col2 AS col0 FROM tab1 GROUP BY col2, col1
----
2025
5041
64

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab1 GROUP BY col2, col1
----
45
71
8

query I rowsort
SELECT + col0 FROM tab1 GROUP BY col2, col0 HAVING NULL IS NULL
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-8091
SELECT DISTINCT col1 DIV + col1 AS col1 FROM tab2 GROUP BY col1
----
1

skipif mysql # not compatible
query I rowsort label-8091
SELECT DISTINCT col1 / + col1 AS col1 FROM tab2 GROUP BY col1
----
1

query I rowsort
SELECT ALL col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT col0 AS col1 FROM tab0 GROUP BY col0 HAVING NOT - - col0 IS NOT NULL
----

query I rowsort
SELECT ALL col1 FROM tab0 AS cor0 GROUP BY col1, col2, col1
----
0
0
81

query II rowsort
SELECT DISTINCT - col0 * + col0 - + + col0 AS col2, col0 FROM tab0 cor0 GROUP BY col0
----
-1892
43
-6972
83
-702
26

query I rowsort
SELECT ALL + col0 + col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT + col0 + + - col0 + - col0 FROM tab1 AS cor0 GROUP BY col0 HAVING NOT NULL <> NULL
----

query I rowsort
SELECT - col0 FROM tab0 WHERE NULL BETWEEN + col1 AND NULL GROUP BY col0, col0
----

query I rowsort
SELECT ALL - col1 FROM tab2 GROUP BY col1, col2 HAVING NULL = NULL
----

query I rowsort
SELECT ALL col1 FROM tab0 GROUP BY col1, col1, col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query II rowsort
SELECT DISTINCT col1, col2 FROM tab0 AS cor0 GROUP BY col2, col1, col1
----
0
38
0
79
81
24

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col2 col1 FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT + col0 * + col2 FROM tab1 AS cor0 GROUP BY col2, col0
----
1260
176
5822

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab1 GROUP BY col2, col2
----
45
71
8

query I rowsort
SELECT col1 FROM tab2 GROUP BY col0, col1
----
41
59
61

query I rowsort
SELECT DISTINCT + col1 * col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT - col1 AS col0, - col1 col1 FROM tab2 GROUP BY col1 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col1 FROM tab0 GROUP BY col2, col0
----
26
43
83

query I rowsort
SELECT - col0 - col0 AS col1 FROM tab0 GROUP BY col0
----
-166
-52
-86

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - - col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - col0 AS col2 FROM tab1 GROUP BY col0, col2
----
-22
-28
-82

query I rowsort
SELECT ALL col1 AS col0 FROM tab1 GROUP BY col0, col1
----
44
57
6

query I rowsort
SELECT ALL col0 AS col1 FROM tab1 GROUP BY col0, col0
----
22
28
82

query I rowsort
SELECT ALL col0 AS col1 FROM tab2 GROUP BY col0, col0
----
15
91
92

query I rowsort
SELECT + col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, col0, col1
----
22
28
82

query I rowsort
SELECT ALL + col2 FROM tab1 cor0 GROUP BY col2, col2 HAVING NULL IS NULL
----
45
71
8

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 col0 FROM tab2 AS cor0 GROUP BY col1, col0
----
-41
-59
-61

query I rowsort
SELECT col2 FROM tab0 cor0 GROUP BY col1, col2
----
24
38
79

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab2 cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT col2 FROM tab2 GROUP BY col2, col0
----
58
79
87

query I rowsort
SELECT + col1 FROM tab2 AS cor0 WHERE col1 IS NOT NULL GROUP BY col1
----
41
59
61

query I rowsort
SELECT - - col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT col0 + - - col0 FROM tab2 AS cor0 GROUP BY col0
----
182
184
30

query I rowsort
SELECT DISTINCT + col1 FROM tab2 AS cor0 GROUP BY col2, col1
----
41
59
61

query I rowsort
SELECT ALL + col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + col2 AS col0 FROM tab2 GROUP BY col2 HAVING - col0 > NULL
----

query I rowsort
SELECT + + col0 + col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
182
184
30

query I rowsort
SELECT - col1 FROM tab2 GROUP BY col1, col2
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col1 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT + col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT + col0 + col0 AS col2 FROM tab0 GROUP BY col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, col0
----
22
28
82

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab1 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT AVG ( DISTINCT - col2 ) FROM tab1 AS cor0 GROUP BY col1, col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - col1 FROM tab1 GROUP BY col0, col2, col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT col2 col1, - col0 AS col1 FROM tab2 GROUP BY col0, col2
----
58
-92
79
-91
87
-15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col1 FROM tab2 AS cor0 GROUP BY col0, col0
----
15
91
92

query I rowsort
SELECT DISTINCT + col0 FROM tab1 AS cor0 GROUP BY col0, col0
----
22
28
82

query I rowsort
SELECT ALL + col2 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT - - col2 <= NULL
----

query I rowsort
SELECT DISTINCT - - col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL - - col2 * - + col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NULL IS NULL
----
-1444
-576
-6241

query II rowsort
SELECT ALL - col1, + col1 FROM tab0 GROUP BY col1
----
-81
81
0
0

query I rowsort
SELECT + col2 FROM tab2 cor0 GROUP BY col2 HAVING NULL IS NULL
----
58
79
87

query I rowsort
SELECT ALL - col0 AS col2 FROM tab2 GROUP BY col0, col2
----
-15
-91
-92

query I rowsort
SELECT col0 AS col0 FROM tab2 GROUP BY col0, col0
----
15
91
92

query I rowsort
SELECT col1 AS col0 FROM tab0 cor0 WHERE NOT NULL IS NOT NULL GROUP BY col0, col1, col2
----
0
0
81

query I rowsort
SELECT DISTINCT + - col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL + col1 FROM tab2 GROUP BY col2, col1 HAVING ( NULL ) = ( col1 )
----

query I rowsort
SELECT ALL col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + col0 col2 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT - + col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - col2 + + col2 FROM tab1 AS cor0 GROUP BY col2, col2
----
0

query I rowsort
SELECT - - col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT col2 FROM tab0 AS cor0 GROUP BY col2, col1
----
24
38
79

query I rowsort
SELECT - col0 FROM tab2 GROUP BY col2, col0 HAVING NULL IS NULL
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT + col2 * + col2 AS col0, col2 col0 FROM tab0 WHERE + col0 IS NULL GROUP BY col2
----

query I rowsort
SELECT ALL - col0 AS col2 FROM tab2 cor0 GROUP BY col0 HAVING NOT NULL > NULL
----

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL col1 AS col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL + col1 FROM tab1 AS cor0 GROUP BY col0, col1
----
44
57
6

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT + - col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL col1 AS col0 FROM tab0 GROUP BY col1, col1, col2
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT - col0 FROM tab0 AS cor0 GROUP BY col0, col2
----
-26
-43
-83

query I rowsort
SELECT + - col1 AS col1 FROM tab2 AS cor0 GROUP BY col0, col1
----
-41
-59
-61

query II rowsort
SELECT DISTINCT - col0 AS col0, col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
26
-43
43
-83
83

query II rowsort
SELECT ALL - col1 AS col0, col1 AS col2 FROM tab2 GROUP BY col1
----
-41
41
-59
59
-61
61

query I rowsort
SELECT DISTINCT + col2 * + - col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
-2025
-5041
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + - col2 * + + col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT - col1 + + col1 AS col1 FROM tab0 AS cor0 GROUP BY col0, col1
----
0

query I rowsort
SELECT col1 AS col0 FROM tab2 GROUP BY col2, col1
----
41
59
61

query I rowsort
SELECT ALL - col2 FROM tab2 AS cor0 GROUP BY col2, col0
----
-58
-79
-87

query I rowsort
SELECT + col0 AS col0 FROM tab0 AS cor0 GROUP BY col1, col0 HAVING NOT NULL IS NOT NULL
----
26
43
83

query I rowsort
SELECT ALL - col1 FROM tab0 AS cor0 GROUP BY col2, col0, col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL col1 AS col1 FROM tab2 GROUP BY col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab1 AS cor0 GROUP BY col1, col0, col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + - col0 AS col0 FROM tab1 cor0 GROUP BY col2, col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - col1 col2 FROM tab1 GROUP BY col1, col0, col0
----
0
0
0

query I rowsort
SELECT ALL col0 FROM tab2 GROUP BY col1, col0, col0
----
15
91
92

query I rowsort
SELECT - + col2 AS col0 FROM tab0 AS cor0 GROUP BY col0, col2, col2
----
-24
-38
-79

query I rowsort
SELECT + - col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT col0 + - - col0 FROM tab1 GROUP BY col0
----
164
44
56

query I rowsort
SELECT ALL col0 FROM tab2 GROUP BY col0, col2
----
15
91
92

query I rowsort
SELECT ALL + col2 AS col2 FROM tab1 GROUP BY col2, col1, col1
----
45
71
8

query I rowsort
SELECT DISTINCT - col2 FROM tab1 GROUP BY col2, col1
----
-45
-71
-8

query I rowsort
SELECT - col0 FROM tab2 AS cor0 GROUP BY col2, col0, col2 HAVING NULL IS NULL
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col0 FROM tab2 GROUP BY col0, col0
----
15
91
92

query I rowsort
SELECT + - col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - + col0 AS col2 FROM tab2 cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT + - col1 AS col1 FROM tab0 cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL - col1 FROM tab0 AS cor0 GROUP BY col0, col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + - col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT - - col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT + col1 FROM tab1 cor0 GROUP BY col2, col1
----
44
57
6

query I rowsort
SELECT col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, col1, col2
----
26
43
83

query I rowsort
SELECT + col1 FROM tab1 GROUP BY col1, col2 HAVING - + col2 IS NOT NULL
----
44
57
6

query I rowsort
SELECT - + col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, col1
----
-41
-59
-61

query I rowsort
SELECT - - col0 * - col0 + - + col0 FROM tab0 AS cor0 GROUP BY col0
----
-1892
-6972
-702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT + - col1 col0, col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-41
41
-59
59
-61
61

query I rowsort
SELECT ALL + + col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + + col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT + col0 FROM tab0 AS cor0 GROUP BY col2, col1, col1, col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col2 + + col2 col2 FROM tab0 GROUP BY col2
----
-1406
-552
-6162

query I rowsort
SELECT ALL + col2 AS col0 FROM tab0 AS cor0 GROUP BY col1, col2
----
24
38
79

query I rowsort
SELECT - col1 FROM tab2 AS cor0 WHERE NOT ( NULL IS NULL ) GROUP BY col1 HAVING NOT NULL = NULL
----

query II rowsort
SELECT col1, col1 AS col1 FROM tab1 GROUP BY col1
----
44
44
57
57
6
6

query I rowsort
SELECT - - col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab1 GROUP BY col0 HAVING NULL IS NULL
----
22
28
82

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab0 cor0 GROUP BY col2, col2
----
24
38
79

query I rowsort
SELECT - col1 AS col1 FROM tab1 cor0 GROUP BY col2, col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + col0 FROM tab0 AS cor0 WHERE NOT + col2 IS NULL GROUP BY col0
----
26
43
83

query I rowsort
SELECT - - col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, col0
----
24
38
79

query I rowsort
SELECT ALL + col0 FROM tab0 AS cor0 GROUP BY col0, col0, col0
----
26
43
83

query I rowsort
SELECT - col0 FROM tab0 GROUP BY col2, col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - col2 FROM tab0 WHERE NULL BETWEEN NULL AND NULL GROUP BY col1, col2
----

query I rowsort
SELECT + - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL + col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + col1 + + col1 FROM tab1 WHERE NULL <> NULL GROUP BY col1, col2
----

query I rowsort
SELECT - col2 FROM tab0 cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL - col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, col2
----
-22
-28
-82

query I rowsort
SELECT col0 FROM tab2 GROUP BY col0 HAVING NOT - col0 IS NOT NULL
----

query I rowsort
SELECT - col0 FROM tab1 AS cor0 GROUP BY col2, col0, col0
----
-22
-28
-82

query I rowsort
SELECT ALL - col2 FROM tab1 GROUP BY col2, col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT col1 * + col1 AS col1 FROM tab2 GROUP BY col1, col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col0 FROM tab1 AS cor0 GROUP BY col1, col0
----
22
28
82

query I rowsort
SELECT col1 + - + col1 * col1 AS col1 FROM tab2 GROUP BY col1
----
-1640
-3422
-3660

onlyif mysql # DIV for integer division: 
query I rowsort label-8236
SELECT ALL - + col1 DIV col1 * + col1 col0 FROM tab1 cor0 GROUP BY col1
----
-44
-57
-6

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8236
SELECT ALL - + col1 / col1 * + col1 col0 FROM tab1 cor0 GROUP BY col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query II rowsort
SELECT ALL - - col1, + col0 col1 FROM tab0 cor0 GROUP BY col1, col0
----
0
26
0
83
81
43

query I rowsort
SELECT DISTINCT + col2 + + col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, col2
----
153
30
73

query I rowsort
SELECT DISTINCT - - col0 + - col0 FROM tab1 AS cor0 GROUP BY col1, col0
----
0

query I rowsort
SELECT - col0 FROM tab0 AS cor0 GROUP BY col0, col0
----
-26
-43
-83

query I rowsort
SELECT ALL - col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 col1 FROM tab1 AS cor0 GROUP BY col1, col0, col1 HAVING NULL IS NULL
----
-44
-57
-6

query I rowsort
SELECT ALL + col0 AS col1 FROM tab1 GROUP BY col1, col0
----
22
28
82

query I rowsort
SELECT col2 FROM tab0 GROUP BY col2, col1
----
24
38
79

query I rowsort
SELECT DISTINCT - - col1 FROM tab1 cor0 GROUP BY col1, col1, col1
----
44
57
6

query I rowsort
SELECT - col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, col2, col0
----
44
57
6

query I rowsort
SELECT col2 + - col2 FROM tab1 GROUP BY col2 HAVING NOT - col2 IS NOT NULL
----

query I rowsort
SELECT DISTINCT + col1 - - col1 AS col0 FROM tab0 GROUP BY col1
----
0
162

query I rowsort
SELECT col2 * + col2 FROM tab0 GROUP BY col2 HAVING ( NULL IS NULL )
----
1444
576
6241

query I rowsort
SELECT + col1 + - - col1 FROM tab0 GROUP BY col1
----
0
162

query I rowsort
SELECT + col0 AS col2 FROM tab0 AS cor0 GROUP BY col1, col0 HAVING NULL IS NULL
----
26
43
83

query I rowsort
SELECT col1 * col1 AS col0 FROM tab2 AS cor0 GROUP BY col1 HAVING NULL IS NULL
----
1681
3481
3721

query I rowsort
SELECT - col2 FROM tab0 GROUP BY col2, col2
----
-24
-38
-79

query I rowsort
SELECT col0 FROM tab1 AS cor0 GROUP BY col0, col1
----
22
28
82

query I rowsort
SELECT col0 FROM tab1 cor0 GROUP BY col0, col0
----
22
28
82

query I rowsort
SELECT + col2 * + col2 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT col0 FROM tab2 GROUP BY col2, col1, col0
----
15
91
92

query I rowsort
SELECT + col2 * col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NULL IS NULL
----
14